Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Thanks mrflibble for the reply.
I am taking your suggestion as reference but then cannot apply directly. This is due to I have multiple set of `include and `define. All the `include will execute at the time and the `define name cannot be the same, every `define must have a unique name for it...
yadog, thanks for the example.
Indeed, the only problem is the `define that need to pass into the self_check.v.
If I use `include "self_check.v", then it will not have the problem with passing `define HIER into the self_check.v, but will have problem with passing parameter of TOTAL_ADDR_WIDTH...
Hi yadog, please refer to the code below
module testbench;
......
.....
`define HIER testbench.module_1.shift_register.register_bank
self_check #(
.TOTAL_ADDR_WIDTH (43)
)
self_check_1 ( );
`undef HIER
`define HIER testbench.module_2.shift_register.register_bank
self_check #(...
yadog, thanks for the reply.
I have tried that. If I doing that, the `define HIER will not be able to pass into the self_check.v. From my example code you will see that the `define HIER and the TOTAL_ADDR_WIDTH are different every time when it is being `included.
Hi,
I would like to pass a parameter to the `include file. The following is my codes
`define HIER testbench.module_1.shift_register.register_bank
parameter TOTAL_ADDR_WIDTH = 43;
`include "../tb/self_check.v"
`undef HIER
`define HIER testbench.module_2.shift_register.register_bank
parameter...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.