Machine Status Panel
A machine controller exposes two status lines, RUN and FAULT, and the wiring plan calls for a status panel. Each line lights its own lamp, and the fault line also sounds a horn. Nothing is computed here. The point of this exercise is that, for the first time, you write the component's boundary. The template provides only the empty shells, with the entire port list missing.
Declare all five ports from the table below, then wire each output to its input.
Interface
| Port | Direction | Type | Description |
|---|---|---|---|
run_i | in | 1 bit | RUN status from the controller |
fault_i | in | 1 bit | FAULT status from the controller |
panel_run_o | out | 1 bit | RUN lamp |
panel_fault_o | out | 1 bit | FAULT lamp |
horn_o | out | 1 bit | Horn; sounds while FAULT is active |
Declare all ports as std_logic.
Behavior
panel_run_ofollowsrun_iat all timespanel_fault_ofollowsfault_iat all timeshorn_oalso followsfault_i: one input feeding two destinations- The testbench steps through the input combinations and checks all three outputs at every step
Constraints
-
Three assignment outside a procedural blocks are all you need; no other constructs The first run fails before you've declared the ports because the testbench cannot connect to a component that has none.
-
It stops with
signal "run_i" is not an interface name, one such line per missing port. Declare the ports and the errors disappear.
Click Run to execute your code. Output will appear here.