Home › Practice › RTL Design › Metro gate

Metro gate

EasyRTLsequentialfsm

A metro gate is locked. A coin unlocks it, and when someone pushes through, it locks again.

Concept first. A state machine is a circuit with a few named states, and rules for what makes it move from one to another. Draw first, then code: two circles, Locked and Unlocked, and arrows labelled with the input that makes each move. Ask for each state: which inputs matter here, and which are ignored? (Pushing a locked gate does nothing. What does a coin do to an unlocked gate?)

What to build.

Solve in your browser →

No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.

More in this track

← Make a tap visibleCandy machine →