⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mipsmem.v

📁 verilog语言实现的基于MIPS体系结构的微处理器程序
💻 V
字号:
//------------------------------------------------// mipsmemsingle.v// David_Harris@hmc.edu 23 October 2005// External memories used by MIPS single-cycle// processor//------------------------------------------------module dmem(input         clk, we,            input  [31:0] a, wd,            output [31:0] rd);  reg  [31:0] RAM[63:0];  assign rd = RAM[a[31:2]]; // word aligned  always @(posedge clk)    if (we)      RAM[a[31:2]] <= wd;endmodulemodule imem(input  [5:0] a,            output [31:0] rd);  reg  [31:0] RAM[63:0];  initial    begin      $readmemh("memfile.dat",RAM);    end  assign rd = RAM[a]; // word alignedendmodule
// imem must currently be created with CoreGen for Xilinx synthesis// or loaded from imem.v for simulation

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -