Forum Discussion
Altera_Forum
Honored Contributor
9 years agoYour idea is basically correct, just a few mistakes with your implementation...
You are updating 'clk_out' in both your 'divider' and 'oneshot' processes. You can't do that. Only update a signal in a single process - (you can always read/test a signal in another process). By looking for an event on 'clk_out' you're trying to use it as a clock. Assuming you weren't trying to update it in the same process, this could be possible - this is a derived clock - but it's not very good practice. I suggest you simplify the first process - just run the counter to 50M. I suggest changing the second process to a clocked process. In there, check the 'counter' (e.g. for zero, which will happened every 1 second) and then act, updating IF1 & IF2. Start with that and, if you still have problems, update the post. Cheers, Alex