eengr
Member level 4
Hi I am working on this problem using VHDL design
It requires two inputs as two sensors (A & B) (as shown in the pdf attached)
View attachment Parking lot occupancy Counter.pdf
It has two outputs as ENTER_CAR & EXIT_CAR. They need to be asserted for ONE clock cycle depending upon if car is entering or leaving.
I have done the state diagram for this (as shown in the pdf attached)
Where I am struggling is the YELLOW HIGHLIGHTED 'ms_tick = 1' condition that takes the State-4 or State-8 back to State-0
I can generate this tick by using a counter but that will cause the OUTPUTS ENTER_CAR & EXIT_CAR to stay asserted for more than one clock cycle.
Is there a VHDL synthesizeable statement that I could use to check for 1 clock cycle and could be used to get out of these states?
It requires two inputs as two sensors (A & B) (as shown in the pdf attached)
View attachment Parking lot occupancy Counter.pdf
It has two outputs as ENTER_CAR & EXIT_CAR. They need to be asserted for ONE clock cycle depending upon if car is entering or leaving.
I have done the state diagram for this (as shown in the pdf attached)
Where I am struggling is the YELLOW HIGHLIGHTED 'ms_tick = 1' condition that takes the State-4 or State-8 back to State-0
I can generate this tick by using a counter but that will cause the OUTPUTS ENTER_CAR & EXIT_CAR to stay asserted for more than one clock cycle.
Is there a VHDL synthesizeable statement that I could use to check for 1 clock cycle and could be used to get out of these states?