first commit

This commit is contained in:
2026-11-24 22:49:06 +01:00
commit 20a1830bc6
10 changed files with 872 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
module shift_reg_4b (
input logic clk,
input logic rst,
input logic en,
input logic in,
output logic out
);
logic [3:0] shift_reg;
always_ff @(posedge clk) begin
if (rst) begin
shift_reg <= 4'b0000;
end else if (en) begin
shift_reg <= {shift_reg[2:0], in};
end
end
assign out = shift_reg[3];
endmodule