Xilinx XST 9.2i.01 - still incomplete support for always @*

After waiting patiently for Xilinx to support always @* properly, I'm still having problem with this code:

localparam integer D_W = 32; localparam integer DEPTH = 512; reg [D_W-1:0] memory [0:DEPTH-1]; reg [DEPTH-1:0] memory_or;

always @* begin for ( i = 0; i < DEPTH; i = i + 1 ) begin memory_or[ i ] = | memory[ i ]; // is any bit high? end end // always @*

... "unexpected event in sensitivity-list of always block."

Same code synthesizes fine in Altera Quartus-II 7.1 Web Edition. For the case I show above, I can workaround it using a generate-loop, and a bunch of assign statements...but there are other code-blocks which I can't easily workaround.

Reply to
Xilinx User
Loading thread data ...

While I would expect XST to handle this well, consider changing your memory array to a vector, at least for this always block. You can still keep your memory array if you have a wire vector assigned to all the memory elements only for use in this block. Because of your wide OR, the "memory" will be implemented as registers anyway, so maybe specifying them as a register vector will give you the results you need.

Shame on XST.

Reply to
John_H

Is it including `i' in * and then complaining about it?

--
Ben Jackson AD7GD

http://www.ben.com/
Reply to
Ben Jackson

Presumably it is including 'memory' in * and then complaining about it. An entire memory/array is not legal in an event control, so there is justification for complaining.

The LRM does not specify how this issue is supposed to be handled. There was plenty of discussion in committee about it, but nothing was ever done about it. Many tools do appear to handle it the way you would want for combinational logic, by making the block sensitive to the entire memory.

Reply to
sharp

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.