Presentation is loading. Please wait.

Presentation is loading. Please wait.

Arbitrary Waveform Discussion 12.2 Example 34. Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary.

Similar presentations


Presentation on theme: "Arbitrary Waveform Discussion 12.2 Example 34. Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary."— Presentation transcript:

1 Arbitrary Waveform Discussion 12.2 Example 34

2 Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary waveform. s0 0 0 0 0 0 1 s1 0 0 1 0 1 0 s2 0 1 0 0 1 1 s3 0 1 1 1 0 0 s4 1 0 0 1 0 1 s5 1 0 1 1 1 0 s6 1 1 0 1 1 1 s7 1 1 1 0 0 0 State q2 q1 q0 D2 D1 D0 Present state Next state

3 s0 0 0 0 0 0 1 1 s1 0 0 1 0 1 0 1 s2 0 1 0 0 1 1 0 s3 0 1 1 1 0 0 0 s4 1 0 0 1 0 1 0 s5 1 0 1 1 1 0 1 s6 1 1 0 1 1 1 0 s7 1 1 1 0 0 0 1 State q2 q1 q0 D2 D1 D0 y Example q2 q1 q0 00011110 0 1 11 11 y = ~q2 & ~q1 | q2 & q0 1 1 0 0 0 1 0 1

4 International Morse Code

5 Generating a Morse code A using a 3-bit divide-by-8 counter

6 K-map for finding A

7 module morsea ( input wire clr, input wire clk, output wire a; ); reg [2:0] q // 3-bit counter always @(posedge clk or posedge clr) begin if(clr == 1) q <= 0; else q <= q + 1; end assign a = ~q[1] & q[0] | q[2] & ~q[0]; endmodule

8 Aldec Active-HDL Simulation


Download ppt "Arbitrary Waveform Discussion 12.2 Example 34. Recall Divide-by-8 Counter Use q2, q1, q0 as inputs to a combinational circuit to produce an arbitrary."

Similar presentations


Ads by Google