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 waveform. s s s s s s s s State q2 q1 q0 D2 D1 D0 Present state Next state
s s s s s s s s State q2 q1 q0 D2 D1 D0 y Example q2 q1 q y = ~q2 & ~q1 | q2 & q
International Morse Code
Generating a Morse code A using a 3-bit divide-by-8 counter
K-map for finding A
module morsea ( input wire clr, input wire clk, output wire a; ); reg [2:0] q // 3-bit counter 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
Aldec Active-HDL Simulation