D Flip-Flop with Reset
Design a D flip-flop in Verilog with synchronous active-high reset. The flip-flop must output q on rising clock edges.
Constraints
- Reset clears q to 0.
- Trigger on rising clock edge only.
- Ignore D changes during reset.
- Output port name: q.
1module dff(2 input wire clk,3 input wire rst,4 input wire d,5 output reg q6);7 8// TODO9 10endmodule