Learn

0/8
0/6
0/6
0/6

Practice

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

PortDirectionTypeDescription
ain8-bit vectorWord as received on link A
bin8-bit vectorWord as received on link B
maintin8-bit vector'1' on each lane currently under maintenance
diffout8-bit vector'1' on each lane where the links disagree
okout1 bitHigh when every lane agrees
alertout1 bitHigh when any lane not under maintenance disagrees

Behavior

  • diff marks disagreement per lane: bit n is '1' exactly when bit n of a differs from bit n of b
  • ok is high when all eight lanes agree, that is, when no bit of diff is high
  • alert is high when at least one disagreeing lane is outside maintenance: disagreements on lanes marked in maint are filtered out before the verdict
  • A disagreement on a maintained lane therefore drops ok but leaves alert low; 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.