Vorbereitungsaufgabe 2: Lösung erstellt.

This commit is contained in:
2024-02-21 16:30:01 +01:00
parent 2a52ee7bb3
commit abc44cd264
7 changed files with 362 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
module jk-ff (
R,
CLK,
EN,
J,
K,
Q
);
input R, CLK, EN, J, K;
output Q;
always @(R or posedge CLK) begin
if(R) begin
Q <= 1'b0;
end else if (EN) begin
case ({J,K})
2'b01: begin
Q <= 1'b0;
end
2'b10: begin
Q <= 1'b1;
end
2'b11: begin
Q <= ~Q;
end
default:
endcase
end
end
endmodule