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 | in | 1 bit | RUN status from the controller |
fault | in | 1 bit | FAULT status from the controller |
panel_run | out | 1 bit | RUN lamp |
panel_fault | out | 1 bit | FAULT lamp |
horn | out | 1 bit | Horn; sounds while FAULT is active |
Declarations: VHDL, all ports std_logic; SystemVerilog, all ports logic.
Behavior
panel_runfollowsrunat all timespanel_faultfollowsfaultat all timeshornalso followsfault: one input feeding two destinations- The testbench steps through the input combinations and checks all three outputs at every step
Constraints
- Three concurrent assignments are all you need; no other constructs
- Expect the first run to fail before you've declared the ports: the testbench can't connect to a component that has none. VHDL stops with
signal "run" is not an interface name; SystemVerilog withport ``run'' is not a port of dut, one such line per missing port. Declare the ports and the errors disappear.
Loading editor...
Click Run to execute your code. Output will appear here.