Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- This is not happening. Run_i is being read as high all the time. I don't know why, even though it is low. --- Quote End --- How do you know it is being read as high? There is no way you know something is being read - its all down to your code. Plus the testbench you posted only shows the inputs for run, clk and halt. What about direction? --- Quote Start --- If I do not do this then how will I update the count at set intervals. Count is the one creating the delay after the button is released. I was looking at this as a helper signal to avoid debouncing of switches. --- Quote End --- Synthesis ignores sensitivity lists, and will build the logic by whats in the process. But simulation works by whatever is in the code. So, from your code, the ACTION process only updates when the clock changes (so it will activate on rising AND falling edges of the clock). This means you will get a simulation/synthesis missmathc. If you want a delay, you need to use a clocked process. --- Quote Start --- What do you mean by this. Can you please explain pointing to the code? Thanks (I will try uploading a bigger picture when I reach home for you, not sure why it came so small.) --- Quote End --- If you have an asynchronous process with an adder, the adder feeds back into itself, so when you +1, it then needs to +1 again, and so on and so on. It makes a logic loop with the adder trying to add 1 to itself in 0 time. Using a clock prevents this by determining when the adder should be updated. I really suggest you read a logic tutorlal. Are you usually a software engineer?