This quiz, I created eight D-flipflops with active high reset which set the output value to 34 in hexadecimal system whenever the “reset” signal has the value of 1. The code also, tricker each flipflop on the negative edge of clk.
Here is my code for this quiz.
module top_module (
input clk,
input reset,
input [7:0] d,
output [7:0] q
);
always@(negedge clk)begin
if(reset==1)begin
q<=8’h34;
end
else begin
q<=d;
end
end
endmodule
Reference:https://hdlbits.01xz.net/wiki/Dff8p