Parallel Link Monitor
A safety-critical backplane carries the same 8-bit word on two parallel links, A and B. Your monitor compares them lane by lane and raises one clean verdict. Lanes flagged as "under maintenance" must never trigger it, because a technician is allowed to disturb those wires.
Interface
| Port | Direction | Type | Description |
|---|---|---|---|
a | in | 8-bit vector | Word as received on link A |
b | in | 8-bit vector | Word as received on link B |
maint | in | 8-bit vector | '1' on each lane currently under maintenance |
diff | out | 8-bit vector | '1' on each lane where the links disagree |
ok | out | 1 bit | High when every lane agrees |
alert | out | 1 bit | High when any lane not under maintenance disagrees |
Behavior
diffmarks disagreement per lane: bit n is '1' exactly when bit n ofadiffers from bit n ofbokis high when all eight lanes agree, that is, when no bit ofdiffis highalertis high when at least one disagreeing lane is outside maintenance: disagreements on lanes marked inmaintare filtered out before the verdict- A disagreement on a maintained lane therefore drops
okbut leavesalertlow; the testbench checks this case explicitly
Constraints
OPERATORS
only bitwise operators (and, or, xor, not / &, |, ^, ~) and reduction operators.
STRUCTURE
one concurrent assignment per output; no processes or always blocks.
Loading editor...
Click Run to execute your code. Output will appear here.