X
Xenon02
Guest
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"?
I mean I don't quite understand the last part. Librarys ? But what is the problem with one module in two different libraries ? Because SystemVerilog only creates somekind of logic gate equivelant. In real life we use the same module like not_module in many other modules so I am confused with the fact that there can't be 1 same module in 2 different modules and it can't compile correctly. It's like it's making not_example module in alu 1, but doesn't make not_module in Alu 2 just because they have the same not_module. I don't get it
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"?
I mean I don't quite understand the last part. Librarys ? But what is the problem with one module in two different libraries ? Because SystemVerilog only creates somekind of logic gate equivelant. In real life we use the same module like not_module in many other modules so I am confused with the fact that there can't be 1 same module in 2 different modules and it can't compile correctly. It's like it's making not_example module in alu 1, but doesn't make not_module in Alu 2 just because they have the same not_module. I don't get it