HDLBits/Building Larger Circuits/Enable shift register(Exams/review2015 fsmshift)
This is the third component in a series of five exercises that builds a complex counter out of several smaller circuits. See the final exercise for the overall design.
As part of the FSM for controlling the shift register, we want the ability to enable the shift register for exactly 4 clock cycles whenever the proper bit pattern is detected. We handle sequence detection in Exams/review2015_fsmseq, so this portion of the FSM only handles enabling the shift register for 4 cycles.
Whenever the FSM is reset, assert shift_ena for 4 cycles, then 0 forever (until reset).
狀態機定義幾個狀態,然後當reset信號有效,進入狀態S0,reset信號消失就進入S1,然後進入S2、S3、S4,當進入S4狀態,下一個狀態就永遠保持為S4。然後shift_ena信號在狀態S0、S1、S2、S3時有效,這樣就完成了題目。
沒有留言:
張貼留言