UPGRADE YOUR BROWSER
We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!
01-28-2019 01:37 AM
I am trying to use `define to select between modules that need to be instantiated during compile.
These defines seems to be working only for the top files but not for the instances/sub instances in the design.
In eg below i notice that CD U1 (X,Y,Z); instance is always selected irrepetive of `define sim.
But if i place the define in Top1.v then AB U1 (X,Y,Z); is selected.
I am using ISE13.1 GUI for the same. How do i ensure that defines in top level is appilcabe to all the files and instances in the design?
File = Top_module.v
`define sim
module Top_module(
input A,
input B,
input C,
output Z
);
Top1 ff(A,B,Z);
endmodule
file = Top1.v
module Top1(
input X,
input Y,
output Z
);
`ifdef sim
AB U1 (X,Y,Z);
`else
CD U1 (X,Y,Z);
`endif
endmodule
02-10-2019 07:56 PM
Follow the steps as mentioned below to globally apply your define macro sim.
I hope this will resolve your query.