Computers, Hardware, Computer Science, Cpu, Electronics.
2'b01: result = a | b; 2'b10: result = sum; 2'b11: result = sum[31]; endcase endmodule The instruction memory module looks like the following, where it reads a file called instr.dat (contains the instruction in hex), and puts it into RAM. This module takes a 6-bit input a, and outputs a 32-bit