What does the following HDL statement mean ?
wire [7 : 0] data-a;
MH SET - 2019, SET Exam - 2019,
Answer: A
The statement declares that data-a is an 8-bit wire and the msb is bit 7.
In Verilog, a vector declaration wire [msb : lsb] name; gives the range of bit indices with the left-hand number as the most significant bit. [7 : 0] covers bits 7, 6, 5, 4, 3, 2, 1 and 0, eight bits in all, with bit 7 the msb and bit 0 the lsb.
Counting 7 − 0 + 1 gives 8 bits, not 4, and bit 7 is on the most significant (left) side of the range, not the least, so the other three options are wrong.
Please log in or register to report this question.