Hello,
I have two modules (two separate .v files) where the top module has a `define as shown in snippet below:
`define ID 32’h0000_0033
module top (
…
input clk,
input rstn,
endmodule
In a sub module, the macro `ID is used as shown in the snippet below:
module reg (
input clk,
…
);
logic [4:0] status;
logic [31:0] reg[0:2];
parameter ABC_ID = `ID;
…
casez (addr[6:0])
7’b000_0001: rdata = ABC_ID;
When I compile with vlog, I get the following error:
** Error: …/…/rtl/ctrl.v(37): (vlog-2163) Macro `ID is undefined.
I have the following in my compile .f file:
+incdir+…/…/rtl/
…/…/rtl/top.v
…/…/rtl/reg.v
Regards,
Mark