(a) A and B are bit vectors that represent unsigned binary numbers. Write a Verilog function that...

Question:

(a) A and B are bit vectors that represent unsigned binary numbers. Write a Verilog function that returns TRUE (1) if A > B. The function call should be of the form GT(A, B, N), where N is the length of the bit vectors. Start comparing the most significant bits of A and B first and proceed from left to right. As soon as you find a pair of unequal bits, you can determine whether A > B. For example, if A = 1011010 and B = 1010110, you can determine that A > B when you make the fourth comparison. You may declare N as a global parameter in the calling module.
(b) Write a Verilog module that will call the function in part (a).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Digital Systems Design Using Verilog

ISBN: 978-1285051079

1st edition

Authors: Charles Roth, Lizy K. John, Byeong Kil Lee

Question Posted: