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

Feb 28, 2006 3 Replies

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]


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

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)

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

Looks like your theory is correct Chris. Thanks.

-sanjay

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required