I've got a problem understanding how include
works. My teacher told me that include
isn't meant to include modules but constant values.
He said that using the same include module in many modules will make errors because the module with the same name is on 3 other modules (3 different files .SV).
I don't get it. I used includes on testbench, but I should do it. Why?
I don't understand the statement that the same name of the included module is in 3 files.
Update :
Usually I use include
in testbench to add other modules for example include "Not_module.sv"
.
But I was told to not do it. I don't know why.
Also the argument to not use include
for modules. For example let's say I have a module "not_module.sv" and two other modules "ALU1.sv" and "ALU2.sv"
I need "not_module.sv" in both ALU modules. So I added include
in ALU 1 and ALU 2. My teacher said that the synthesis or simulation will not know which include module to compile or something. I don't understand it. Let's say ALU1 uses the not_module to substract something and ALU2 uses not_module to add something. So why compiling ALU1 and ALU2 will complicate it when there is include "not_module.sv"
?