Error when trying to synthesize

Guest #4982000
Hello... I'm trying to implement a design which increases a 16-bit 
vector on each 4 bits, depending on a selection and button which 
increases the respective 4-bits which are selected by the selections and 
im getting the following error when im trying to synthesize it:
Line 21: statement is not synthesizable since it does not hold its value 
under NOT(clock-edge) condition

Please help me to resolve this
Attached files:
Moderator (Company: Titel)
A clock in a FPGA is described with 'event. Have a look how others use 
this attribute, or read your synthesizers manual how to invoke clocked 
flipflops.

BTW: never use a badly bouncing button as a clock source. In a FPGA 
design usually the one and only clock has something around 50Mhz. Use 
this clock to sync in the bouncing button and then and after debouncing 
do an edge detection on that signal. Then you have a perfect synchronous 
design.
Guest
at first you should rewrite your code like this:

if clk'event and clk = '1' then
  case
   ..
  end case;
end if;
Moderator (Company: Titel)
Tudor I. wrote:
> EDIT: I tried using debouncing on that button
How?
Debouncing simply means: check for a stable signal for e.g. 20ms. And 
then add an edge detection for the counting...

Something like this:
http://www.lothar-miller.de/s9y/archives/3-Tastenentprellung-mit-Schieberegister.html

And as I said: look how others did it. Look a ten designs and do it like 
the majority does it. Then you are not that far away from a 
synthesizable result.

Reply

A question of your own? This thread is over 9 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.