127k views
2 votes
Ascending sequence detector: Write a Verilog module that accepts an eight byte sequence on eight-bit input in, where the first byte is signaled by a single bit start signal. Your module should assert a single-bit done signal on the cycle after last bit is input. In the same cycle, it should assert the single-bit in sequence signal if the eight bytes were in descending sequence; that is, if the i + 1st byte is one less than the i the byte, bᵢ + 1 = bᵢ - 1 for i, from 1 to 7.

User Pramoth
by
7.5k points

1 Answer

3 votes

Final answer:

To write a Verilog module for an ascending sequence detector, you can use a combination of registers, counters, and a state machine. The module should have inputs for the start signal and the eight-byte sequence. It should also have outputs for the done signal and the in sequence signal.

Step-by-step explanation:

To write a Verilog module for an ascending sequence detector, you can use a combination of registers, counters, and a state machine. The module should have inputs for the start signal and the eight-byte sequence. It should also have outputs for the done signal and the in sequence signal. By comparing each byte with the previous one and checking if it is one less, you can determine if the sequence is in ascending order.

User Kjack
by
8.0k points