Why wouldn't this infer a flop with async reset and sync enable

Hi Folks,

Both Precision Synthesis and Altera Quartus 2.0 cannot infer flops with async reset and enable in the following code. I have checked that the nclk and nrst_n are properly connected to the module.

What am I missing?

TIA, Sanjay

-------

reg [23:0] irq_event_reg [0:1];

always@(posedge nclk or negedge nrst_n) begin : irq_event_reg_sync if(!nrst_n) begin irq_event_reg[0]

Reply to
fpgabuilder
Loading thread data ...

Sorry, In this particular case, the sync enable is not present. I forgot to notice that I had edited that part as a test. In anycase, enable or no enable, the synthesizer complains that it cannot infer a flop.

-sanjay

Reply to
fpgabuilder

Just a guess, but what if you make two regs rather than a reg array (memory) with two elements. It's isn't uncommon for compilers to treat arrays only as a unit and not as individual elements, even when the elements are always referenced by constant subscripts.

Hope this helps,

-Chris

***************************************************************************** Chris Clark Internet : snipped-for-privacy@world.std.com Compiler Resources, Inc. Web Site :
formatting link
23 Bailey Rd voice : (508) 435-5016 Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)

------------------------------------------------------------------------------

Reply to
Chris F Clark

Looks like your theory is correct Chris. Thanks.

-sanjay

Reply to
fpgabuilder

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.