OpenFPGA/openfpga_flow/benchmarks/micro_benchmark/SAPone/rtl/IR.v

21 lines
304 B
Coq
Raw Normal View History

2020-07-22 13:33:52 -05:00
module IR(
output [7:4] opcode,
output [3:0] oprand,
input wire [7:0] IR_in,
input li_,
input clk,
input clr_
);
reg [7:0] q;
always @(posedge clk)
begin
if(~clr_) q <=8'b0;
else if(~li_) q <= IR_in;
end
assign opcode = q[7:4];
assign oprand = q[3:0];
endmodule