duplicate declaration question
I met a build error with v3.922
filelist: ./test_v.t.v ./test_v/t_inst.v -f filelist1.f ./test_v/top.v -v ./test_v/t_inst_a.v
filelist1.f ./test_v/t_inst_a.v ./test_v/t_inst_b.v
run with： verilator --sc -f filelist --top-module top
error: %Error-MODDUP: test-v/t_inst_a.v:6: Duplicate declaration of module : t_inst_a %Error-MODDUP: test-v/t_inst_a.v:6: ... Location of original declaration
The code of t_inst_a.v line6: module t_inst_a( line7: clk, line...
Dose verilator not support -v?
RE: duplicate declaration question - Added by Wilson Snyder over 2 years ago
You have the file listed twice, so there are two references to that module; imagine if you had "foo.v -y bar.v" both with different code for the module - you'd want to know.
You can suppress the error message with -Wno-MODDUP. This should probably be a warning rather than an error, at least inside a library if not in general, I'll change that.
RE: duplicate declaration question - Added by Marshal qiao over 2 years ago
Thanks, I add -Wno-MODDUP and try again, the demo passed