M
mike v.
Guest
Does anyone know why the behavior of the following code isn't defined
by the verilog 2001 standard?
parameter DEPTH = 8;
parameter BITS = 3;
reg [31:0] mem [DEPTH-1:0];
wire [31:0] out;
wire [BITS-1:0] sel;
always @*
out = mem[sel];
I called Cadence and they said that since this is non-standard that
there is some question about when the always block should be evaluated.
Cadence chose to only evaluate the block when the element selected by
sel changes. I was hoping to use the alwasy @* syntax to build a
parameterizable mux. I think I could accomplish the same thing with an
array of instances but a single always block would be simpler and more
readable.
Thanks,
Mike
by the verilog 2001 standard?
parameter DEPTH = 8;
parameter BITS = 3;
reg [31:0] mem [DEPTH-1:0];
wire [31:0] out;
wire [BITS-1:0] sel;
always @*
out = mem[sel];
I called Cadence and they said that since this is non-standard that
there is some question about when the always block should be evaluated.
Cadence chose to only evaluate the block when the element selected by
sel changes. I was hoping to use the alwasy @* syntax to build a
parameterizable mux. I think I could accomplish the same thing with an
array of instances but a single always block would be simpler and more
readable.
Thanks,
Mike