1
0
Fork 0
2023-fpga-computer/src/sap3/ir.v

23 lines
245 B
Coq
Raw Normal View History

2023-03-03 18:43:11 +00:00
module ir(
input clk,
input rst,
input we,
input[7:0] bus,
output[7:0] out
);
reg[7:0] ir;
always @(posedge clk, posedge rst) begin
if (rst) begin
ir <= 8'b0;
end else if (we) begin
ir <= bus;
end
end
assign out = ir;
endmodule