Question: Write a Verilog function to compare two 8-bit vectors to determine whether they are equal. Report an error if any bit of either vector is

Write a Verilog function to compare two 8-bit vectors to determine whether they are equal. Report an error if any bit of either vector is not 0, 1, or z. The function call should pass only the vectors. The function should return TRUE (1) if the vectors are equal, else FALSE (0). All bits including zs should match (i.e., z only matches z).

Step by Step Solution

3.35 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

function cmpZ input 7 0 a b reg result in... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Digital Systems Design Questions!