View Single Post
  #5 (permalink)  
Old 04-20-2006, 08:47 AM
backhus
Guest
 
Posts: n/a
Default Re: Is there anything fundamentally wrong with this code?

Hi Simon,
the simple answer is : No.

More complex: What do you want it do do?
To me the code looks like a complicated shift register with a priority
encoded output generation.
Question: Do you want to build a shift register?
Do you want a priority encoder?


The pitfall in your code may be that you are using multiple ifs in a
single clocked process and work with signals.

Signal values are only updated at the end of the process, So when you
set local_signal <= '1'in your first if that value is not immediately
visible to the next if. It becomes visible at the next rising clock
edge.

But if that is what you want, it's ok.
Is your behavioral simulation working correctly?
Have you made a timing simulation too?

have a nice synthesis

Eilert

Reply With Quote