Use the verilog language write a MIPS CPU code, and have additional instruction, for example: select

源代码在线查看: instruction_memory.v

软件大小: 9 K
上传用户: zhousiqi420
关键词: instruction additional language example
下载地址: 免注册下载 普通下载 VIP

相关代码

				//=============================================================================
				//Instruction memory Module: Memory size is 167 words of 8 bits ( 1 bite ) each
				//	input [31:0] Read_address;
				//	output [31:0] instruction;
				//=============================================================================
				
				module Instruction_memory( Read_address, instruction );
					input [31:0] Read_address;	//read address
					output [31:0] instruction;	//read data
					reg [31:0] instruction;
					reg [7:0] Mem [0:169];	//167 * 8 memory
				
					always @( Read_address )	
						begin
							instruction[31:0] = {Mem[Read_address+3],Mem[Read_address+2],Mem[Read_address+1],Mem[Read_address]};
						end
								endmodule
							

相关资源