Write a Verilog function to complete the following module, one that automatically counts the number of shifts.

Question:

Write a Verilog function to complete the following module, one that automatically counts the number of shifts. It needs to shift a word to the left until the most significant bit of the input word is equal to 1.
module word_shift(in_word, num_shifts);
input [7:0] in_word;
output [7:0] num_shifts;
assign num_shifts = shift_count(in_word);
//write the function below
….
….
….
endmodule

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: