C
Chris F Clark
Guest
I had a piece of verilog pass by my desk the other day that our
"standard" simulator cannot handle (our home-brew one does, but that's
not relevant). The important question is the code valid verilog or
can it be massaged into valid verilog. If it's valid verilog at least
we know that the problem lies in the simulator and not in the code.
If it's not valid verilog, then we have to fix it.
module mod(out);
parameter param = 32'b0;
output [31:0] out;
wire [31:0] out = {1{param}}; // the concat is the problem
endmodule
The question is do parameters have self-defined widths, as required by
expressions used inside a concat? If not, is there a standard
conforming way (i.e. portable) to give a parameter a width?
Thanks for any suggestions,
-Chris
*****************************************************************************
Chris Clark Internet : compres@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)
------------------------------------------------------------------------------
"standard" simulator cannot handle (our home-brew one does, but that's
not relevant). The important question is the code valid verilog or
can it be massaged into valid verilog. If it's valid verilog at least
we know that the problem lies in the simulator and not in the code.
If it's not valid verilog, then we have to fix it.
module mod(out);
parameter param = 32'b0;
output [31:0] out;
wire [31:0] out = {1{param}}; // the concat is the problem
endmodule
The question is do parameters have self-defined widths, as required by
expressions used inside a concat? If not, is there a standard
conforming way (i.e. portable) to give a parameter a width?
Thanks for any suggestions,
-Chris
*****************************************************************************
Chris Clark Internet : compres@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)
------------------------------------------------------------------------------