U
unfrostedpoptart
Guest
Hi all.
I'd like some help/opinions from the group. I've got a design that
uses parameters as constants for register/memory addresses, e.g.
parameter ADDR1 = 24'h10_0000;
parameter ADDR2 = 24'h10_0010;
Since these are used globally, in many synthesizable blocks and
testbench files, I'd rather use macros/`defines so that each module
doesn't have to include the parameter file inside the module. However,
I've got a catch: in many places I need to use a slice of the
constant, e.g.:
if (XXX[23:10] == ADDR1[23:10]) ....
and this won't work if I use a macro (e.g. `define ADDR1 24'h10_0000).
Some of the casting in System Verilog looks like it might help, but
that's not supported yet in many of the tools we use.
Ideas? Comments? Pointers?
Thanks!!
David
I'd like some help/opinions from the group. I've got a design that
uses parameters as constants for register/memory addresses, e.g.
parameter ADDR1 = 24'h10_0000;
parameter ADDR2 = 24'h10_0010;
Since these are used globally, in many synthesizable blocks and
testbench files, I'd rather use macros/`defines so that each module
doesn't have to include the parameter file inside the module. However,
I've got a catch: in many places I need to use a slice of the
constant, e.g.:
if (XXX[23:10] == ADDR1[23:10]) ....
and this won't work if I use a macro (e.g. `define ADDR1 24'h10_0000).
Some of the casting in System Verilog looks like it might help, but
that's not supported yet in many of the tools we use.
Ideas? Comments? Pointers?
Thanks!!
David