K
Kai
Guest
A system has a 3-bit input D_IN which is read in at every positive going edge of a clock input
CLK. If the current D_IN is greater than the previous D_IN by at least 2, a 3-bit output
COUNT is incremented. If D_IN is 0 for 3 consecutive CLK cycles, the COUNT is reset. When
COUNT reaches 6, the system will assert an output ALARM and the COUNT will not increase
further, till it is reset by giving 0s at D_IN for 3 consecutive cycles. Write a VHDL program that
implements such a system. Compile and verify the functionality of the program with appropriate
test cases.
How do I write the statement for this ?
If the current D_IN is greater than the previous D_IN by at least 2, a 3-bit output
COUNT is incremented
I am able to write this in C and C++ programming but how do i that in VHDL?
CLK. If the current D_IN is greater than the previous D_IN by at least 2, a 3-bit output
COUNT is incremented. If D_IN is 0 for 3 consecutive CLK cycles, the COUNT is reset. When
COUNT reaches 6, the system will assert an output ALARM and the COUNT will not increase
further, till it is reset by giving 0s at D_IN for 3 consecutive cycles. Write a VHDL program that
implements such a system. Compile and verify the functionality of the program with appropriate
test cases.
How do I write the statement for this ?
If the current D_IN is greater than the previous D_IN by at least 2, a 3-bit output
COUNT is incremented
I am able to write this in C and C++ programming but how do i that in VHDL?