FutureWiz: Verilog lab
Verilog Lab-6
Q1. Parity Generator:
Accept a serial stream of 8 bits on the assertion of a ‘Valid_in’ signal. Convert the serial
stream into parallel. Output the byte along with the even parity of the 8 bits on the next
clock. The output should be qualified with a output ‘Valid_out’ signal.
9
Input Parity Output
Generator
Valid_in Valid_out
Reset Clock
Q2. Write a Verilog program using the loop statements which counts the number of
ZEROS in the ODD indices of 32 bits input.
Q3. Design a flow control block which takes 8-bits at i/p when valid_in is high. The block
gives 16-bits at o/p in next clock edge (8 bit previous input with 8 bit current input) with
valid_out high.
4
Din 16
Dout
Valid_in Flow control
Valid_out
clk reset
FutureWiz: Confidential Proprietary
FutureWiz: Verilog lab
Q4. Chirp counter:
The output of the chirp counter is the following waveform.
16 15 14 ------- 2 1 16 15
The chirp output is high for 16 clocks, low for 15, high for 14 and so on. Then the
cycle repeats.
FutureWiz: Confidential Proprietary