Presentation is loading. Please wait.

Presentation is loading. Please wait.

D Flip-Flops in Verilog Discussion 10.3 Example 27.

Similar presentations


Presentation on theme: "D Flip-Flops in Verilog Discussion 10.3 Example 27."— Presentation transcript:

1 D Flip-Flops in Verilog Discussion 10.3 Example 27

2 // Example 27a: D flip-flop with clear module Dff ( input wire clk, input wire clr, input wire D, output reg q ); always @(posedge clk or posedge clr) if(clr == 1) q <= 0; else q <= D; endmodule

3 Aldec Active-HDL Simulation

4 // Example 27b: D flip-flop with set and clear module Dffsc ( input wire clk, input wire clr, input wire set, input wire D, output reg q ); always @(posedge clk or posedge clr or posedge set) if(set == 1) q <= 1; else if(clr == 1) q <= 0; else q <= D; endmodule

5 Aldec Active-HDL Simulation


Download ppt "D Flip-Flops in Verilog Discussion 10.3 Example 27."

Similar presentations


Ads by Google