A
Andy Peters
Guest
Help!
How do I convince some fellow engineers that `include-ing a Verilog
source file into another source file is just bad form? The argument,
"well, you wouldn't #include a C source into another C source file,
now, wouldya?" doesn't seem to do the trick.
Here's the usual set-up that I've been seeing:
`include "defines.h" // this "header" has a bunch of `defines
`define THIS `foo // `foo `defined in defines.h
`define THAT `bar // likewise
`include "module_a.v"
`include "module_b.v"
module toplevel (
signal1,
signal2,
signal3,
... etc
);
module_a u1
();
module_b u2
();
endmodule // toplevel
How do I convince some fellow engineers that `include-ing a Verilog
source file into another source file is just bad form? The argument,
"well, you wouldn't #include a C source into another C source file,
now, wouldya?" doesn't seem to do the trick.
Here's the usual set-up that I've been seeing:
`include "defines.h" // this "header" has a bunch of `defines
`define THIS `foo // `foo `defined in defines.h
`define THAT `bar // likewise
`include "module_a.v"
`include "module_b.v"
module toplevel (
signal1,
signal2,
signal3,
... etc
);
module_a u1
();
module_b u2
();
endmodule // toplevel