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

23 lines
249 B
Coq
Raw Permalink Normal View History

2023-01-04 02:26:45 +00:00
module ir(
input clk,
input rst,
2023-01-04 02:26:45 +00:00
input load,
input[7:0] bus,
output[7:0] out
);
2023-01-04 02:26:45 +00:00
reg[7:0] ir;
2023-01-04 02:26:45 +00:00
always @(posedge clk, posedge rst) begin
if (rst) begin
2023-01-04 02:26:45 +00:00
ir <= 8'b0;
end else if (load) begin
ir <= bus;
end
end
assign out = ir;
2023-01-04 02:26:45 +00:00
endmodule