Checksum-Consistent Transaction
Problem Description
Model a Transaction with a rand bit [7:0] payload[4] and a rand bit [7:0] crc. Add a constraint that forces crc to equal the XOR of all four payload bytes.
Constraints / Notes
payloadhas exactly 4 bytes, each fully random (no range restriction).crcmust equal XOR ofpayload[0], payload[1], payload[2], payload[3].
SystemVerilog
Code Editor Access
Log in to write, run and submit your solution to this interview question. It's free.
Output
Output goes here...
