can you send me the code with the modifications so that I know what exactly you mean?
I would rather not, as it isn't a good learning experience for you, and would require some time for me to write the code.
Though if you have any questions about my previous answer, feel free to ask me about it.
As a freebie for you, pay attention to the alarming
signal, and the condition that has been set: "The device should have buttons/switches to start and stop the timer, as well as to set the desired time interval for the alarm.". If I wanted the alarm to ring after 50 minutes, how would I do that? And what happens when the timer starts?
From the code I see here, the alarm is going to ring 10 minutes after being started, and it won't stop until an hour passes. And it has no way to set a time for it to ring, it always rings after 10 minutes.
And, not only that, the start
signal is never set in the testbench, so the timer is never going to begin.
@dejo
I would stick to my code, your alarm isn't going to work properly due to its comparisons as I mentioned in my previous comments. But if you want to improve the code I modified, you can change the
adjust_interval_up
andadjust_interval_down
buttons to be synchronized to their own states rather than the clock (make their own process with their signals added to the signal sensitivity list and add an extra asynchronous condition to zero the counter on the original process). If you don't make a change like this your alarm is going to take up to an hour to adjust its timer range.Yes, if you have a 1/60 Hertz clock signal. And you must have alarming on the simulation as it is crucial to show that it works.