赞
踩
一点心得:
如果遇到不会的题,可以看着别人的代码,比着抄一遍(不要直接复制粘贴),抄的同时尽量理解每句代码的含义。如果看不懂某句代码,(觉得这句没有用),可以跳过这句不写,按照自己的思路继续。
如果之后没有出现问题,就不用管之前跳过的那句了;如果写着写着发现自己的思路行不通,再回去看别人的代码,大多数时候会发现:刚才跳过的那句,恰好能解决现在遇到的问题
一定要动手操作,不能只看书/答案
更新中,指令已完成,打包文件中含有执行的完整指令(经过MARS验证)以及所有代码。
最后一次修改时间:2019-4-20 14:59:34
最近一次代码+指令打包:
链接: https://pan.baidu.com/s/1EK9ArGvEcTTlDLyVs9hPMw
提取码: y6kv
心得
虽说Verilog是一种类C的语言,但绝不能用C语言的思想学习Verilog,尤其是注意时序问题。比如说关于<=
赋值与=
赋值,以及always与assign的区别,在初学的时候及易出错。在使用Verilog设计处理器时,一定要理解并行与串行的区别,(在这次设计中,我改过的bug大多数是因为时序问题)
另外,已经过MARS运行对比,能够正确执行以下命令↓
File -> Open
在弹出的窗口中,文件类型选.mpf
然后路径指到工程所在文件夹,选择建立的.mpf文件即可
alu.v
关于Result为什么是reg类型:
解释:在always块中,如果要对某个端口赋值。需要把这个端口定义为reg格式。因为被赋值,所以为输出口。
/* * Module Name: ALU * File Created: 2019-4-4 16:11:12 * Notes: * 没有添加溢出判断 * OF为溢出标志位(有溢出为1,无溢出为0)如果溢出 要用两个GPR表示这个结果 */ module ALU( input [31:0] A, //输入32位A input [31:0] B, //输入32位B input [4:0] sl, //左移的位数 input [2:0] ALUctr, //3位ALU控制信号 output reg[31:0] Result, //因为要在always里面赋值,所以定义为reg output reg zero //零标志位 ); always@(*) //(*)表示自动添加敏感列表 begin case(ALUctr) //决定ALU操作 3'b000: Result<=($signed(A)<$signed(B))?32'h0000_0001:32'h0000_0000;//若A<B,则result=1 3'b001: Result<=A|B;//或 3'b010: Result<=A+B;//加 3'b011: Result<={B[15:0],16'h0000};//拓展到高16位 3'b101: Result<=B<<sl;//逻辑左移 3'b100: Result<=A-B;//减 default:Result<=32'h0000_0000; endcase if(A==B) zero<=1;//计算零标志位 else zero<=0; end endmodule
alu_tb.v
`timescale 1ns/1ns //仿真时间单位/时间精度 `include "alu.v" module ALU_tb; reg [31:0] A; reg [31:0] B; reg [4:0] sl; //左移的位数 reg [2:0] ALUctr; //3位ALU控制信号 wire [31:0] Result; //输出端口不能定义为reg型 wire zero; //零标志位 ALU myalu(A,B,sl,ALUctr,Result,zero); always #5 A<=A+1; initial begin A=0;B=0;sl=0;ALUctr=3'b010; #5 B<=1; //因为begin-end是串行,实际上是第5+5ns开始对b赋值 end initial begin $monitor($time,,"%d + %d = %d",A,B,Result); #100 $finish; end endmodule
仿真效果
"testbench.v"中,定义ALUctr=3'b010
,测试ALU的加法功能。
点击红色剪头指示的按钮,可以自动将时间线移动到下一个最近的波形变化边沿。可以看出,每5ns,A的值增加1,B的值不变,Result=a+b,Result值增加一。
溢出的后果检测
给A赋初值(16进制)fffffff0,将textbench修改为如下:
alu_tb.v
`timescale 1ns/1ns //仿真时间单位/时间精度 `include "alu.v" module ALU_tb; reg [31:0] A; reg [31:0] B; reg [4:0] sl; //左移的位数 reg [2:0] ALUctr; //3位ALU控制信号 wire [31:0] Result; wire zero; //零标志位 ALU myalu(A,B,sl,ALUctr,Result,zero); always #2 A<=A+1; initial begin A=32'hffff_fff0;B=0;sl=0;ALUctr=3'b010; #0 B<=1; //因为begin-end是串行,实际上是第5+5ns开始对b赋值 end initial begin $monitor($time,,"%d + %d = %d",A,B,Result); #100 $finish; end endmodule
溢出仿真效果
看下面的控制台输出。溢出后再次从0开始。
指令寄存器用于寄存指令。将指令从code.txt中读入到im中,然后可以按地址输出。
im.v
`timescale 1ns/1ns //IM 指令存储器 与上一个模块以导线相连wire输入 将本模块数据输出到下一个模块reg输出 module IM_4k( input [31:0]addr,//与上一个模块以导线相连 32bit 要取出额的指令地址 output reg[5:0]op,//输出 6位操作码op output reg[4:0]rs,//输出 源1 output reg[4:0]rt,//输出 源2 output reg[4:0]rd,//输出 目的 output reg[4:0]shamt,//只用于移位指令sll output reg[5:0]func,//指出ALU的功能 output reg[15:0]immediate16,//address output reg[25:0]immediate26//J指令 26位跳转地址 ); reg [31:0]im[1023:0];//im存储读取的所有指令 2^10 wire [11:2]address;//因为im一共只有2^10,所以address的位宽为10 assign address=addr[11:2];//按字节寻址,address自动取addr的左移两位 initial begin $readmemh("code.txt",im);//从文件中读取指令 end always @(*)//输出指令的各个部分 begin op<=im[address][31:26]; rs<=im[address][25:21]; rt<=im[address][20:16]; rd<=im[address][15:11]; shamt<=im[address][10:6]; func<=im[address][5:0]; immediate16<=im[address][25:0]; immediate26<=im[address][15:0]; end endmodule
im_tb.v
按照不同的地址分别输出每一条指令。
`timescale 1ns/1ns //仿真时间单位/时间精度 `include "im.v" module IM4k_tb; reg [31:0]addr; wire[5:0]op;//接收来自被测模块的输出 用导线连接 wire[4:0]rs; wire[4:0]rt; wire[4:0]rd; wire[4:0]shamt; wire[5:0]func; wire[15:0]immediate16;//address wire[25:0]immediate26;//J指令 26位跳转地址 IM_4k myim(addr,op,rs,rt,rd,shamt,func,immediate16,immediate26); always #5 addr<=addr+4; initial addr=0;//不能给wire型变量赋值 initial begin $monitor($time,,"addr = %d, code = %b%b%b%b%b%b",addr,op,rs,rt,rd,shamt,func); #100 $finish; end endmodule
仿真结果
txt文档中是预期结果,控制台输出是实际结果。通过对比,两个结果相同。
pc.v
//输入:NPC代表的下一条指令的地址 //输出:"下一条指令" 即 "当前指令"。如果不reset,则根据clk输出当前指令PC的地址 `timescale 1ns / 1ns module PC( input [31:0] NPC, //NextPC计算单元 input clk, //时钟信号 input reset, //复位 output reg [31:0] PC //输出下一条指令的地址 ); initial begin PC <= 0000_0000; //为什么别人写的是 32'h00003000? end always@(posedge clk, posedge reset)//任何一个变动都可以触发 begin if(reset) PC <= 0000_0000;//为什么别人写的是 32'h00003000? else PC <= NPC; end endmodule
npc.v
//计算下一条指令的地址 //输入的PC是当前指令的地址 //输出的NPC是下一条指令的地址 module NextPC ( input [31:0] PC, input [31:0] imm16, //beq input [25:0] imm26, //j,jal input [31:0] rsd, //jr跳转至寄存器 input branch_ctr, input j_ctr, input jr_ctr, output reg [31:0] NPC, //下一条指令的地址 output [31:0] jalPC //jal跳转的地址 ); assign jalPC = PC + 4; always @(*) begin if(j_ctr) NPC <= {PC[31:28], imm26, 2'b0};//j指令 else if(jr_ctr) NPC <= rsd;//jr指令 else if(branch_ctr) NPC <= PC + 4 + $signed(imm16<<2);//beq指令,branch判断是否执行分支 else NPC = PC + 4; end endmodule
pc_npc_tb
debug改出来的,不明白为什么NPC是是wire类型,而不是reg类型
//用于测试pc和npc `timescale 1ns/1ns //仿真时间单位/时间精度 `include "pc.v" `include "npc.v" module pc_npc_tb; wire [31:0] NPC; //下一条指令的地址,不明白为什么是wire类型而不是reg reg clk; reg reset; reg [31:0] imm16; //beq reg [25:0] imm26; //j,jal reg [31:0] rsd; //jr跳转至寄存器的寄存器值 reg branch_ctr; reg j_ctr; reg jr_ctr; wire [31:0] pc; wire [31:0] jalPC; //jal跳转的地址 PC mypc(NPC, clk, reset, pc); NextPC mynextpc(pc, imm16, imm26, rsd, ranch_ctr, j_ctr, jr_ctr,NPC,jalPC); always #5 clk = ~clk; //initial NPC=0; initial clk=0; initial reset=0; initial imm16=0; initial imm26=0; initial rsd=0; initial branch_ctr=0; initial j_ctr=0; initial jr_ctr=0; initial begin $monitor($time,,"NPC = %d, PC = %d",NPC, pc); #100 $finish; end endmodule
仿真结果
testbench里只是5ms改变一次clk,没有做其他测试,该测试仅可以看出PC可以正常执行PC+4。波形如下:
`timescale 1ns/1ns module mips( input clk, input reset ); //以下是每个模块的输出 //Control控制单元 wire [1:0]RegDst; //写寄存器的目标寄存器号来源:0-rt 1-rd wire ALUSrc; //第二个ALU操作数的来源 :0-读寄存器2 1-指令低16位的符号拓展 wire [1:0] MemToReg; //写入寄存器的数据来源 wire RegWrite; //寄存器写使能有效 wire MemWrite; //将数据写入到指定存储器单元中 wire PCSrc; //判断是否执行分支(PC+4 or PC+4+offset) wire [1:0]ExtOp; //控制Extender的拓展方式 wire [2:0]ALUctr; //3bit 控制ALU的运算 wire j_ctr; //控制PC是否转移到J指令指示的地址 wire jr_ctr; //jr指令 wire DMSrc; wire [15:0]immediate16;//address wire [25:0]immediate26;//J指令 26位跳转地址 //IM指令存储器 wire [5:0] opcode; wire [4:0] rs; wire [4:0] rt; wire [4:0] rd; wire [5:0] shamt; wire [5:0] func; //GPR寄存器堆 wire [31:0] rd1; //读出的数据1 wire [31:0] rd2; //读出的数据2 //DM数据存储器 wire [31:0] dout; //读出的数据 //ALU算数逻辑单元 wire [31:0] Result; wire zero; //Ext拓展单元 wire [31:0] EXTout; //MUX多路选择器 wire [31:0] DataToDM; wire [31:0] DataToALU; wire [31:0] RegWriteData; wire [4:0] RegWriteAddress; //NPC wire [31:0] NPC; //下一条指令的地址 wire [31:0] jalPC; //jal跳转的地址 //PC wire [31:0] PC; //PC输出下一条指令的地址 //以下是各个模块的实例化 就是用导线把他们接在一起 注意函数参数要与上方的输出相同 否则会出现变量未定义的问题 control Control(opcode[5:0],zero,func[5:0],RegDst[1:0],ALUSrc,MemToReg[1:0],RegWrite,MemWrite,PCSrc,ExtOp[1:0],ALUctr[2:0],j_ctr,jr_ctr,DMSrc); /*opcode[5:0], zero, //beq指令 func[5:0], RegDst[1:0], //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc, //第二个ALU操作数的来源 MemToReg[1:0], //写入寄存器的数据来源 RegWrite, //寄存器写使能有效 MemWrite, //将数据写入到指定存储器单元中 PCSrc, //判断是否执行分支(PC+4 or PC+4+offset) ExtOp[1:0], //控制Extender的拓展方式 ALUctr[2:0], //3bit 控制ALU的运算 j_ctr, //控制PC是否转移到J指令指示的地址 jr_ctr, //jr指令 DMSrc */ IM_4k im (PC,opcode[5:0],rs[4:0],rt[4:0],rd[4:0],shamt[4:0],func[5:0],immediate16[15:0],immediate26[25:0]); /* addr[31:0], //输入 与上一个模块以导线相连 要取出的指令地址 op[5:0], //输出 6位操作码op rs[4:0], //输出 源1 rt[4:0], //输出 源2 rd[4:0], //输出 目的 shamt[4:0], //只用于移位指令sll func[5:0], //指出ALU的功能 immediate16[15:0], //address immediate26[25:0] //J指令 26位跳转地址 */ GPR gpr (PC,clk,reset,RegWrite,rs[4:0],rt[4:0],RegWriteAddress,RegWriteData,rd1[31:0],rd2[31:0]); /* WPC[31:0], //writePC clk, reset, RegWrite, //寄存器写使能 ra1[4:0], //ReadAddress1 ra2[4:0], //ReadAddress2 wa[4:0], //RegWriteAddress wd[31:0], //WriteData rd1[31:0], //ReadData1 rd2[31:0] //ReadData2 */ dm_4k dm (PC[31:0],Result[31:0],DataToDM[31:0],MemWrite,clk,reset,dout[31:0]); /* pc[31:0], //仅用于控制台输出看着方便 addr[31:0], //地址 din[31:0], //datain MemWrite, //写使能 clk, reset, dout[31:0] //dataout */ ALU Alu (rd1[31:0],DataToALU,5'b0,ALUctr[2:0],Result[31:0],zero); /* A[31:0], //输入32位A B[31:0], //输入32位B sl[4:0], //左移的位数 sl是移位指令 没用 ALUctr[2:0], //3位ALU控制信号 Result[31:0], //因为要在always里面赋值,所以定义为reg zero //零标志位 */ EXT ext (immediate16[15:0],ExtOp[1:0],EXTout[31:0]); /* EXTin[15:0], //输入EXT的数据 ExtOp[1:0], EXTout[31:0] //拓展后输出的数据 */ //计算写入DM的数据 mutiplexer32_1 MuxDataToDM(DMSrc,rd2[31:0],32'b0,DataToDM); //计算参与运算的ALU数据2 mutiplexer32_1 MuxDataToALU(ALUSrc,rd2[31:0],EXTout,DataToALU); /* control,//ALU数据2来源:0-读寄存器2 1-指令低16位的符号拓展 din0 [31:0], //读寄存器2 din1 [31:0], //指令低16位的符号拓展 out32_1 [31:0] */ //RegWriteData的计算 mutiplexer32_2 mux32_2(MemToReg,Result,dout,jalPC,32'b0,RegWriteData); /* control [1:0], //MemToReg: 00ALU运算结果(包含高16拓展\普通运算) 01数据存储器的输出 10JAL跳转的目的地址 din0 [31:0], //ALU结果 din1 [31:0], //DM输出 din2 [31:0], //JAL跳转目的地址 din3 [31:0],//没用 out32_2 [31:0] */ //RegWriteAddress的计算 mutiplexer5 mux5(RegDst,rt,rd,5'b11111,RegWriteAddress); /* control [1:0],//Regdst写寄存器的目标寄存器号来源 0-rt 1-rd din0 [4:0], //rt lui应该写到rt din1 [4:0], //rd din2 [4:0], out5 [4:0] */ NextPC npc (PC[31:0],immediate16[15:0],immediate26[25:0],rd1[31:0],PCSrc,j_ctr,jr_ctr,NPC[31:0],jalPC[31:0]); /* PC[31:0], imm16[15:0], //beq imm26[25:0], //j,jal rsd[31:0], //jr跳转至寄存器 branch_ctr, j_ctr, jr_ctr, NPC[31:0], //下一条指令的地址 jalPC[31:0] //jal跳转的地址 */ Pc mypc (NPC[31:0],clk,reset,PC[31:0]); /* NPC[31:0], //NextPC计算单元 clk, //时钟信号 reset, //复位 PC[31:0] //输出下一条指令的地址 */ endmodule
//用于测试整个处理器 `timescale 1ns/1ns //仿真时间单位/时间精度 `include "mips.v" module mips_tb; reg clk; reg reset; mips mymips(clk, reset); always #10 clk = ~clk; initial clk = 0; initial begin $monitor($time,,"(mips_tb)clk = %b",clk); $display("display is Valid"); #2000 $finish; end endmodule
//控制单元controller `timescale 1ns/1ns /* ALUOp 3'b000: Result=($signed(A)<$signed(B))?32'h0000_0001:32'h0000_0000;//若A<B,则result=1 3'b001: Result=A|B;//或 3'b010: Result=A+B;//加 3'b011: Result={B[15:0],16'h0000};//拓展到高16位 3'b101: Result=B<<sl;//逻辑左移 3'b110: Result=A-B;//减 3'b111: Result = 32'h0000_0000//default EXTOp 2'b00:无符号16to32 2'b01:有符号16to32 2'b10:拓展到高16位 */ module control( input [5:0] opcode, input zero, //beq指令 input [5:0] func, output reg [1:0]RegDst, //写寄存器的目标寄存器号来源:0-rt 1-rd output reg ALUSrc, //第二个ALU操作数的来源 output reg [1:0] MemToReg, //写入寄存器的数据来源 output reg RegWrite, //寄存器写使能有效 output reg MemWrite, //将数据写入到指定存储器单元中 output reg PCSrc, //判断是否执行分支(PC+4 or PC+4+offset) output reg [1:0]ExtOp, //控制Extender的拓展方式 output reg [2:0]ALUctr, //3bit 控制ALU的运算 output reg j_ctr, //控制PC是否转移到J指令指示的地址 output reg jr_ctr, //jr指令 output reg DMSrc ); always@(opcode,zero,func) begin case(opcode) 6'b000000://addu subu slt jr begin if(func==6'b100001)//addu begin RegDst = 2'b01; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //第二个ALU操作数的来源 MemToReg = 2'b0; //写入寄存器的数据来源 RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) ExtOp = 2'b0; //控制Extender的拓展方式 ALUctr = 3'b010; //3bit 控制ALU的运算 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) ADDU"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end else if(func==6'b100011)//subu begin RegDst = 2'b01; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //第二个ALU操作数的来源 MemToReg = 2'b0; //写入寄存器的数据来源 RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) ExtOp = 2'b0; //控制Extender的拓展方式 ALUctr = 3'b110; //3bit 控制ALU的运算 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) SUBU"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end else if(func==6'b101010)//slt begin RegDst = 2'b01; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //第二个ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b0; //写入寄存器的数据来源:0-ALU计算结果 1-RAM RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b0; //控制Extender的拓展方式 ALUctr = 3'b000; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) SLT"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end else if(func==6'b001000)//jr begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //第二个ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b0; //写入寄存器的数据来源:0-ALU计算结果 1-RAM RegWrite = 0; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b0; //控制Extender的拓展方式 ALUctr = 3'b111; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 1; //jr指令 DMSrc = 0; $display($time,,"(Control) JR"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end else//避免隐藏的锁存器 begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //第二个ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b0; //写入寄存器的数据来源:0-ALU计算结果 1-RAM RegWrite = 0; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b0; //控制Extender的拓展方式 ALUctr = 3'b111; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) DEFAULT"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end end 6'b001101://ori或立即数 begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 1; //第二个ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b0; //写入寄存器的数据来源:0-ALU计算结果 1-RAM RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b0; //控制Extender的拓展方式 ALUctr = 3'b001; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) ORI"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b100011://lw 从基址+偏移处内存中读取数据,放入rt寄存器中 begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 1; //第二个ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b01; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b10; //控制Extender的拓展方式 ALUctr = 3'b010; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) LW"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b101011://sw 把寄存器中的数据写入基址+偏移的内存中 偏移的拓展是有符号还是无符号? begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 1; //第二个ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b00; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 0; //寄存器写使能有效 MemWrite = 1; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b01; //控制Extender的拓展方式 ALUctr = 3'b010; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) SW"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b000100://beq 相等则(16bitaddress需要拓展并且左移两位)分支指令 注意需要ALU的0标志位 begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //第二个ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b00; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 0; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 if(zero==1) PCSrc = 1; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 已经在NPC中实现左移两位 else PCSrc = 0; ExtOp = 2'b01; //控制Extender的拓展方式00无符号16to32 01:有符号16to32 10拓展到高16 ALUctr = 3'b111; //此处zero标志位单独判断 因此不需要ALUctr的控制 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) BEQ"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b001111://lui 立即数加载至寄存器高16位 begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 1; //(此标记并未直接控制ALU)第二ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b00; //写入寄存器的数据来源:00-ALU计算结果 01-RAM 02-JAL RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b00; //控制Extender的拓展方式00无符号16to32 01:有符号16to32 10拓展到高16 ALUctr = 3'b011; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //控制PC是否转移到J指令指示的地址 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) LUI"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b000010://j 无条件跳转 begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //(此标记并未直接控制ALU)第二ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b00; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 0; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b00; //控制Extender的拓展方式00无符号16to32 01:有符号16to32 10拓展到高16 ALUctr = 3'b111; //3bit 控制ALU的运算 见顶部注释 j_ctr = 1; //在npc(用于计算下一条指令)中左移两位 并拼接剩余部分 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) J"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b001000://addi 加立即数 支持溢出 ??怎么支持溢出??溢出之后存储在其他的寄存器中吗??如何体现addi和addiu的区别? begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 1; //(此标记并未直接控制ALU)第二ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b00; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b01; //控制Extender的拓展方式00无符号16to32 01:有符号16to32 10拓展到高16 ALUctr = 3'b010; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //在npc(用于计算下一条指令)中左移两位 并拼接剩余部分 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) ADDI"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b001001://addiu begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 1; //(此标记并未直接控制ALU)第二ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b00; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b01; //控制Extender的拓展方式00无符号16to32 01:有符号16to32 10拓展到高16 ALUctr = 3'b010; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //在npc(用于计算下一条指令)中左移两位 并拼接剩余部分 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) ADDIU"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end 6'b000011://jal begin RegDst = 2'b10; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //(此标记并未直接控制ALU)第二ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b10; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 1; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b00; //控制Extender的拓展方式00无符号16to32 01:有符号16to32 10拓展到高16 ALUctr = 3'b111; //3bit 控制ALU的运算 见顶部注释 j_ctr = 1; //在npc(用于计算下一条指令)中左移两位 并拼接剩余部分 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) JAL"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end default: begin RegDst = 2'b00; //写寄存器的目标寄存器号来源:0-rt 1-rd ALUSrc = 0; //(此标记并未直接控制ALU)第二ALU操作数的来源:0-读寄存器2 1-指令低16位的符号拓展 MemToReg = 2'b00; //写入寄存器的数据来源:00-ALU计算结果 01-RAM RegWrite = 0; //寄存器写使能有效 MemWrite = 0; //将数据写入到指定存储器单元中 PCSrc = 0; //判断是否执行分支(PC+4 or PC+4+offset) 0-不执行 1-执行 ExtOp = 2'b00; //控制Extender的拓展方式00无符号16to32 01:有符号16to32 10拓展到高16 ALUctr = 3'b111; //3bit 控制ALU的运算 见顶部注释 j_ctr = 0; //在npc(用于计算下一条指令)中左移两位 并拼接剩余部分 jr_ctr = 0; //jr指令 DMSrc = 0; $display($time,,"(Control) DEFAULT2"); $display($time,,"(CTRL)RegDst=%b ALUSrc=%b MemToReg=%b RegWrite=%b MemWrite=%b PCSrc=%b ExtOp=%b ALUctr=%b j_ctr=%b jr_ctr=%b DMSrc=%b",RegDst,ALUSrc,MemToReg,RegWrite,MemWrite,PCSrc,ExtOp,ALUctr,j_ctr,jr_ctr,DMSrc); end endcase end endmodule
//多路选择器 `timescale 1ns / 1ns //注意组合逻辑(敏感列表)用=赋值,时序逻辑(clk控制)用<=赋值 //二选一 32bit module mutiplexer32_1( input control, input [31:0] din0, input [31:0] din1, output reg [31:0] out32_1 ); always @(*) begin if(control==0) out32_1 = din0; else out32_1 = din1; $display($time,,"(MUX DataTo DM/ALU)control = %b, din0 = %b, din1 = %b, out = %b", control, din0, din1, out32_1); end endmodule //四选一 32bit 00ALU运算结果(包含高16拓展\普通运算) 01数据存储器的输出 10JAL跳转的目的地址 11没用 module mutiplexer32_2( input [1:0]control, input [31:0] din0, //00ALU运算结果(包含高16拓展\普通运算) input [31:0] din1, //01数据存储器的输出 input [31:0] din2, //10JAL跳转的目的地址 input [31:0] din3, //没用到 output reg [31:0] out32_2 ); always @(*) begin if(control==0) out32_2=din0; else if(control==2'b01) out32_2=din1; else if(control==2'b10) out32_2=din2; else if(control==2'b11) out32_2=din3; $display($time,,"(MUX RegWriteData)control = %b, din0 = %b, din1 = %b, din2 = %b, out = %b", control, din0, din1, din2, out32_2); end endmodule //3选1 5bit module mutiplexer5 ( input [1:0] control, //Regdst写寄存器的目标寄存器号来源 0-rt 1-rd input [4:0] din0, //rt (lui) input [4:0] din1, //rd input [4:0] din2, output reg [4:0] out5 ); always @(*) begin if(control==0) out5=din0; else if(control==2'b01) out5=din1; else if(control==2'b10) out5=din2; $display($time,,"(MUX RegWriteAddr)control = %b, din0 = %b, din1 = %b, out = %b", control, din0, din1, out5); end endmodule
`timescale 1ns / 1ns /* * Module Name: ALU * File Created: 2019-4-4 16:11:12 * Notes: * 没有添加溢出判断 * OF为溢出标志位(有溢出为1,无溢出为0)如果溢出 要用两个GPR表示这个结果 */ //注意组合逻辑(敏感列表)用=赋值,时序逻辑(clk控制)用<=赋值 module ALU( input [31:0] A, //输入32位A input [31:0] B, //输入32位B input [4:0] sl, //左移的位数 input [2:0] ALUctr, //3位ALU控制信号 output reg[31:0] Result, //因为要在always里面赋值,所以定义为reg output reg zero //零标志位 ); always@(*) //(*)表示自动添加敏感列表 begin case(ALUctr) //决定ALU操作 3'b000: begin Result=($signed(A)<$signed(B))?32'h0000_0001:32'h0000_0000;//若A<B,则result=1 $display($time,,"(ALU)(if a<b,res=1)A = %b, B = %b, Result = %b", A, B, Result); end 3'b001: begin Result=A|B;//或 $display($time,,"(ALU)(or)A = %b, B = %b, Result = %b", A, B, Result); end 3'b010: begin Result=A+B;//加 $display($time,,"(ALU)(add)A = %b, B = %b, Result = %b", A, B, Result); end 3'b011: begin Result={B[15:0],16'h0000};//拓展到高16位 $display($time,,"(ALU)(16toUp32)A = %b, B = %b, Result = %b", A, B, Result); end 3'b101: begin Result=B<<sl;//逻辑左移 $display($time,,"(ALU)(<<)A = %b, B = %b, Result = %b", A, B, Result); end 3'b110: begin Result=A-B;//减 $display($time,,"(ALU)(sub)A = %b, B = %b, Result = %b", A, B, Result); end default: begin Result<=32'h0000_0000; $display($time,,"(ALU)(DEFAULT)"); end endcase if(A==B) zero=1;//计算零标志位 else zero=0; end endmodule
//Extender位拓展 /* EXTOp 2'b00:无符号16to32 2'b01:有符号16to32 2'b10:拓展到高16位 */ //注意组合逻辑(always敏感列表)用=赋值,时序逻辑(clk控制)用<=赋值 `timescale 1ns / 1ns module EXT( input [15:0] EXTin,//输入EXT的数据 input [1:0]ExtOp, output reg [31:0] EXTout//拓展后输出的数据 ); always@(*) begin case(ExtOp) 2'b00://无符号16to32 begin EXTout = {16'b0,EXTin[15:0]}; $display($time,,"(EXT)EXTOp = 00; EXTin = %b EXTout = %b",EXTin, EXTout); end 2'b01://有符号16to32 begin $display($time,,"(EXT)EXTOp = 01; EXTin = %b EXTout = %b",EXTin, EXTout); if(EXTin[15]==1) EXTout = {16'b1111_1111_1111_1111,EXTin[15:0]}; else EXTout = {16'b0000_0000_0000_0000,EXTin[15:0]}; end 2'b10://拓展至高16 begin $display($time,,"(EXT)EXTOp = 10; EXTin = %b EXTout = %b",EXTin, EXTout); EXTout = {EXTin[15:0],16'b0000_0000_0000_0000}; end default: begin $display($time,,"(EXT)EXTOp = default"); EXTout = 32'b0; end endcase end endmodule
`timescale 1ns/1ns //IM 指令存储器 与上一个模块以导线相连wire输入 将本模块数据输出到下一个模块reg输出 module IM_4k( input [31:0]addr,//与上一个模块以导线相连 32bit 要取出额的指令地址 output reg[5:0]op,//输出 6位操作码op output reg[4:0]rs,//输出 源1 output reg[4:0]rt,//输出 源2 output reg[4:0]rd,//输出 目的 output reg[4:0]shamt,//只用于移位指令sll output reg[5:0]func,//指出ALU的功能 output reg[15:0]immediate16,//address output reg[25:0]immediate26//J指令 26位跳转地址 ); reg [31:0]im[1023:0];//im存储读取的所有指令 2^10 wire [11:2]address;//因为im一共只有2^10,所以address的位宽为10 assign address=addr[11:2];//按字节寻址,address自动取addr的左移两位 initial begin $readmemh("code.txt",im);//从文件中读取指令 $display("(im)Finish Read File: %p",im); end always @(*)//输出指令的各个部分 begin op=im[address][31:26]; rs=im[address][25:21]; rt=im[address][20:16]; rd=im[address][15:11]; shamt=im[address][10:6]; func=im[address][5:0]; immediate16=im[address][15:0]; immediate26=im[address][25:0]; $display($time,,"(IM)Current Code:%b %b %b %b %b %b ; TheAddrOfCurCode = %b ",op,rs,rt,rd,shamt,func,addr); end endmodule
`timescale 1ns / 1ns //计算下一条指令的地址 //输入的PC是当前指令的地址 //输出的NPC是下一条指令的地址 module NextPC ( input [31:0] PC, input [15:0] imm16, //beq input [25:0] imm26, //j,jal input [31:0] rsd, //jr跳转至寄存器 input branch_ctr, input j_ctr, input jr_ctr, output reg [31:0] NPC, //下一条指令的地址 output [31:0] jalPC //jal跳转的地址 ); assign jalPC = PC + 4; always @(*) begin if(j_ctr) NPC <= {PC[31:28], imm26, 2'b0};//j指令 自带左移两位 else if(jr_ctr) NPC <= rsd;//jr指令 else if(branch_ctr) NPC <= PC + 4 + $signed(imm16<<2);//beq指令,branch判断是否执行分支 自带左移两位 else NPC = PC + 4; $display($time,,"(NPC)CurPCAddr:%b NextPcAddr:%b",PC,NPC); end endmodule
//输入:NPC代表的下一条指令的地址 //输出:"下一条指令" 即 "当前指令"。如果不reset,则根据clk输出当前指令PC的地址 `timescale 1ns / 1ns module Pc( input [31:0] NPC, //NextPC计算单元 input clk, //时钟信号 input reset, //复位 output reg [31:0] PC //输出下一条指令的地址 ); initial begin PC <= 0000_0000; //为什么别人写的是 32'h00003000? end always@(posedge clk, posedge reset)//任何一个变动都可以触发 begin if(reset) PC <= 0000_0000;//为什么别人写的是 32'h00003000? else PC <= NPC; $display($time,,"(PC)NextPcAddr%b",PC); end endmodule
`timescale 1ns / 1ns //DM数据寄存器 module dm_4k( input [31:0] pc,//仅用于控制台输出看着方便 input [31:0] addr,//地址 input [31:0] din,//datain input MemWrite,//写使能 input clk, input reset, output [31:0] dout//dataout ); wire [11:2] address; //以字为单位的地址,因为寄存器是1024"字" assign address = addr[11:2]; reg[31:0] dm[1023:0]; //32bit*1024字的数据存储器 assign dout = dm[address];//始终输出 integer i; initial begin for(i = 1; i < 1024; i = i + 1) dm[i] <= 0;//初始化数据存储器为0 end always@(posedge clk, posedge reset) begin if(reset) begin for(i = 1; i < 1024; i = i + 1) dm[i] <= 0; end else begin if(MemWrite) begin dm[address] <= din; $monitor($time,,"(DM MemWrite)PC%b: dmAddr%b <= Data%b", pc, addr, din); end end end endmodule
//GPR寄存器堆 `timescale 1ns / 1ns //注意组合逻辑(always敏感列表)用=赋值,时序逻辑(clk控制)用<=赋值 module GPR( input [31:0] WPC,//writePC 仅用于输出 input clk, input reset, input RegWrite,//写使能 input [4:0] ra1,//ReadAddress1 input [4:0] ra2,//ReadAddress2 input [4:0] wa,//WriteAddress input [31:0]wd,//WriteData output [31:0] rd1,//ReadData1 output [31:0] rd2//ReadData2 ); reg[31:0] regfile[31:0];//定义32个 32-bit寄存器 assign rd1 = regfile[ra1];//第一个读出的数据 assign rd2 = regfile[ra2];//第二个读出的数据 integer i; //integer flag = 0; initial begin for(i = 0; i < 32; i = i + 1) regfile[i] <= 0; end //时序逻辑 always@(posedge clk, posedge reset) begin if(reset) begin for(i = 0; i < 32; i = i + 1) regfile[i] <= 0; end else if(RegWrite==1 && wa != 0) begin regfile[wa] <= wd;//写入数据 $display($time,,"(Write GPR)PC%b: WriteAddress%b <= Data%b", WPC, wa, wd); #1 begin $display($time,,"(Show GPR)"); for(i = 0; i < 32; i = i + 1) begin $display($time,,"GPR%d = %h", i, regfile[i]); end end end else if(RegWrite==0)//写使能无效 begin $display($time,,"(GPR)Write:false"); end else//写使能有效但是寄存器地址为0 begin $display($time,,"(GPR)DEFAULT"); end end endmodule
run -all # (im)Finish Read File: '{x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, # x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, 1007157248, 135266319, 285802497, 19679265, 30177313, 28078113, 28076065, 28141601, 25978913, 32458785, 17317921, 17317921, 32260129, 28074019, 900530177, 1007484929, 1007419393, 889935189, 21581859, 17387553, 1007222785, 1007157503} # display is Valid # 0 (MUX RegWriteAddr)control = xx, din0 = xxxxx, din1 = xxxxx, out = xxxxx # 0 (MUX RegWriteData)control = xx, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX DataTo DM/ALU)control = x, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 0 (ALU)(DEFAULT) # 0 (MUX RegWriteAddr)control = xx, din0 = xxxxx, din1 = xxxxx, out = xxxxx # 0 (MUX RegWriteData)control = xx, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX DataTo DM/ALU)control = x, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 0 (ALU)(DEFAULT) # 0 (IM)Current Code:xxxxxx xxxxx xxxxx xxxxx xxxxx xxxxxx ; TheAddrOfCurCode = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (IM)Current Code:xxxxxx xxxxx xxxxx xxxxx xxxxx xxxxxx ; TheAddrOfCurCode = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (IM)Current Code:xxxxxx xxxxx xxxxx xxxxx xxxxx xxxxxx ; TheAddrOfCurCode = zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz # 0 (Control) DEFAULT2 # 0 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (Control) DEFAULT2 # 0 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 00000000000000000000000000000000, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX RegWriteAddr)control = 00, din0 = xxxxx, din1 = xxxxx, out = xxxxx # 0 (MUX RegWriteData)control = 00, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (EXT)EXTOp = 00; EXTin = xxxxxxxxxxxxxxxx EXTout = 0000000000000000xxxxxxxxxxxxxxxx # 0 (ALU)(DEFAULT) # 0 (MUX RegWriteAddr)control = 00, din0 = xxxxx, din1 = xxxxx, out = xxxxx # 0 (MUX RegWriteData)control = 00, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (EXT)EXTOp = 00; EXTin = xxxxxxxxxxxxxxxx EXTout = 0000000000000000xxxxxxxxxxxxxxxx # 0 (ALU)(DEFAULT) # 0 (NPC)CurPCAddr:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NextPcAddr:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 00000000000000000000000000000000, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (NPC)CurPCAddr:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx NextPcAddr:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 0000000000000000xxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 0000000000000000xxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 0 (IM)Current Code:001111 00000 01000 00000 00011 111111 ; TheAddrOfCurCode = 00000000000000000000000000000000 # 0 (NPC)CurPCAddr:00000000000000000000000000000000 NextPcAddr:00000000000000000000000000000100 # 0 (IM)Current Code:001111 00000 01000 00000 00011 111111 ; TheAddrOfCurCode = 00000000000000000000000000000000 # 0 (NPC)CurPCAddr:00000000000000000000000000000000 NextPcAddr:00000000000000000000000000000100 # 0 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000000000000000000000000000 # 0 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000000000000000000000000000 # 0 (ALU)(DEFAULT) # 0 (ALU)(DEFAULT) # 0 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 0 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 0000000000000000xxxxxxxxxxxxxxxx, out = 00000000000000000000000000000000 # 0 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 0 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 0000000000000000xxxxxxxxxxxxxxxx, out = 00000000000000000000000000000000 # 0 (MUX RegWriteAddr)control = 00, din0 = 01000, din1 = 00000, out = 01000 # 0 (Control) LUI # 0 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (EXT)EXTOp = 00; EXTin = 0000000011111111 EXTout = 00000000000000000000000011111111 # 0 (MUX RegWriteAddr)control = 00, din0 = 01000, din1 = 00000, out = 01000 # 0 (Control) LUI # 0 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (EXT)EXTOp = 00; EXTin = 0000000011111111 EXTout = 00000000000000000000000011111111 # 0 (ALU)(DEFAULT) # 0 (NPC)CurPCAddr:00000000000000000000000000000000 NextPcAddr:00000000000000000000000000000100 # 0 (ALU)(DEFAULT) # 0 (NPC)CurPCAddr:00000000000000000000000000000000 NextPcAddr:00000000000000000000000000000100 # 0 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000000000000, Result = 00000000000000000000000000000000 # 0 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000000000000, Result = 00000000000000000000000000000000 # 0 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000011111111, out = 00000000000000000000000011111111 # 0 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000011111111, out = 00000000000000000000000011111111 # 0 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000011111111, Result = 00000000111111110000000000000000 # 0 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000011111111, Result = 00000000111111110000000000000000 # 0 (Control) LUI # 0 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (Control) LUI # 0 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (Control) LUI # 0 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000111111110000000000000000 # 0 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000111111110000000000000000 # 0 (Control) LUI # 0 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 0 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000000000000000000000000000 # 0 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000000000000000000000000000 # 0 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000011111111, Result = 00000000111111110000000000000000 # 0 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000011111111, Result = 00000000111111110000000000000000 # 0 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000111111110000000000000000 # 0 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000000100, out = 00000000111111110000000000000000 # 0 (mips_tb)clk = 0 # 10 (Write GPR)PC00000000000000000000000000000000: WriteAddress01000 <= Data00000000111111110000000000000000 # 10 (PC)NextPcAddr00000000000000000000000000000000 # 10 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000001000, out = 00000000111111110000000000000000 # 10 (MUX DataTo DM/ALU)control = 0, din0 = 00000000111111110000000000000000, din1 = 00000000000000000000000000000000, out = 00000000111111110000000000000000 # 10 (MUX DataTo DM/ALU)control = 1, din0 = 00000000111111110000000000000000, din1 = 00000000000000000000000011111111, out = 00000000000000000000000011111111 # 10 (IM)Current Code:001111 00000 01001 00000 00000 000001 ; TheAddrOfCurCode = 00000000000000000000000000000100 # 10 (NPC)CurPCAddr:00000000000000000000000000000100 NextPcAddr:00000000000000000000000000001000 # 10 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 10 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000011111111, out = 00000000000000000000000011111111 # 10 (MUX RegWriteAddr)control = 00, din0 = 01001, din1 = 00000, out = 01001 # 10 (Control) LUI # 10 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 10 (EXT)EXTOp = 00; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 10 (NPC)CurPCAddr:00000000000000000000000000000100 NextPcAddr:00000000000000000000000000001000 # 10 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 10 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000000000001, Result = 00000000000000010000000000000000 # 10 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000001000, out = 00000000000000010000000000000000 # 10 (mips_tb)clk = 1 # 11 (Show GPR) # 11 GPR 0 = 00000000 # 11 GPR 1 = 00000000 # 11 GPR 2 = 00000000 # 11 GPR 3 = 00000000 # 11 GPR 4 = 00000000 # 11 GPR 5 = 00000000 # 11 GPR 6 = 00000000 # 11 GPR 7 = 00000000 # 11 GPR 8 = 00ff0000 # 11 GPR 9 = 00000000 # 11 GPR 10 = 00000000 # 11 GPR 11 = 00000000 # 11 GPR 12 = 00000000 # 11 GPR 13 = 00000000 # 11 GPR 14 = 00000000 # 11 GPR 15 = 00000000 # 11 GPR 16 = 00000000 # 11 GPR 17 = 00000000 # 11 GPR 18 = 00000000 # 11 GPR 19 = 00000000 # 11 GPR 20 = 00000000 # 11 GPR 21 = 00000000 # 11 GPR 22 = 00000000 # 11 GPR 23 = 00000000 # 11 GPR 24 = 00000000 # 11 GPR 25 = 00000000 # 11 GPR 26 = 00000000 # 11 GPR 27 = 00000000 # 11 GPR 28 = 00000000 # 11 GPR 29 = 00000000 # 11 GPR 30 = 00000000 # 11 GPR 31 = 00000000 # 20 (mips_tb)clk = 0 # 30 (Write GPR)PC00000000000000000000000000000100: WriteAddress01001 <= Data00000000000000010000000000000000 # 30 (PC)NextPcAddr00000000000000000000000000000100 # 30 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000001100, out = 00000000000000010000000000000000 # 30 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000010000000000000000 # 30 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 30 (IM)Current Code:000000 01000 01001 01010 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000001000 # 30 (NPC)CurPCAddr:00000000000000000000000000001000 NextPcAddr:00000000000000000000000000001100 # 30 (MUX RegWriteAddr)control = 00, din0 = 01001, din1 = 01010, out = 01001 # 30 (Control) ADDU # 30 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 30 (EXT)EXTOp = 00; EXTin = 0101000000100001 EXTout = 00000000000000000101000000100001 # 30 (ALU)(16toUp32)A = 00000000111111110000000000000000, B = 00000000000000000000000000000001, Result = 00000000000000010000000000000000 # 30 (NPC)CurPCAddr:00000000000000000000000000001000 NextPcAddr:00000000000000000000000000001100 # 30 (MUX RegWriteAddr)control = 01, din0 = 01001, din1 = 01010, out = 01010 # 30 (ALU)(add)A = 00000000111111110000000000000000, B = 00000000000000000000000000000001, Result = 00000000111111110000000000000001 # 30 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000000, din1 = 00000000000000000101000000100001, out = 00000000000000010000000000000000 # 30 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000001100, out = 00000000111111110000000000000001 # 30 (ALU)(add)A = 00000000111111110000000000000000, B = 00000000000000010000000000000000, Result = 00000001000000000000000000000000 # 30 (MUX RegWriteData)control = 00, din0 = 00000001000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000001100, out = 00000001000000000000000000000000 # 30 (mips_tb)clk = 1 # 31 (Show GPR) # 31 GPR 0 = 00000000 # 31 GPR 1 = 00000000 # 31 GPR 2 = 00000000 # 31 GPR 3 = 00000000 # 31 GPR 4 = 00000000 # 31 GPR 5 = 00000000 # 31 GPR 6 = 00000000 # 31 GPR 7 = 00000000 # 31 GPR 8 = 00ff0000 # 31 GPR 9 = 00010000 # 31 GPR 10 = 00000000 # 31 GPR 11 = 00000000 # 31 GPR 12 = 00000000 # 31 GPR 13 = 00000000 # 31 GPR 14 = 00000000 # 31 GPR 15 = 00000000 # 31 GPR 16 = 00000000 # 31 GPR 17 = 00000000 # 31 GPR 18 = 00000000 # 31 GPR 19 = 00000000 # 31 GPR 20 = 00000000 # 31 GPR 21 = 00000000 # 31 GPR 22 = 00000000 # 31 GPR 23 = 00000000 # 31 GPR 24 = 00000000 # 31 GPR 25 = 00000000 # 31 GPR 26 = 00000000 # 31 GPR 27 = 00000000 # 31 GPR 28 = 00000000 # 31 GPR 29 = 00000000 # 31 GPR 30 = 00000000 # 31 GPR 31 = 00000000 # 40 (mips_tb)clk = 0 # 50 (Write GPR)PC00000000000000000000000000001000: WriteAddress01010 <= Data00000001000000000000000000000000 # 50 (PC)NextPcAddr00000000000000000000000000001000 # 50 (MUX RegWriteData)control = 00, din0 = 00000001000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000010000, out = 00000001000000000000000000000000 # 50 (IM)Current Code:000000 01010 01001 01010 00000 100011 ; TheAddrOfCurCode = 00000000000000000000000000001100 # 50 (NPC)CurPCAddr:00000000000000000000000000001100 NextPcAddr:00000000000000000000000000010000 # 50 (Control) SUBU # 50 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=110 j_ctr=0 jr_ctr=0 DMSrc=0 # 50 (EXT)EXTOp = 00; EXTin = 0101000000100011 EXTout = 00000000000000000101000000100011 # 50 (ALU)(add)A = 00000001000000000000000000000000, B = 00000000000000010000000000000000, Result = 00000001000000010000000000000000 # 50 (NPC)CurPCAddr:00000000000000000000000000001100 NextPcAddr:00000000000000000000000000010000 # 50 (ALU)(sub)A = 00000001000000000000000000000000, B = 00000000000000010000000000000000, Result = 00000000111111110000000000000000 # 50 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000000, din1 = 00000000000000000101000000100011, out = 00000000000000010000000000000000 # 50 (MUX RegWriteData)control = 00, din0 = 00000001000000010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000010000, out = 00000001000000010000000000000000 # 50 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000010000, out = 00000000111111110000000000000000 # 50 (mips_tb)clk = 1 # 51 (Show GPR) # 51 GPR 0 = 00000000 # 51 GPR 1 = 00000000 # 51 GPR 2 = 00000000 # 51 GPR 3 = 00000000 # 51 GPR 4 = 00000000 # 51 GPR 5 = 00000000 # 51 GPR 6 = 00000000 # 51 GPR 7 = 00000000 # 51 GPR 8 = 00ff0000 # 51 GPR 9 = 00010000 # 51 GPR 10 = 01000000 # 51 GPR 11 = 00000000 # 51 GPR 12 = 00000000 # 51 GPR 13 = 00000000 # 51 GPR 14 = 00000000 # 51 GPR 15 = 00000000 # 51 GPR 16 = 00000000 # 51 GPR 17 = 00000000 # 51 GPR 18 = 00000000 # 51 GPR 19 = 00000000 # 51 GPR 20 = 00000000 # 51 GPR 21 = 00000000 # 51 GPR 22 = 00000000 # 51 GPR 23 = 00000000 # 51 GPR 24 = 00000000 # 51 GPR 25 = 00000000 # 51 GPR 26 = 00000000 # 51 GPR 27 = 00000000 # 51 GPR 28 = 00000000 # 51 GPR 29 = 00000000 # 51 GPR 30 = 00000000 # 51 GPR 31 = 00000000 # 60 (mips_tb)clk = 0 # 70 (Write GPR)PC00000000000000000000000000001100: WriteAddress01010 <= Data00000000111111110000000000000000 # 70 (PC)NextPcAddr00000000000000000000000000001100 # 70 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000010100, out = 00000000111111110000000000000000 # 70 (ALU)(sub)A = 00000000111111110000000000000000, B = 00000000000000010000000000000000, Result = 00000000111111100000000000000000 # 70 (IM)Current Code:001101 01000 01011 01010 10101 010101 ; TheAddrOfCurCode = 00000000000000000000000000010000 # 70 (NPC)CurPCAddr:00000000000000000000000000010000 NextPcAddr:00000000000000000000000000010100 # 70 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 70 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000101000000100011, out = 00000000000000000000000000000000 # 70 (MUX RegWriteData)control = 00, din0 = 00000000111111100000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000010100, out = 00000000111111100000000000000000 # 70 (MUX RegWriteAddr)control = 01, din0 = 01011, din1 = 01010, out = 01010 # 70 (Control) ORI # 70 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=001 j_ctr=0 jr_ctr=0 DMSrc=0 # 70 (EXT)EXTOp = 00; EXTin = 0101010101010101 EXTout = 00000000000000000101010101010101 # 70 (NPC)CurPCAddr:00000000000000000000000000010000 NextPcAddr:00000000000000000000000000010100 # 70 (MUX RegWriteAddr)control = 00, din0 = 01011, din1 = 01010, out = 01011 # 70 (ALU)(or)A = 00000000111111110000000000000000, B = 00000000000000000000000000000000, Result = 00000000111111110000000000000000 # 70 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000101010101010101, out = 00000000000000000101010101010101 # 70 (MUX RegWriteData)control = 00, din0 = 00000000111111110000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000010100, out = 00000000111111110000000000000000 # 70 (ALU)(or)A = 00000000111111110000000000000000, B = 00000000000000000101010101010101, Result = 00000000111111110101010101010101 # 70 (MUX RegWriteData)control = 00, din0 = 00000000111111110101010101010101, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000010100, out = 00000000111111110101010101010101 # 70 (mips_tb)clk = 1 # 71 (Show GPR) # 71 GPR 0 = 00000000 # 71 GPR 1 = 00000000 # 71 GPR 2 = 00000000 # 71 GPR 3 = 00000000 # 71 GPR 4 = 00000000 # 71 GPR 5 = 00000000 # 71 GPR 6 = 00000000 # 71 GPR 7 = 00000000 # 71 GPR 8 = 00ff0000 # 71 GPR 9 = 00010000 # 71 GPR 10 = 00ff0000 # 71 GPR 11 = 00000000 # 71 GPR 12 = 00000000 # 71 GPR 13 = 00000000 # 71 GPR 14 = 00000000 # 71 GPR 15 = 00000000 # 71 GPR 16 = 00000000 # 71 GPR 17 = 00000000 # 71 GPR 18 = 00000000 # 71 GPR 19 = 00000000 # 71 GPR 20 = 00000000 # 71 GPR 21 = 00000000 # 71 GPR 22 = 00000000 # 71 GPR 23 = 00000000 # 71 GPR 24 = 00000000 # 71 GPR 25 = 00000000 # 71 GPR 26 = 00000000 # 71 GPR 27 = 00000000 # 71 GPR 28 = 00000000 # 71 GPR 29 = 00000000 # 71 GPR 30 = 00000000 # 71 GPR 31 = 00000000 # 80 (mips_tb)clk = 0 # 90 (Write GPR)PC00000000000000000000000000010000: WriteAddress01011 <= Data00000000111111110101010101010101 # 90 (PC)NextPcAddr00000000000000000000000000010000 # 90 (MUX RegWriteData)control = 00, din0 = 00000000111111110101010101010101, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000011000, out = 00000000111111110101010101010101 # 90 (MUX DataTo DM/ALU)control = 0, din0 = 00000000111111110101010101010101, din1 = 00000000000000000000000000000000, out = 00000000111111110101010101010101 # 90 (MUX DataTo DM/ALU)control = 1, din0 = 00000000111111110101010101010101, din1 = 00000000000000000101010101010101, out = 00000000000000000101010101010101 # 90 (IM)Current Code:001111 00000 01100 00000 00000 000001 ; TheAddrOfCurCode = 00000000000000000000000000010100 # 90 (NPC)CurPCAddr:00000000000000000000000000010100 NextPcAddr:00000000000000000000000000011000 # 90 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 90 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000101010101010101, out = 00000000000000000101010101010101 # 90 (MUX RegWriteAddr)control = 00, din0 = 01100, din1 = 00000, out = 01100 # 90 (Control) LUI # 90 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 90 (EXT)EXTOp = 00; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 90 (ALU)(or)A = 00000000000000000000000000000000, B = 00000000000000000101010101010101, Result = 00000000000000000101010101010101 # 90 (NPC)CurPCAddr:00000000000000000000000000010100 NextPcAddr:00000000000000000000000000011000 # 90 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000101010101010101, Result = 01010101010101010000000000000000 # 90 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 90 (MUX RegWriteData)control = 00, din0 = 00000000000000000101010101010101, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000011000, out = 00000000000000000101010101010101 # 90 (MUX RegWriteData)control = 00, din0 = 01010101010101010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000011000, out = 01010101010101010000000000000000 # 90 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000000000001, Result = 00000000000000010000000000000000 # 90 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000011000, out = 00000000000000010000000000000000 # 90 (mips_tb)clk = 1 # 91 (Show GPR) # 91 GPR 0 = 00000000 # 91 GPR 1 = 00000000 # 91 GPR 2 = 00000000 # 91 GPR 3 = 00000000 # 91 GPR 4 = 00000000 # 91 GPR 5 = 00000000 # 91 GPR 6 = 00000000 # 91 GPR 7 = 00000000 # 91 GPR 8 = 00ff0000 # 91 GPR 9 = 00010000 # 91 GPR 10 = 00ff0000 # 91 GPR 11 = 00ff5555 # 91 GPR 12 = 00000000 # 91 GPR 13 = 00000000 # 91 GPR 14 = 00000000 # 91 GPR 15 = 00000000 # 91 GPR 16 = 00000000 # 91 GPR 17 = 00000000 # 91 GPR 18 = 00000000 # 91 GPR 19 = 00000000 # 91 GPR 20 = 00000000 # 91 GPR 21 = 00000000 # 91 GPR 22 = 00000000 # 91 GPR 23 = 00000000 # 91 GPR 24 = 00000000 # 91 GPR 25 = 00000000 # 91 GPR 26 = 00000000 # 91 GPR 27 = 00000000 # 91 GPR 28 = 00000000 # 91 GPR 29 = 00000000 # 91 GPR 30 = 00000000 # 91 GPR 31 = 00000000 # 100 (mips_tb)clk = 0 # 110 (Write GPR)PC00000000000000000000000000010100: WriteAddress01100 <= Data00000000000000010000000000000000 # 110 (PC)NextPcAddr00000000000000000000000000010100 # 110 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000011100, out = 00000000000000010000000000000000 # 110 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000010000000000000000 # 110 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 110 (IM)Current Code:001111 00000 01101 00000 00000 000001 ; TheAddrOfCurCode = 00000000000000000000000000011000 # 110 (NPC)CurPCAddr:00000000000000000000000000011000 NextPcAddr:00000000000000000000000000011100 # 110 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 110 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 110 (MUX RegWriteAddr)control = 00, din0 = 01101, din1 = 00000, out = 01101 # 110 (NPC)CurPCAddr:00000000000000000000000000011000 NextPcAddr:00000000000000000000000000011100 # 110 (mips_tb)clk = 1 # 111 (Show GPR) # 111 GPR 0 = 00000000 # 111 GPR 1 = 00000000 # 111 GPR 2 = 00000000 # 111 GPR 3 = 00000000 # 111 GPR 4 = 00000000 # 111 GPR 5 = 00000000 # 111 GPR 6 = 00000000 # 111 GPR 7 = 00000000 # 111 GPR 8 = 00ff0000 # 111 GPR 9 = 00010000 # 111 GPR 10 = 00ff0000 # 111 GPR 11 = 00ff5555 # 111 GPR 12 = 00010000 # 111 GPR 13 = 00000000 # 111 GPR 14 = 00000000 # 111 GPR 15 = 00000000 # 111 GPR 16 = 00000000 # 111 GPR 17 = 00000000 # 111 GPR 18 = 00000000 # 111 GPR 19 = 00000000 # 111 GPR 20 = 00000000 # 111 GPR 21 = 00000000 # 111 GPR 22 = 00000000 # 111 GPR 23 = 00000000 # 111 GPR 24 = 00000000 # 111 GPR 25 = 00000000 # 111 GPR 26 = 00000000 # 111 GPR 27 = 00000000 # 111 GPR 28 = 00000000 # 111 GPR 29 = 00000000 # 111 GPR 30 = 00000000 # 111 GPR 31 = 00000000 # 120 (mips_tb)clk = 0 # 130 (Write GPR)PC00000000000000000000000000011000: WriteAddress01101 <= Data00000000000000010000000000000000 # 130 (PC)NextPcAddr00000000000000000000000000011000 # 130 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000100000, out = 00000000000000010000000000000000 # 130 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000010000000000000000 # 130 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 130 (IM)Current Code:001101 01101 01101 00000 00000 000001 ; TheAddrOfCurCode = 00000000000000000000000000011100 # 130 (NPC)CurPCAddr:00000000000000000000000000011100 NextPcAddr:00000000000000000000000000100000 # 130 (Control) ORI # 130 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=001 j_ctr=0 jr_ctr=0 DMSrc=0 # 130 (ALU)(16toUp32)A = 00000000000000010000000000000000, B = 00000000000000000000000000000001, Result = 00000000000000010000000000000000 # 130 (NPC)CurPCAddr:00000000000000000000000000011100 NextPcAddr:00000000000000000000000000100000 # 130 (ALU)(or)A = 00000000000000010000000000000000, B = 00000000000000000000000000000001, Result = 00000000000000010000000000000001 # 130 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000100000, out = 00000000000000010000000000000001 # 130 (mips_tb)clk = 1 # 131 (Show GPR) # 131 GPR 0 = 00000000 # 131 GPR 1 = 00000000 # 131 GPR 2 = 00000000 # 131 GPR 3 = 00000000 # 131 GPR 4 = 00000000 # 131 GPR 5 = 00000000 # 131 GPR 6 = 00000000 # 131 GPR 7 = 00000000 # 131 GPR 8 = 00ff0000 # 131 GPR 9 = 00010000 # 131 GPR 10 = 00ff0000 # 131 GPR 11 = 00ff5555 # 131 GPR 12 = 00010000 # 131 GPR 13 = 00010000 # 131 GPR 14 = 00000000 # 131 GPR 15 = 00000000 # 131 GPR 16 = 00000000 # 131 GPR 17 = 00000000 # 131 GPR 18 = 00000000 # 131 GPR 19 = 00000000 # 131 GPR 20 = 00000000 # 131 GPR 21 = 00000000 # 131 GPR 22 = 00000000 # 131 GPR 23 = 00000000 # 131 GPR 24 = 00000000 # 131 GPR 25 = 00000000 # 131 GPR 26 = 00000000 # 131 GPR 27 = 00000000 # 131 GPR 28 = 00000000 # 131 GPR 29 = 00000000 # 131 GPR 30 = 00000000 # 131 GPR 31 = 00000000 # 140 (mips_tb)clk = 0 # 150 (Write GPR)PC00000000000000000000000000011100: WriteAddress01101 <= Data00000000000000010000000000000001 # 150 (PC)NextPcAddr00000000000000000000000000011100 # 150 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000100100, out = 00000000000000010000000000000001 # 150 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000001, din1 = 00000000000000000000000000000000, out = 00000000000000010000000000000001 # 150 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000010000000000000001, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 150 (ALU)(or)A = 00000000000000010000000000000001, B = 00000000000000000000000000000001, Result = 00000000000000010000000000000001 # 150 (IM)Current Code:000000 01101 01100 01100 00000 100011 ; TheAddrOfCurCode = 00000000000000000000000000100000 # 150 (NPC)CurPCAddr:00000000000000000000000000100000 NextPcAddr:00000000000000000000000000100100 # 150 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000010000000000000000 # 150 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000010000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 150 (MUX RegWriteAddr)control = 00, din0 = 01100, din1 = 01100, out = 01100 # 150 (Control) SUBU # 150 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=110 j_ctr=0 jr_ctr=0 DMSrc=0 # 150 (EXT)EXTOp = 00; EXTin = 0110000000100011 EXTout = 00000000000000000110000000100011 # 150 (NPC)CurPCAddr:00000000000000000000000000100000 NextPcAddr:00000000000000000000000000100100 # 150 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01100, out = 01100 # 150 (ALU)(sub)A = 00000000000000010000000000000001, B = 00000000000000000000000000000001, Result = 00000000000000010000000000000000 # 150 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000010000000000000000, din1 = 00000000000000000110000000100011, out = 00000000000000010000000000000000 # 150 (MUX RegWriteData)control = 00, din0 = 00000000000000010000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000100100, out = 00000000000000010000000000000000 # 150 (ALU)(sub)A = 00000000000000010000000000000001, B = 00000000000000010000000000000000, Result = 00000000000000000000000000000001 # 150 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000100100, out = 00000000000000000000000000000001 # 150 (mips_tb)clk = 1 # 151 (Show GPR) # 151 GPR 0 = 00000000 # 151 GPR 1 = 00000000 # 151 GPR 2 = 00000000 # 151 GPR 3 = 00000000 # 151 GPR 4 = 00000000 # 151 GPR 5 = 00000000 # 151 GPR 6 = 00000000 # 151 GPR 7 = 00000000 # 151 GPR 8 = 00ff0000 # 151 GPR 9 = 00010000 # 151 GPR 10 = 00ff0000 # 151 GPR 11 = 00ff5555 # 151 GPR 12 = 00010000 # 151 GPR 13 = 00010001 # 151 GPR 14 = 00000000 # 151 GPR 15 = 00000000 # 151 GPR 16 = 00000000 # 151 GPR 17 = 00000000 # 151 GPR 18 = 00000000 # 151 GPR 19 = 00000000 # 151 GPR 20 = 00000000 # 151 GPR 21 = 00000000 # 151 GPR 22 = 00000000 # 151 GPR 23 = 00000000 # 151 GPR 24 = 00000000 # 151 GPR 25 = 00000000 # 151 GPR 26 = 00000000 # 151 GPR 27 = 00000000 # 151 GPR 28 = 00000000 # 151 GPR 29 = 00000000 # 151 GPR 30 = 00000000 # 151 GPR 31 = 00000000 # 160 (mips_tb)clk = 0 # 170 (Write GPR)PC00000000000000000000000000100000: WriteAddress01100 <= Data00000000000000000000000000000001 # 170 (PC)NextPcAddr00000000000000000000000000100000 # 170 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000101000, out = 00000000000000000000000000000001 # 170 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000001 # 170 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000110000000100011, out = 00000000000000000000000000000001 # 170 (IM)Current Code:000000 01111 01100 01000 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000100100 # 170 (NPC)CurPCAddr:00000000000000000000000000100100 NextPcAddr:00000000000000000000000000101000 # 170 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01000, out = 01000 # 170 (Control) ADDU # 170 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 170 (EXT)EXTOp = 00; EXTin = 0100000000100001 EXTout = 00000000000000000100000000100001 # 170 (ALU)(sub)A = 00000000000000000000000000000000, B = 00000000000000000000000000000001, Result = 11111111111111111111111111111111 # 170 (NPC)CurPCAddr:00000000000000000000000000100100 NextPcAddr:00000000000000000000000000101000 # 170 (ALU)(add)A = 00000000000000000000000000000000, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000001 # 170 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000100000000100001, out = 00000000000000000000000000000001 # 170 (MUX RegWriteData)control = 00, din0 = 11111111111111111111111111111111, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000101000, out = 11111111111111111111111111111111 # 170 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000101000, out = 00000000000000000000000000000001 # 170 (mips_tb)clk = 1 # 171 (Show GPR) # 171 GPR 0 = 00000000 # 171 GPR 1 = 00000000 # 171 GPR 2 = 00000000 # 171 GPR 3 = 00000000 # 171 GPR 4 = 00000000 # 171 GPR 5 = 00000000 # 171 GPR 6 = 00000000 # 171 GPR 7 = 00000000 # 171 GPR 8 = 00ff0000 # 171 GPR 9 = 00010000 # 171 GPR 10 = 00ff0000 # 171 GPR 11 = 00ff5555 # 171 GPR 12 = 00000001 # 171 GPR 13 = 00010001 # 171 GPR 14 = 00000000 # 171 GPR 15 = 00000000 # 171 GPR 16 = 00000000 # 171 GPR 17 = 00000000 # 171 GPR 18 = 00000000 # 171 GPR 19 = 00000000 # 171 GPR 20 = 00000000 # 171 GPR 21 = 00000000 # 171 GPR 22 = 00000000 # 171 GPR 23 = 00000000 # 171 GPR 24 = 00000000 # 171 GPR 25 = 00000000 # 171 GPR 26 = 00000000 # 171 GPR 27 = 00000000 # 171 GPR 28 = 00000000 # 171 GPR 29 = 00000000 # 171 GPR 30 = 00000000 # 171 GPR 31 = 00000000 # 180 (mips_tb)clk = 0 # 190 (Write GPR)PC00000000000000000000000000100100: WriteAddress01000 <= Data00000000000000000000000000000001 # 190 (PC)NextPcAddr00000000000000000000000000100100 # 190 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000101100, out = 00000000000000000000000000000001 # 190 (IM)Current Code:000000 01000 01000 01000 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000101000 # 190 (NPC)CurPCAddr:00000000000000000000000000101000 NextPcAddr:00000000000000000000000000101100 # 190 (MUX RegWriteAddr)control = 01, din0 = 01000, din1 = 01000, out = 01000 # 190 (ALU)(add)A = 00000000000000000000000000000001, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000010 # 190 (NPC)CurPCAddr:00000000000000000000000000101000 NextPcAddr:00000000000000000000000000101100 # 190 (Control) ADDU # 190 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 190 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000010, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000101100, out = 00000000000000000000000000000010 # 190 (mips_tb)clk = 1 # 191 (Show GPR) # 191 GPR 0 = 00000000 # 191 GPR 1 = 00000000 # 191 GPR 2 = 00000000 # 191 GPR 3 = 00000000 # 191 GPR 4 = 00000000 # 191 GPR 5 = 00000000 # 191 GPR 6 = 00000000 # 191 GPR 7 = 00000000 # 191 GPR 8 = 00000001 # 191 GPR 9 = 00010000 # 191 GPR 10 = 00ff0000 # 191 GPR 11 = 00ff5555 # 191 GPR 12 = 00000001 # 191 GPR 13 = 00010001 # 191 GPR 14 = 00000000 # 191 GPR 15 = 00000000 # 191 GPR 16 = 00000000 # 191 GPR 17 = 00000000 # 191 GPR 18 = 00000000 # 191 GPR 19 = 00000000 # 191 GPR 20 = 00000000 # 191 GPR 21 = 00000000 # 191 GPR 22 = 00000000 # 191 GPR 23 = 00000000 # 191 GPR 24 = 00000000 # 191 GPR 25 = 00000000 # 191 GPR 26 = 00000000 # 191 GPR 27 = 00000000 # 191 GPR 28 = 00000000 # 191 GPR 29 = 00000000 # 191 GPR 30 = 00000000 # 191 GPR 31 = 00000000 # 200 (mips_tb)clk = 0 # 210 (Write GPR)PC00000000000000000000000000101000: WriteAddress01000 <= Data00000000000000000000000000000010 # 210 (PC)NextPcAddr00000000000000000000000000101000 # 210 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000010, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000110000, out = 00000000000000000000000000000010 # 210 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000010, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000010 # 210 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000010, din1 = 00000000000000000100000000100001, out = 00000000000000000000000000000010 # 210 (ALU)(add)A = 00000000000000000000000000000010, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000011 # 210 (IM)Current Code:000000 01000 01000 01000 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000101100 # 210 (NPC)CurPCAddr:00000000000000000000000000101100 NextPcAddr:00000000000000000000000000110000 # 210 (Control) ADDU # 210 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 210 (ALU)(add)A = 00000000000000000000000000000010, B = 00000000000000000000000000000010, Result = 00000000000000000000000000000100 # 210 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000011, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000110000, out = 00000000000000000000000000000011 # 210 (Control) ADDU # 210 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 210 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000110000, out = 00000000000000000000000000000100 # 210 (mips_tb)clk = 1 # 211 (Show GPR) # 211 GPR 0 = 00000000 # 211 GPR 1 = 00000000 # 211 GPR 2 = 00000000 # 211 GPR 3 = 00000000 # 211 GPR 4 = 00000000 # 211 GPR 5 = 00000000 # 211 GPR 6 = 00000000 # 211 GPR 7 = 00000000 # 211 GPR 8 = 00000002 # 211 GPR 9 = 00010000 # 211 GPR 10 = 00ff0000 # 211 GPR 11 = 00ff5555 # 211 GPR 12 = 00000001 # 211 GPR 13 = 00010001 # 211 GPR 14 = 00000000 # 211 GPR 15 = 00000000 # 211 GPR 16 = 00000000 # 211 GPR 17 = 00000000 # 211 GPR 18 = 00000000 # 211 GPR 19 = 00000000 # 211 GPR 20 = 00000000 # 211 GPR 21 = 00000000 # 211 GPR 22 = 00000000 # 211 GPR 23 = 00000000 # 211 GPR 24 = 00000000 # 211 GPR 25 = 00000000 # 211 GPR 26 = 00000000 # 211 GPR 27 = 00000000 # 211 GPR 28 = 00000000 # 211 GPR 29 = 00000000 # 211 GPR 30 = 00000000 # 211 GPR 31 = 00000000 # 220 (mips_tb)clk = 0 # 230 (Write GPR)PC00000000000000000000000000101100: WriteAddress01000 <= Data00000000000000000000000000000100 # 230 (PC)NextPcAddr00000000000000000000000000101100 # 230 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000110100, out = 00000000000000000000000000000100 # 230 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000100 # 230 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000100, din1 = 00000000000000000100000000100001, out = 00000000000000000000000000000100 # 230 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000010, Result = 00000000000000000000000000000110 # 230 (IM)Current Code:000000 01111 01111 01001 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000110000 # 230 (NPC)CurPCAddr:00000000000000000000000000110000 NextPcAddr:00000000000000000000000000110100 # 230 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 230 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000100000000100001, out = 00000000000000000000000000000000 # 230 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000110, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000110100, out = 00000000000000000000000000000110 # 230 (MUX RegWriteAddr)control = 01, din0 = 01111, din1 = 01001, out = 01001 # 230 (EXT)EXTOp = 00; EXTin = 0100100000100001 EXTout = 00000000000000000100100000100001 # 230 (ALU)(add)A = 00000000000000000000000000000000, B = 00000000000000000000000000000100, Result = 00000000000000000000000000000100 # 230 (NPC)CurPCAddr:00000000000000000000000000110000 NextPcAddr:00000000000000000000000000110100 # 230 (Control) ADDU # 230 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 230 (ALU)(add)A = 00000000000000000000000000000000, B = 00000000000000000000000000000000, Result = 00000000000000000000000000000000 # 230 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000000 # 230 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000110100, out = 00000000000000000000000000000100 # 230 (Control) ADDU # 230 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 230 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000110100, out = 00000000000000000000000000000000 # 230 (mips_tb)clk = 1 # 231 (Show GPR) # 231 GPR 0 = 00000000 # 231 GPR 1 = 00000000 # 231 GPR 2 = 00000000 # 231 GPR 3 = 00000000 # 231 GPR 4 = 00000000 # 231 GPR 5 = 00000000 # 231 GPR 6 = 00000000 # 231 GPR 7 = 00000000 # 231 GPR 8 = 00000004 # 231 GPR 9 = 00010000 # 231 GPR 10 = 00ff0000 # 231 GPR 11 = 00ff5555 # 231 GPR 12 = 00000001 # 231 GPR 13 = 00010001 # 231 GPR 14 = 00000000 # 231 GPR 15 = 00000000 # 231 GPR 16 = 00000000 # 231 GPR 17 = 00000000 # 231 GPR 18 = 00000000 # 231 GPR 19 = 00000000 # 231 GPR 20 = 00000000 # 231 GPR 21 = 00000000 # 231 GPR 22 = 00000000 # 231 GPR 23 = 00000000 # 231 GPR 24 = 00000000 # 231 GPR 25 = 00000000 # 231 GPR 26 = 00000000 # 231 GPR 27 = 00000000 # 231 GPR 28 = 00000000 # 231 GPR 29 = 00000000 # 231 GPR 30 = 00000000 # 231 GPR 31 = 00000000 # 240 (mips_tb)clk = 0 # 250 (Write GPR)PC00000000000000000000000000110000: WriteAddress01001 <= Data00000000000000000000000000000000 # 250 (PC)NextPcAddr00000000000000000000000000110000 # 250 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000111000, out = 00000000000000000000000000000000 # 250 (IM)Current Code:000000 01100 01100 01101 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000110100 # 250 (NPC)CurPCAddr:00000000000000000000000000110100 NextPcAddr:00000000000000000000000000111000 # 250 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000001 # 250 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000001 # 250 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01101, out = 01101 # 250 (EXT)EXTOp = 00; EXTin = 0110100000100001 EXTout = 00000000000000000110100000100001 # 250 (ALU)(add)A = 00000000000000000000000000000001, B = 00000000000000000000000000000000, Result = 00000000000000000000000000000001 # 250 (NPC)CurPCAddr:00000000000000000000000000110100 NextPcAddr:00000000000000000000000000111000 # 250 (Control) ADDU # 250 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 250 (ALU)(add)A = 00000000000000000000000000000001, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000010 # 250 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000110100000100001, out = 00000000000000000000000000000001 # 250 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000111000, out = 00000000000000000000000000000001 # 250 (Control) ADDU # 250 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 250 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000010, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000111000, out = 00000000000000000000000000000010 # 250 (mips_tb)clk = 1 # 251 (Show GPR) # 251 GPR 0 = 00000000 # 251 GPR 1 = 00000000 # 251 GPR 2 = 00000000 # 251 GPR 3 = 00000000 # 251 GPR 4 = 00000000 # 251 GPR 5 = 00000000 # 251 GPR 6 = 00000000 # 251 GPR 7 = 00000000 # 251 GPR 8 = 00000004 # 251 GPR 9 = 00000000 # 251 GPR 10 = 00ff0000 # 251 GPR 11 = 00ff5555 # 251 GPR 12 = 00000001 # 251 GPR 13 = 00010001 # 251 GPR 14 = 00000000 # 251 GPR 15 = 00000000 # 251 GPR 16 = 00000000 # 251 GPR 17 = 00000000 # 251 GPR 18 = 00000000 # 251 GPR 19 = 00000000 # 251 GPR 20 = 00000000 # 251 GPR 21 = 00000000 # 251 GPR 22 = 00000000 # 251 GPR 23 = 00000000 # 251 GPR 24 = 00000000 # 251 GPR 25 = 00000000 # 251 GPR 26 = 00000000 # 251 GPR 27 = 00000000 # 251 GPR 28 = 00000000 # 251 GPR 29 = 00000000 # 251 GPR 30 = 00000000 # 251 GPR 31 = 00000000 # 260 (mips_tb)clk = 0 # 270 (Write GPR)PC00000000000000000000000000110100: WriteAddress01101 <= Data00000000000000000000000000000010 # 270 (PC)NextPcAddr00000000000000000000000000110100 # 270 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000010, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000111100, out = 00000000000000000000000000000010 # 270 (IM)Current Code:000000 01101 01101 01101 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000111000 # 270 (NPC)CurPCAddr:00000000000000000000000000111000 NextPcAddr:00000000000000000000000000111100 # 270 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000010, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000010 # 270 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000010, din1 = 00000000000000000110100000100001, out = 00000000000000000000000000000010 # 270 (MUX RegWriteAddr)control = 01, din0 = 01101, din1 = 01101, out = 01101 # 270 (ALU)(add)A = 00000000000000000000000000000010, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000011 # 270 (NPC)CurPCAddr:00000000000000000000000000111000 NextPcAddr:00000000000000000000000000111100 # 270 (Control) ADDU # 270 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 270 (ALU)(add)A = 00000000000000000000000000000010, B = 00000000000000000000000000000010, Result = 00000000000000000000000000000100 # 270 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000011, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000000111100, out = 00000000000000000000000000000011 # 270 (Control) ADDU # 270 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 270 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000000111100, out = 00000000000000000000000000000100 # 270 (mips_tb)clk = 1 # 271 (Show GPR) # 271 GPR 0 = 00000000 # 271 GPR 1 = 00000000 # 271 GPR 2 = 00000000 # 271 GPR 3 = 00000000 # 271 GPR 4 = 00000000 # 271 GPR 5 = 00000000 # 271 GPR 6 = 00000000 # 271 GPR 7 = 00000000 # 271 GPR 8 = 00000004 # 271 GPR 9 = 00000000 # 271 GPR 10 = 00ff0000 # 271 GPR 11 = 00ff5555 # 271 GPR 12 = 00000001 # 271 GPR 13 = 00000002 # 271 GPR 14 = 00000000 # 271 GPR 15 = 00000000 # 271 GPR 16 = 00000000 # 271 GPR 17 = 00000000 # 271 GPR 18 = 00000000 # 271 GPR 19 = 00000000 # 271 GPR 20 = 00000000 # 271 GPR 21 = 00000000 # 271 GPR 22 = 00000000 # 271 GPR 23 = 00000000 # 271 GPR 24 = 00000000 # 271 GPR 25 = 00000000 # 271 GPR 26 = 00000000 # 271 GPR 27 = 00000000 # 271 GPR 28 = 00000000 # 271 GPR 29 = 00000000 # 271 GPR 30 = 00000000 # 271 GPR 31 = 00000000 # 280 (mips_tb)clk = 0 # 290 (Write GPR)PC00000000000000000000000000111000: WriteAddress01101 <= Data00000000000000000000000000000100 # 290 (PC)NextPcAddr00000000000000000000000000111000 # 290 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001000000, out = 00000000000000000000000000000100 # 290 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000100 # 290 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000100, din1 = 00000000000000000110100000100001, out = 00000000000000000000000000000100 # 290 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000010, Result = 00000000000000000000000000000110 # 290 (IM)Current Code:000000 01101 01100 01101 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000000111100 # 290 (NPC)CurPCAddr:00000000000000000000000000111100 NextPcAddr:00000000000000000000000001000000 # 290 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000001 # 290 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000110100000100001, out = 00000000000000000000000000000001 # 290 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000100, Result = 00000000000000000000000000001000 # 290 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000110, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001000000, out = 00000000000000000000000000000110 # 290 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01101, out = 01101 # 290 (NPC)CurPCAddr:00000000000000000000000000111100 NextPcAddr:00000000000000000000000001000000 # 290 (Control) ADDU # 290 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 290 (Control) ADDU # 290 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 290 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000101 # 290 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001000000, out = 00000000000000000000000000001000 # 290 (Control) ADDU # 290 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 290 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000101, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001000000, out = 00000000000000000000000000000101 # 290 (mips_tb)clk = 1 # 291 (Show GPR) # 291 GPR 0 = 00000000 # 291 GPR 1 = 00000000 # 291 GPR 2 = 00000000 # 291 GPR 3 = 00000000 # 291 GPR 4 = 00000000 # 291 GPR 5 = 00000000 # 291 GPR 6 = 00000000 # 291 GPR 7 = 00000000 # 291 GPR 8 = 00000004 # 291 GPR 9 = 00000000 # 291 GPR 10 = 00ff0000 # 291 GPR 11 = 00ff5555 # 291 GPR 12 = 00000001 # 291 GPR 13 = 00000004 # 291 GPR 14 = 00000000 # 291 GPR 15 = 00000000 # 291 GPR 16 = 00000000 # 291 GPR 17 = 00000000 # 291 GPR 18 = 00000000 # 291 GPR 19 = 00000000 # 291 GPR 20 = 00000000 # 291 GPR 21 = 00000000 # 291 GPR 22 = 00000000 # 291 GPR 23 = 00000000 # 291 GPR 24 = 00000000 # 291 GPR 25 = 00000000 # 291 GPR 26 = 00000000 # 291 GPR 27 = 00000000 # 291 GPR 28 = 00000000 # 291 GPR 29 = 00000000 # 291 GPR 30 = 00000000 # 291 GPR 31 = 00000000 # 300 (mips_tb)clk = 0 # 310 (Write GPR)PC00000000000000000000000000111100: WriteAddress01101 <= Data00000000000000000000000000000101 # 310 (PC)NextPcAddr00000000000000000000000000111100 # 310 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000101, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001000100, out = 00000000000000000000000000000101 # 310 (ALU)(add)A = 00000000000000000000000000000101, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000110 # 310 (IM)Current Code:000000 01101 01100 01110 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000001000000 # 310 (NPC)CurPCAddr:00000000000000000000000001000000 NextPcAddr:00000000000000000000000001000100 # 310 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000110, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001000100, out = 00000000000000000000000000000110 # 310 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01110, out = 01110 # 310 (EXT)EXTOp = 00; EXTin = 0111000000100001 EXTout = 00000000000000000111000000100001 # 310 (NPC)CurPCAddr:00000000000000000000000001000000 NextPcAddr:00000000000000000000000001000100 # 310 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111000000100001, out = 00000000000000000000000000000001 # 310 (mips_tb)clk = 1 # 311 (Show GPR) # 311 GPR 0 = 00000000 # 311 GPR 1 = 00000000 # 311 GPR 2 = 00000000 # 311 GPR 3 = 00000000 # 311 GPR 4 = 00000000 # 311 GPR 5 = 00000000 # 311 GPR 6 = 00000000 # 311 GPR 7 = 00000000 # 311 GPR 8 = 00000004 # 311 GPR 9 = 00000000 # 311 GPR 10 = 00ff0000 # 311 GPR 11 = 00ff5555 # 311 GPR 12 = 00000001 # 311 GPR 13 = 00000005 # 311 GPR 14 = 00000000 # 311 GPR 15 = 00000000 # 311 GPR 16 = 00000000 # 311 GPR 17 = 00000000 # 311 GPR 18 = 00000000 # 311 GPR 19 = 00000000 # 311 GPR 20 = 00000000 # 311 GPR 21 = 00000000 # 311 GPR 22 = 00000000 # 311 GPR 23 = 00000000 # 311 GPR 24 = 00000000 # 311 GPR 25 = 00000000 # 311 GPR 26 = 00000000 # 311 GPR 27 = 00000000 # 311 GPR 28 = 00000000 # 311 GPR 29 = 00000000 # 311 GPR 30 = 00000000 # 311 GPR 31 = 00000000 # 320 (mips_tb)clk = 0 # 330 (Write GPR)PC00000000000000000000000001000000: WriteAddress01110 <= Data00000000000000000000000000000110 # 330 (PC)NextPcAddr00000000000000000000000001000000 # 330 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000110, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001001000, out = 00000000000000000000000000000110 # 330 (IM)Current Code:000000 01110 01100 01111 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000001000100 # 330 (NPC)CurPCAddr:00000000000000000000000001000100 NextPcAddr:00000000000000000000000001001000 # 330 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01111, out = 01111 # 330 (EXT)EXTOp = 00; EXTin = 0111100000100001 EXTout = 00000000000000000111100000100001 # 330 (ALU)(add)A = 00000000000000000000000000000110, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000111 # 330 (NPC)CurPCAddr:00000000000000000000000001000100 NextPcAddr:00000000000000000000000001001000 # 330 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111100000100001, out = 00000000000000000000000000000001 # 330 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000111, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001001000, out = 00000000000000000000000000000111 # 330 (mips_tb)clk = 1 # 331 (Show GPR) # 331 GPR 0 = 00000000 # 331 GPR 1 = 00000000 # 331 GPR 2 = 00000000 # 331 GPR 3 = 00000000 # 331 GPR 4 = 00000000 # 331 GPR 5 = 00000000 # 331 GPR 6 = 00000000 # 331 GPR 7 = 00000000 # 331 GPR 8 = 00000004 # 331 GPR 9 = 00000000 # 331 GPR 10 = 00ff0000 # 331 GPR 11 = 00ff5555 # 331 GPR 12 = 00000001 # 331 GPR 13 = 00000005 # 331 GPR 14 = 00000006 # 331 GPR 15 = 00000000 # 331 GPR 16 = 00000000 # 331 GPR 17 = 00000000 # 331 GPR 18 = 00000000 # 331 GPR 19 = 00000000 # 331 GPR 20 = 00000000 # 331 GPR 21 = 00000000 # 331 GPR 22 = 00000000 # 331 GPR 23 = 00000000 # 331 GPR 24 = 00000000 # 331 GPR 25 = 00000000 # 331 GPR 26 = 00000000 # 331 GPR 27 = 00000000 # 331 GPR 28 = 00000000 # 331 GPR 29 = 00000000 # 331 GPR 30 = 00000000 # 331 GPR 31 = 00000000 # 340 (mips_tb)clk = 0 # 350 (Write GPR)PC00000000000000000000000001000100: WriteAddress01111 <= Data00000000000000000000000000000111 # 350 (PC)NextPcAddr00000000000000000000000001000100 # 350 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000111, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001001100, out = 00000000000000000000000000000111 # 350 (IM)Current Code:000000 01001 01100 01001 00000 100001 ; TheAddrOfCurCode = 00000000000000000000000001001000 # 350 (NPC)CurPCAddr:00000000000000000000000001001000 NextPcAddr:00000000000000000000000001001100 # 350 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01001, out = 01001 # 350 (EXT)EXTOp = 00; EXTin = 0100100000100001 EXTout = 00000000000000000100100000100001 # 350 (ALU)(add)A = 00000000000000000000000000000000, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000001 # 350 (NPC)CurPCAddr:00000000000000000000000001001000 NextPcAddr:00000000000000000000000001001100 # 350 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000001 # 350 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000001001100, out = 00000000000000000000000000000001 # 350 (mips_tb)clk = 1 # 351 (Show GPR) # 351 GPR 0 = 00000000 # 351 GPR 1 = 00000000 # 351 GPR 2 = 00000000 # 351 GPR 3 = 00000000 # 351 GPR 4 = 00000000 # 351 GPR 5 = 00000000 # 351 GPR 6 = 00000000 # 351 GPR 7 = 00000000 # 351 GPR 8 = 00000004 # 351 GPR 9 = 00000000 # 351 GPR 10 = 00ff0000 # 351 GPR 11 = 00ff5555 # 351 GPR 12 = 00000001 # 351 GPR 13 = 00000005 # 351 GPR 14 = 00000006 # 351 GPR 15 = 00000007 # 351 GPR 16 = 00000000 # 351 GPR 17 = 00000000 # 351 GPR 18 = 00000000 # 351 GPR 19 = 00000000 # 351 GPR 20 = 00000000 # 351 GPR 21 = 00000000 # 351 GPR 22 = 00000000 # 351 GPR 23 = 00000000 # 351 GPR 24 = 00000000 # 351 GPR 25 = 00000000 # 351 GPR 26 = 00000000 # 351 GPR 27 = 00000000 # 351 GPR 28 = 00000000 # 351 GPR 29 = 00000000 # 351 GPR 30 = 00000000 # 351 GPR 31 = 00000000 # 360 (mips_tb)clk = 0 # 370 (Write GPR)PC00000000000000000000000001001000: WriteAddress01001 <= Data00000000000000000000000000000001 # 370 (PC)NextPcAddr00000000000000000000000001001000 # 370 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000001, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000001010000, out = 00000000000000000000000000000001 # 370 (ALU)(add)A = 00000000000000000000000000000001, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000010 # 370 (IM)Current Code:000100 01000 01001 00000 00000 000001 ; TheAddrOfCurCode = 00000000000000000000000001001100 # 370 (NPC)CurPCAddr:00000000000000000000000001001100 NextPcAddr:00000000000000000000000001010000 # 370 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000010, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000001010000, out = 00000000000000000000000000000010 # 370 (MUX RegWriteAddr)control = 01, din0 = 01001, din1 = 00000, out = 00000 # 370 (EXT)EXTOp = 00; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 370 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000101 # 370 (NPC)CurPCAddr:00000000000000000000000001001100 NextPcAddr:00000000000000000000000001010000 # 370 (Control) BEQ # 370 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=1 ExtOp=01 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 370 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000001 # 370 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000101, din1 = 00000000000000000000000000000000, din2 = 00000000000000000000000001010000, out = 00000000000000000000000000000101 # 370 (MUX RegWriteAddr)control = 00, din0 = 01001, din1 = 00000, out = 01001 # 370 (EXT)EXTOp = 01; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 370 (ALU)(DEFAULT) # 370 (NPC)CurPCAddr:00000000000000000000000001001100 NextPcAddr:00000000000000000000000001010000 # 370 (Control) BEQ # 370 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=01 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 370 (NPC)CurPCAddr:00000000000000000000000001001100 NextPcAddr:00000000000000000000000001010000 # 370 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000001010000, out = 00000000000000000000000000000000 # 370 (NPC)CurPCAddr:00000000000000000000000001001100 NextPcAddr:00000000000000000000000001010000 # 370 (ALU)(DEFAULT) # 370 (mips_tb)clk = 1 # 371 (Show GPR) # 371 GPR 0 = 00000000 # 371 GPR 1 = 00000000 # 371 GPR 2 = 00000000 # 371 GPR 3 = 00000000 # 371 GPR 4 = 00000000 # 371 GPR 5 = 00000000 # 371 GPR 6 = 00000000 # 371 GPR 7 = 00000000 # 371 GPR 8 = 00000004 # 371 GPR 9 = 00000001 # 371 GPR 10 = 00ff0000 # 371 GPR 11 = 00ff5555 # 371 GPR 12 = 00000001 # 371 GPR 13 = 00000005 # 371 GPR 14 = 00000006 # 371 GPR 15 = 00000007 # 371 GPR 16 = 00000000 # 371 GPR 17 = 00000000 # 371 GPR 18 = 00000000 # 371 GPR 19 = 00000000 # 371 GPR 20 = 00000000 # 371 GPR 21 = 00000000 # 371 GPR 22 = 00000000 # 371 GPR 23 = 00000000 # 371 GPR 24 = 00000000 # 371 GPR 25 = 00000000 # 371 GPR 26 = 00000000 # 371 GPR 27 = 00000000 # 371 GPR 28 = 00000000 # 371 GPR 29 = 00000000 # 371 GPR 30 = 00000000 # 371 GPR 31 = 00000000 # 380 (mips_tb)clk = 0 # 390 (GPR)Write:false # 390 (PC)NextPcAddr00000000000000000000000001001100 # 390 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000000000000000000001010100, out = 00000000000000000000000000000000 # 390 (IM)Current Code:000010 00000 10000 00000 00000 001111 ; TheAddrOfCurCode = 00000000000000000000000001010000 # 390 (NPC)CurPCAddr:00000000000000000000000001010000 NextPcAddr:00000000000000000000000001010100 # 390 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 390 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000000 # 390 (MUX RegWriteAddr)control = 00, din0 = 10000, din1 = 00000, out = 10000 # 390 (Control) J # 390 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=1 jr_ctr=0 DMSrc=0 # 390 (EXT)EXTOp = 01; EXTin = 0000000000001111 EXTout = 00000000000000000000000000000001 # 390 (ALU)(DEFAULT) # 390 (NPC)CurPCAddr:00000000000000000000000001010000 NextPcAddr:00000000000000000000000001010100 # 390 (ALU)(DEFAULT) # 390 (EXT)EXTOp = 00; EXTin = 0000000000001111 EXTout = 00000000000000000000000000001111 # 390 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000001111, out = 00000000000000000000000000000000 # 390 (NPC)CurPCAddr:00000000000000000000000001010000 NextPcAddr:00000000000000000000000001010100 # 390 (Control) J # 390 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=1 jr_ctr=0 DMSrc=0 # 390 (NPC)CurPCAddr:00000000000000000000000001010000 NextPcAddr:00000000010000000000000000111100 # 390 (mips_tb)clk = 1 # 400 (mips_tb)clk = 0 # 410 (GPR)Write:false # 410 (PC)NextPcAddr00000000000000000000000001010000 # 410 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000000 # 410 (IM)Current Code:000000 01101 01100 01101 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000000111100 # 410 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000000111100 # 410 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000001 # 410 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000001111, out = 00000000000000000000000000000001 # 410 (MUX RegWriteAddr)control = 00, din0 = 01100, din1 = 01101, out = 01100 # 410 (Control) ADDU # 410 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 410 (EXT)EXTOp = 00; EXTin = 0110100000100001 EXTout = 00000000000000000110100000100001 # 410 (ALU)(DEFAULT) # 410 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000000111100 # 410 (Control) ADDU # 410 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 410 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01101, out = 01101 # 410 (ALU)(add)A = 00000000000000000000000000000101, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000110 # 410 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000110100000100001, out = 00000000000000000000000000000001 # 410 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000001000000 # 410 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000110, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000110 # 410 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000000 # 410 (ALU)(add)A = 00000000000000000000000000000101, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000110 # 410 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000001000000 # 410 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000110, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000110 # 410 (mips_tb)clk = 1 # 420 (mips_tb)clk = 0 # 430 (Write GPR)PC00000000010000000000000000111100: WriteAddress01101 <= Data00000000000000000000000000000110 # 430 (PC)NextPcAddr00000000010000000000000000111100 # 430 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000110, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000100, out = 00000000000000000000000000000110 # 430 (ALU)(add)A = 00000000000000000000000000000110, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000111 # 430 (IM)Current Code:000000 01101 01100 01110 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001000000 # 430 (NPC)CurPCAddr:00000000010000000000000001000000 NextPcAddr:00000000010000000000000001000100 # 430 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000111, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000100, out = 00000000000000000000000000000111 # 430 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01110, out = 01110 # 430 (EXT)EXTOp = 00; EXTin = 0111000000100001 EXTout = 00000000000000000111000000100001 # 430 (NPC)CurPCAddr:00000000010000000000000001000000 NextPcAddr:00000000010000000000000001000100 # 430 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111000000100001, out = 00000000000000000000000000000001 # 430 (mips_tb)clk = 1 # 431 (Show GPR) # 431 GPR 0 = 00000000 # 431 GPR 1 = 00000000 # 431 GPR 2 = 00000000 # 431 GPR 3 = 00000000 # 431 GPR 4 = 00000000 # 431 GPR 5 = 00000000 # 431 GPR 6 = 00000000 # 431 GPR 7 = 00000000 # 431 GPR 8 = 00000004 # 431 GPR 9 = 00000001 # 431 GPR 10 = 00ff0000 # 431 GPR 11 = 00ff5555 # 431 GPR 12 = 00000001 # 431 GPR 13 = 00000006 # 431 GPR 14 = 00000006 # 431 GPR 15 = 00000007 # 431 GPR 16 = 00000000 # 431 GPR 17 = 00000000 # 431 GPR 18 = 00000000 # 431 GPR 19 = 00000000 # 431 GPR 20 = 00000000 # 431 GPR 21 = 00000000 # 431 GPR 22 = 00000000 # 431 GPR 23 = 00000000 # 431 GPR 24 = 00000000 # 431 GPR 25 = 00000000 # 431 GPR 26 = 00000000 # 431 GPR 27 = 00000000 # 431 GPR 28 = 00000000 # 431 GPR 29 = 00000000 # 431 GPR 30 = 00000000 # 431 GPR 31 = 00000000 # 440 (mips_tb)clk = 0 # 450 (Write GPR)PC00000000010000000000000001000000: WriteAddress01110 <= Data00000000000000000000000000000111 # 450 (PC)NextPcAddr00000000010000000000000001000000 # 450 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000111, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001000, out = 00000000000000000000000000000111 # 450 (IM)Current Code:000000 01110 01100 01111 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001000100 # 450 (NPC)CurPCAddr:00000000010000000000000001000100 NextPcAddr:00000000010000000000000001001000 # 450 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01111, out = 01111 # 450 (EXT)EXTOp = 00; EXTin = 0111100000100001 EXTout = 00000000000000000111100000100001 # 450 (ALU)(add)A = 00000000000000000000000000000111, B = 00000000000000000000000000000001, Result = 00000000000000000000000000001000 # 450 (NPC)CurPCAddr:00000000010000000000000001000100 NextPcAddr:00000000010000000000000001001000 # 450 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111100000100001, out = 00000000000000000000000000000001 # 450 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001000, out = 00000000000000000000000000001000 # 450 (mips_tb)clk = 1 # 451 (Show GPR) # 451 GPR 0 = 00000000 # 451 GPR 1 = 00000000 # 451 GPR 2 = 00000000 # 451 GPR 3 = 00000000 # 451 GPR 4 = 00000000 # 451 GPR 5 = 00000000 # 451 GPR 6 = 00000000 # 451 GPR 7 = 00000000 # 451 GPR 8 = 00000004 # 451 GPR 9 = 00000001 # 451 GPR 10 = 00ff0000 # 451 GPR 11 = 00ff5555 # 451 GPR 12 = 00000001 # 451 GPR 13 = 00000006 # 451 GPR 14 = 00000007 # 451 GPR 15 = 00000007 # 451 GPR 16 = 00000000 # 451 GPR 17 = 00000000 # 451 GPR 18 = 00000000 # 451 GPR 19 = 00000000 # 451 GPR 20 = 00000000 # 451 GPR 21 = 00000000 # 451 GPR 22 = 00000000 # 451 GPR 23 = 00000000 # 451 GPR 24 = 00000000 # 451 GPR 25 = 00000000 # 451 GPR 26 = 00000000 # 451 GPR 27 = 00000000 # 451 GPR 28 = 00000000 # 451 GPR 29 = 00000000 # 451 GPR 30 = 00000000 # 451 GPR 31 = 00000000 # 460 (mips_tb)clk = 0 # 470 (Write GPR)PC00000000010000000000000001000100: WriteAddress01111 <= Data00000000000000000000000000001000 # 470 (PC)NextPcAddr00000000010000000000000001000100 # 470 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001100, out = 00000000000000000000000000001000 # 470 (IM)Current Code:000000 01001 01100 01001 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001001000 # 470 (NPC)CurPCAddr:00000000010000000000000001001000 NextPcAddr:00000000010000000000000001001100 # 470 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01001, out = 01001 # 470 (EXT)EXTOp = 00; EXTin = 0100100000100001 EXTout = 00000000000000000100100000100001 # 470 (ALU)(add)A = 00000000000000000000000000000001, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000010 # 470 (NPC)CurPCAddr:00000000010000000000000001001000 NextPcAddr:00000000010000000000000001001100 # 470 (Control) ADDU # 470 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 470 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000001 # 470 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000010, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001001100, out = 00000000000000000000000000000010 # 470 (mips_tb)clk = 1 # 471 (Show GPR) # 471 GPR 0 = 00000000 # 471 GPR 1 = 00000000 # 471 GPR 2 = 00000000 # 471 GPR 3 = 00000000 # 471 GPR 4 = 00000000 # 471 GPR 5 = 00000000 # 471 GPR 6 = 00000000 # 471 GPR 7 = 00000000 # 471 GPR 8 = 00000004 # 471 GPR 9 = 00000001 # 471 GPR 10 = 00ff0000 # 471 GPR 11 = 00ff5555 # 471 GPR 12 = 00000001 # 471 GPR 13 = 00000006 # 471 GPR 14 = 00000007 # 471 GPR 15 = 00000008 # 471 GPR 16 = 00000000 # 471 GPR 17 = 00000000 # 471 GPR 18 = 00000000 # 471 GPR 19 = 00000000 # 471 GPR 20 = 00000000 # 471 GPR 21 = 00000000 # 471 GPR 22 = 00000000 # 471 GPR 23 = 00000000 # 471 GPR 24 = 00000000 # 471 GPR 25 = 00000000 # 471 GPR 26 = 00000000 # 471 GPR 27 = 00000000 # 471 GPR 28 = 00000000 # 471 GPR 29 = 00000000 # 471 GPR 30 = 00000000 # 471 GPR 31 = 00000000 # 480 (mips_tb)clk = 0 # 490 (Write GPR)PC00000000010000000000000001001000: WriteAddress01001 <= Data00000000000000000000000000000010 # 490 (PC)NextPcAddr00000000010000000000000001001000 # 490 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000010, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000010 # 490 (ALU)(add)A = 00000000000000000000000000000010, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000011 # 490 (IM)Current Code:000100 01000 01001 00000 00000 000001 ; TheAddrOfCurCode = 00000000010000000000000001001100 # 490 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010000 # 490 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000010, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000010 # 490 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000010, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000010 # 490 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000011, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000011 # 490 (MUX RegWriteAddr)control = 01, din0 = 01001, din1 = 00000, out = 00000 # 490 (EXT)EXTOp = 00; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 490 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000101 # 490 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010000 # 490 (Control) BEQ # 490 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=01 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 490 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000010, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000010 # 490 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000101, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000101 # 490 (MUX RegWriteAddr)control = 00, din0 = 01001, din1 = 00000, out = 01001 # 490 (EXT)EXTOp = 01; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 490 (ALU)(DEFAULT) # 490 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000000 # 490 (ALU)(DEFAULT) # 490 (mips_tb)clk = 1 # 491 (Show GPR) # 491 GPR 0 = 00000000 # 491 GPR 1 = 00000000 # 491 GPR 2 = 00000000 # 491 GPR 3 = 00000000 # 491 GPR 4 = 00000000 # 491 GPR 5 = 00000000 # 491 GPR 6 = 00000000 # 491 GPR 7 = 00000000 # 491 GPR 8 = 00000004 # 491 GPR 9 = 00000002 # 491 GPR 10 = 00ff0000 # 491 GPR 11 = 00ff5555 # 491 GPR 12 = 00000001 # 491 GPR 13 = 00000006 # 491 GPR 14 = 00000007 # 491 GPR 15 = 00000008 # 491 GPR 16 = 00000000 # 491 GPR 17 = 00000000 # 491 GPR 18 = 00000000 # 491 GPR 19 = 00000000 # 491 GPR 20 = 00000000 # 491 GPR 21 = 00000000 # 491 GPR 22 = 00000000 # 491 GPR 23 = 00000000 # 491 GPR 24 = 00000000 # 491 GPR 25 = 00000000 # 491 GPR 26 = 00000000 # 491 GPR 27 = 00000000 # 491 GPR 28 = 00000000 # 491 GPR 29 = 00000000 # 491 GPR 30 = 00000000 # 491 GPR 31 = 00000000 # 500 (mips_tb)clk = 0 # 510 (GPR)Write:false # 510 (PC)NextPcAddr00000000010000000000000001001100 # 510 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010100, out = 00000000000000000000000000000000 # 510 (IM)Current Code:000010 00000 10000 00000 00000 001111 ; TheAddrOfCurCode = 00000000010000000000000001010000 # 510 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000001010100 # 510 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 510 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000000 # 510 (MUX RegWriteAddr)control = 00, din0 = 10000, din1 = 00000, out = 10000 # 510 (Control) J # 510 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=1 jr_ctr=0 DMSrc=0 # 510 (EXT)EXTOp = 01; EXTin = 0000000000001111 EXTout = 00000000000000000000000000000001 # 510 (ALU)(DEFAULT) # 510 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000001010100 # 510 (ALU)(DEFAULT) # 510 (EXT)EXTOp = 00; EXTin = 0000000000001111 EXTout = 00000000000000000000000000001111 # 510 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000001111, out = 00000000000000000000000000000000 # 510 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000001010100 # 510 (Control) J # 510 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=1 jr_ctr=0 DMSrc=0 # 510 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000000111100 # 510 (mips_tb)clk = 1 # 520 (mips_tb)clk = 0 # 530 (GPR)Write:false # 530 (PC)NextPcAddr00000000010000000000000001010000 # 530 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000000 # 530 (IM)Current Code:000000 01101 01100 01101 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000000111100 # 530 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000000111100 # 530 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000001 # 530 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000001111, out = 00000000000000000000000000000001 # 530 (MUX RegWriteAddr)control = 00, din0 = 01100, din1 = 01101, out = 01100 # 530 (Control) ADDU # 530 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 530 (EXT)EXTOp = 00; EXTin = 0110100000100001 EXTout = 00000000000000000110100000100001 # 530 (ALU)(DEFAULT) # 530 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000000111100 # 530 (Control) ADDU # 530 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 530 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01101, out = 01101 # 530 (ALU)(add)A = 00000000000000000000000000000110, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000111 # 530 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000110100000100001, out = 00000000000000000000000000000001 # 530 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000001000000 # 530 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000111, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000111 # 530 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000000 # 530 (ALU)(add)A = 00000000000000000000000000000110, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000111 # 530 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000001000000 # 530 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000111, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000111 # 530 (mips_tb)clk = 1 # 540 (mips_tb)clk = 0 # 550 (Write GPR)PC00000000010000000000000000111100: WriteAddress01101 <= Data00000000000000000000000000000111 # 550 (PC)NextPcAddr00000000010000000000000000111100 # 550 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000111, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000100, out = 00000000000000000000000000000111 # 550 (ALU)(add)A = 00000000000000000000000000000111, B = 00000000000000000000000000000001, Result = 00000000000000000000000000001000 # 550 (IM)Current Code:000000 01101 01100 01110 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001000000 # 550 (NPC)CurPCAddr:00000000010000000000000001000000 NextPcAddr:00000000010000000000000001000100 # 550 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000100, out = 00000000000000000000000000001000 # 550 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01110, out = 01110 # 550 (EXT)EXTOp = 00; EXTin = 0111000000100001 EXTout = 00000000000000000111000000100001 # 550 (NPC)CurPCAddr:00000000010000000000000001000000 NextPcAddr:00000000010000000000000001000100 # 550 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111000000100001, out = 00000000000000000000000000000001 # 550 (mips_tb)clk = 1 # 551 (Show GPR) # 551 GPR 0 = 00000000 # 551 GPR 1 = 00000000 # 551 GPR 2 = 00000000 # 551 GPR 3 = 00000000 # 551 GPR 4 = 00000000 # 551 GPR 5 = 00000000 # 551 GPR 6 = 00000000 # 551 GPR 7 = 00000000 # 551 GPR 8 = 00000004 # 551 GPR 9 = 00000002 # 551 GPR 10 = 00ff0000 # 551 GPR 11 = 00ff5555 # 551 GPR 12 = 00000001 # 551 GPR 13 = 00000007 # 551 GPR 14 = 00000007 # 551 GPR 15 = 00000008 # 551 GPR 16 = 00000000 # 551 GPR 17 = 00000000 # 551 GPR 18 = 00000000 # 551 GPR 19 = 00000000 # 551 GPR 20 = 00000000 # 551 GPR 21 = 00000000 # 551 GPR 22 = 00000000 # 551 GPR 23 = 00000000 # 551 GPR 24 = 00000000 # 551 GPR 25 = 00000000 # 551 GPR 26 = 00000000 # 551 GPR 27 = 00000000 # 551 GPR 28 = 00000000 # 551 GPR 29 = 00000000 # 551 GPR 30 = 00000000 # 551 GPR 31 = 00000000 # 560 (mips_tb)clk = 0 # 570 (Write GPR)PC00000000010000000000000001000000: WriteAddress01110 <= Data00000000000000000000000000001000 # 570 (PC)NextPcAddr00000000010000000000000001000000 # 570 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001000, out = 00000000000000000000000000001000 # 570 (IM)Current Code:000000 01110 01100 01111 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001000100 # 570 (NPC)CurPCAddr:00000000010000000000000001000100 NextPcAddr:00000000010000000000000001001000 # 570 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01111, out = 01111 # 570 (EXT)EXTOp = 00; EXTin = 0111100000100001 EXTout = 00000000000000000111100000100001 # 570 (ALU)(add)A = 00000000000000000000000000001000, B = 00000000000000000000000000000001, Result = 00000000000000000000000000001001 # 570 (NPC)CurPCAddr:00000000010000000000000001000100 NextPcAddr:00000000010000000000000001001000 # 570 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111100000100001, out = 00000000000000000000000000000001 # 570 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001001, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001000, out = 00000000000000000000000000001001 # 570 (mips_tb)clk = 1 # 571 (Show GPR) # 571 GPR 0 = 00000000 # 571 GPR 1 = 00000000 # 571 GPR 2 = 00000000 # 571 GPR 3 = 00000000 # 571 GPR 4 = 00000000 # 571 GPR 5 = 00000000 # 571 GPR 6 = 00000000 # 571 GPR 7 = 00000000 # 571 GPR 8 = 00000004 # 571 GPR 9 = 00000002 # 571 GPR 10 = 00ff0000 # 571 GPR 11 = 00ff5555 # 571 GPR 12 = 00000001 # 571 GPR 13 = 00000007 # 571 GPR 14 = 00000008 # 571 GPR 15 = 00000008 # 571 GPR 16 = 00000000 # 571 GPR 17 = 00000000 # 571 GPR 18 = 00000000 # 571 GPR 19 = 00000000 # 571 GPR 20 = 00000000 # 571 GPR 21 = 00000000 # 571 GPR 22 = 00000000 # 571 GPR 23 = 00000000 # 571 GPR 24 = 00000000 # 571 GPR 25 = 00000000 # 571 GPR 26 = 00000000 # 571 GPR 27 = 00000000 # 571 GPR 28 = 00000000 # 571 GPR 29 = 00000000 # 571 GPR 30 = 00000000 # 571 GPR 31 = 00000000 # 580 (mips_tb)clk = 0 # 590 (Write GPR)PC00000000010000000000000001000100: WriteAddress01111 <= Data00000000000000000000000000001001 # 590 (PC)NextPcAddr00000000010000000000000001000100 # 590 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001001, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001100, out = 00000000000000000000000000001001 # 590 (IM)Current Code:000000 01001 01100 01001 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001001000 # 590 (NPC)CurPCAddr:00000000010000000000000001001000 NextPcAddr:00000000010000000000000001001100 # 590 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01001, out = 01001 # 590 (EXT)EXTOp = 00; EXTin = 0100100000100001 EXTout = 00000000000000000100100000100001 # 590 (ALU)(add)A = 00000000000000000000000000000010, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000011 # 590 (NPC)CurPCAddr:00000000010000000000000001001000 NextPcAddr:00000000010000000000000001001100 # 590 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000001 # 590 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000011, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001001100, out = 00000000000000000000000000000011 # 590 (mips_tb)clk = 1 # 591 (Show GPR) # 591 GPR 0 = 00000000 # 591 GPR 1 = 00000000 # 591 GPR 2 = 00000000 # 591 GPR 3 = 00000000 # 591 GPR 4 = 00000000 # 591 GPR 5 = 00000000 # 591 GPR 6 = 00000000 # 591 GPR 7 = 00000000 # 591 GPR 8 = 00000004 # 591 GPR 9 = 00000002 # 591 GPR 10 = 00ff0000 # 591 GPR 11 = 00ff5555 # 591 GPR 12 = 00000001 # 591 GPR 13 = 00000007 # 591 GPR 14 = 00000008 # 591 GPR 15 = 00000009 # 591 GPR 16 = 00000000 # 591 GPR 17 = 00000000 # 591 GPR 18 = 00000000 # 591 GPR 19 = 00000000 # 591 GPR 20 = 00000000 # 591 GPR 21 = 00000000 # 591 GPR 22 = 00000000 # 591 GPR 23 = 00000000 # 591 GPR 24 = 00000000 # 591 GPR 25 = 00000000 # 591 GPR 26 = 00000000 # 591 GPR 27 = 00000000 # 591 GPR 28 = 00000000 # 591 GPR 29 = 00000000 # 591 GPR 30 = 00000000 # 591 GPR 31 = 00000000 # 600 (mips_tb)clk = 0 # 610 (Write GPR)PC00000000010000000000000001001000: WriteAddress01001 <= Data00000000000000000000000000000011 # 610 (PC)NextPcAddr00000000010000000000000001001000 # 610 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000011, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000011 # 610 (ALU)(add)A = 00000000000000000000000000000011, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000100 # 610 (IM)Current Code:000100 01000 01001 00000 00000 000001 ; TheAddrOfCurCode = 00000000010000000000000001001100 # 610 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010000 # 610 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000011, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000011 # 610 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000011, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000011 # 610 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000100 # 610 (MUX RegWriteAddr)control = 01, din0 = 01001, din1 = 00000, out = 00000 # 610 (Control) BEQ # 610 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=01 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 610 (EXT)EXTOp = 00; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 610 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000101 # 610 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010000 # 610 (MUX RegWriteAddr)control = 00, din0 = 01001, din1 = 00000, out = 01001 # 610 (EXT)EXTOp = 01; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 610 (ALU)(DEFAULT) # 610 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000011, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000011 # 610 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000101, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000101 # 610 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000000 # 610 (ALU)(DEFAULT) # 610 (mips_tb)clk = 1 # 611 (Show GPR) # 611 GPR 0 = 00000000 # 611 GPR 1 = 00000000 # 611 GPR 2 = 00000000 # 611 GPR 3 = 00000000 # 611 GPR 4 = 00000000 # 611 GPR 5 = 00000000 # 611 GPR 6 = 00000000 # 611 GPR 7 = 00000000 # 611 GPR 8 = 00000004 # 611 GPR 9 = 00000003 # 611 GPR 10 = 00ff0000 # 611 GPR 11 = 00ff5555 # 611 GPR 12 = 00000001 # 611 GPR 13 = 00000007 # 611 GPR 14 = 00000008 # 611 GPR 15 = 00000009 # 611 GPR 16 = 00000000 # 611 GPR 17 = 00000000 # 611 GPR 18 = 00000000 # 611 GPR 19 = 00000000 # 611 GPR 20 = 00000000 # 611 GPR 21 = 00000000 # 611 GPR 22 = 00000000 # 611 GPR 23 = 00000000 # 611 GPR 24 = 00000000 # 611 GPR 25 = 00000000 # 611 GPR 26 = 00000000 # 611 GPR 27 = 00000000 # 611 GPR 28 = 00000000 # 611 GPR 29 = 00000000 # 611 GPR 30 = 00000000 # 611 GPR 31 = 00000000 # 620 (mips_tb)clk = 0 # 630 (GPR)Write:false # 630 (PC)NextPcAddr00000000010000000000000001001100 # 630 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010100, out = 00000000000000000000000000000000 # 630 (IM)Current Code:000010 00000 10000 00000 00000 001111 ; TheAddrOfCurCode = 00000000010000000000000001010000 # 630 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000001010100 # 630 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 630 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000000 # 630 (MUX RegWriteAddr)control = 00, din0 = 10000, din1 = 00000, out = 10000 # 630 (Control) J # 630 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=1 jr_ctr=0 DMSrc=0 # 630 (EXT)EXTOp = 01; EXTin = 0000000000001111 EXTout = 00000000000000000000000000000001 # 630 (ALU)(DEFAULT) # 630 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000001010100 # 630 (ALU)(DEFAULT) # 630 (EXT)EXTOp = 00; EXTin = 0000000000001111 EXTout = 00000000000000000000000000001111 # 630 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000001111, out = 00000000000000000000000000000000 # 630 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000001010100 # 630 (Control) J # 630 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=1 jr_ctr=0 DMSrc=0 # 630 (NPC)CurPCAddr:00000000010000000000000001010000 NextPcAddr:00000000010000000000000000111100 # 630 (mips_tb)clk = 1 # 640 (mips_tb)clk = 0 # 650 (GPR)Write:false # 650 (PC)NextPcAddr00000000010000000000000001010000 # 650 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000000 # 650 (IM)Current Code:000000 01101 01100 01101 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000000111100 # 650 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000000111100 # 650 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000001 # 650 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000000000000001111, out = 00000000000000000000000000000001 # 650 (MUX RegWriteAddr)control = 00, din0 = 01100, din1 = 01101, out = 01100 # 650 (Control) ADDU # 650 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 650 (EXT)EXTOp = 00; EXTin = 0110100000100001 EXTout = 00000000000000000110100000100001 # 650 (ALU)(DEFAULT) # 650 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000000111100 # 650 (Control) ADDU # 650 (CTRL)RegDst=01 ALUSrc=0 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=010 j_ctr=0 jr_ctr=0 DMSrc=0 # 650 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01101, out = 01101 # 650 (ALU)(add)A = 00000000000000000000000000000111, B = 00000000000000000000000000000001, Result = 00000000000000000000000000001000 # 650 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000110100000100001, out = 00000000000000000000000000000001 # 650 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000001000000 # 650 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000001000 # 650 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000000000 # 650 (ALU)(add)A = 00000000000000000000000000000111, B = 00000000000000000000000000000001, Result = 00000000000000000000000000001000 # 650 (NPC)CurPCAddr:00000000010000000000000000111100 NextPcAddr:00000000010000000000000001000000 # 650 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000000, out = 00000000000000000000000000001000 # 650 (mips_tb)clk = 1 # 660 (mips_tb)clk = 0 # 670 (Write GPR)PC00000000010000000000000000111100: WriteAddress01101 <= Data00000000000000000000000000001000 # 670 (PC)NextPcAddr00000000010000000000000000111100 # 670 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001000, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000100, out = 00000000000000000000000000001000 # 670 (ALU)(add)A = 00000000000000000000000000001000, B = 00000000000000000000000000000001, Result = 00000000000000000000000000001001 # 670 (IM)Current Code:000000 01101 01100 01110 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001000000 # 670 (NPC)CurPCAddr:00000000010000000000000001000000 NextPcAddr:00000000010000000000000001000100 # 670 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001001, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001000100, out = 00000000000000000000000000001001 # 670 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01110, out = 01110 # 670 (EXT)EXTOp = 00; EXTin = 0111000000100001 EXTout = 00000000000000000111000000100001 # 670 (NPC)CurPCAddr:00000000010000000000000001000000 NextPcAddr:00000000010000000000000001000100 # 670 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111000000100001, out = 00000000000000000000000000000001 # 670 (mips_tb)clk = 1 # 671 (Show GPR) # 671 GPR 0 = 00000000 # 671 GPR 1 = 00000000 # 671 GPR 2 = 00000000 # 671 GPR 3 = 00000000 # 671 GPR 4 = 00000000 # 671 GPR 5 = 00000000 # 671 GPR 6 = 00000000 # 671 GPR 7 = 00000000 # 671 GPR 8 = 00000004 # 671 GPR 9 = 00000003 # 671 GPR 10 = 00ff0000 # 671 GPR 11 = 00ff5555 # 671 GPR 12 = 00000001 # 671 GPR 13 = 00000008 # 671 GPR 14 = 00000008 # 671 GPR 15 = 00000009 # 671 GPR 16 = 00000000 # 671 GPR 17 = 00000000 # 671 GPR 18 = 00000000 # 671 GPR 19 = 00000000 # 671 GPR 20 = 00000000 # 671 GPR 21 = 00000000 # 671 GPR 22 = 00000000 # 671 GPR 23 = 00000000 # 671 GPR 24 = 00000000 # 671 GPR 25 = 00000000 # 671 GPR 26 = 00000000 # 671 GPR 27 = 00000000 # 671 GPR 28 = 00000000 # 671 GPR 29 = 00000000 # 671 GPR 30 = 00000000 # 671 GPR 31 = 00000000 # 680 (mips_tb)clk = 0 # 690 (Write GPR)PC00000000010000000000000001000000: WriteAddress01110 <= Data00000000000000000000000000001001 # 690 (PC)NextPcAddr00000000010000000000000001000000 # 690 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001001, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001000, out = 00000000000000000000000000001001 # 690 (IM)Current Code:000000 01110 01100 01111 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001000100 # 690 (NPC)CurPCAddr:00000000010000000000000001000100 NextPcAddr:00000000010000000000000001001000 # 690 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01111, out = 01111 # 690 (EXT)EXTOp = 00; EXTin = 0111100000100001 EXTout = 00000000000000000111100000100001 # 690 (ALU)(add)A = 00000000000000000000000000001001, B = 00000000000000000000000000000001, Result = 00000000000000000000000000001010 # 690 (NPC)CurPCAddr:00000000010000000000000001000100 NextPcAddr:00000000010000000000000001001000 # 690 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000111100000100001, out = 00000000000000000000000000000001 # 690 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001010, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001000, out = 00000000000000000000000000001010 # 690 (mips_tb)clk = 1 # 691 (Show GPR) # 691 GPR 0 = 00000000 # 691 GPR 1 = 00000000 # 691 GPR 2 = 00000000 # 691 GPR 3 = 00000000 # 691 GPR 4 = 00000000 # 691 GPR 5 = 00000000 # 691 GPR 6 = 00000000 # 691 GPR 7 = 00000000 # 691 GPR 8 = 00000004 # 691 GPR 9 = 00000003 # 691 GPR 10 = 00ff0000 # 691 GPR 11 = 00ff5555 # 691 GPR 12 = 00000001 # 691 GPR 13 = 00000008 # 691 GPR 14 = 00000009 # 691 GPR 15 = 00000009 # 691 GPR 16 = 00000000 # 691 GPR 17 = 00000000 # 691 GPR 18 = 00000000 # 691 GPR 19 = 00000000 # 691 GPR 20 = 00000000 # 691 GPR 21 = 00000000 # 691 GPR 22 = 00000000 # 691 GPR 23 = 00000000 # 691 GPR 24 = 00000000 # 691 GPR 25 = 00000000 # 691 GPR 26 = 00000000 # 691 GPR 27 = 00000000 # 691 GPR 28 = 00000000 # 691 GPR 29 = 00000000 # 691 GPR 30 = 00000000 # 691 GPR 31 = 00000000 # 700 (mips_tb)clk = 0 # 710 (Write GPR)PC00000000010000000000000001000100: WriteAddress01111 <= Data00000000000000000000000000001010 # 710 (PC)NextPcAddr00000000010000000000000001000100 # 710 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000001010, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001100, out = 00000000000000000000000000001010 # 710 (IM)Current Code:000000 01001 01100 01001 00000 100001 ; TheAddrOfCurCode = 00000000010000000000000001001000 # 710 (NPC)CurPCAddr:00000000010000000000000001001000 NextPcAddr:00000000010000000000000001001100 # 710 (MUX RegWriteAddr)control = 01, din0 = 01100, din1 = 01001, out = 01001 # 710 (EXT)EXTOp = 00; EXTin = 0100100000100001 EXTout = 00000000000000000100100000100001 # 710 (ALU)(add)A = 00000000000000000000000000000011, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000100 # 710 (NPC)CurPCAddr:00000000010000000000000001001000 NextPcAddr:00000000010000000000000001001100 # 710 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000001, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000001 # 710 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001001100, out = 00000000000000000000000000000100 # 710 (mips_tb)clk = 1 # 711 (Show GPR) # 711 GPR 0 = 00000000 # 711 GPR 1 = 00000000 # 711 GPR 2 = 00000000 # 711 GPR 3 = 00000000 # 711 GPR 4 = 00000000 # 711 GPR 5 = 00000000 # 711 GPR 6 = 00000000 # 711 GPR 7 = 00000000 # 711 GPR 8 = 00000004 # 711 GPR 9 = 00000003 # 711 GPR 10 = 00ff0000 # 711 GPR 11 = 00ff5555 # 711 GPR 12 = 00000001 # 711 GPR 13 = 00000008 # 711 GPR 14 = 00000009 # 711 GPR 15 = 0000000a # 711 GPR 16 = 00000000 # 711 GPR 17 = 00000000 # 711 GPR 18 = 00000000 # 711 GPR 19 = 00000000 # 711 GPR 20 = 00000000 # 711 GPR 21 = 00000000 # 711 GPR 22 = 00000000 # 711 GPR 23 = 00000000 # 711 GPR 24 = 00000000 # 711 GPR 25 = 00000000 # 711 GPR 26 = 00000000 # 711 GPR 27 = 00000000 # 711 GPR 28 = 00000000 # 711 GPR 29 = 00000000 # 711 GPR 30 = 00000000 # 711 GPR 31 = 00000000 # 720 (mips_tb)clk = 0 # 730 (Write GPR)PC00000000010000000000000001001000: WriteAddress01001 <= Data00000000000000000000000000000100 # 730 (PC)NextPcAddr00000000010000000000000001001000 # 730 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000100 # 730 (ALU)(add)A = 00000000000000000000000000000100, B = 00000000000000000000000000000001, Result = 00000000000000000000000000000101 # 730 (IM)Current Code:000100 01000 01001 00000 00000 000001 ; TheAddrOfCurCode = 00000000010000000000000001001100 # 730 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010000 # 730 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000100 # 730 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000100, din1 = 00000000000000000100100000100001, out = 00000000000000000000000000000100 # 730 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000101, din1 = 00000000000000000000000000000000, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000101 # 730 (MUX RegWriteAddr)control = 01, din0 = 01001, din1 = 00000, out = 00000 # 730 (Control) BEQ # 730 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=01 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 730 (EXT)EXTOp = 00; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 730 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010000 # 730 (MUX RegWriteAddr)control = 00, din0 = 01001, din1 = 00000, out = 01001 # 730 (EXT)EXTOp = 01; EXTin = 0000000000000001 EXTout = 00000000000000000000000000000001 # 730 (ALU)(DEFAULT) # 730 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000001, out = 00000000000000000000000000000100 # 730 (Control) BEQ # 730 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=1 ExtOp=01 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 730 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010000 # 730 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001010000, out = 00000000000000000000000000000000 # 730 (NPC)CurPCAddr:00000000010000000000000001001100 NextPcAddr:00000000010000000000000001010100 # 730 (ALU)(DEFAULT) # 730 (mips_tb)clk = 1 # 731 (Show GPR) # 731 GPR 0 = 00000000 # 731 GPR 1 = 00000000 # 731 GPR 2 = 00000000 # 731 GPR 3 = 00000000 # 731 GPR 4 = 00000000 # 731 GPR 5 = 00000000 # 731 GPR 6 = 00000000 # 731 GPR 7 = 00000000 # 731 GPR 8 = 00000004 # 731 GPR 9 = 00000004 # 731 GPR 10 = 00ff0000 # 731 GPR 11 = 00ff5555 # 731 GPR 12 = 00000001 # 731 GPR 13 = 00000008 # 731 GPR 14 = 00000009 # 731 GPR 15 = 0000000a # 731 GPR 16 = 00000000 # 731 GPR 17 = 00000000 # 731 GPR 18 = 00000000 # 731 GPR 19 = 00000000 # 731 GPR 20 = 00000000 # 731 GPR 21 = 00000000 # 731 GPR 22 = 00000000 # 731 GPR 23 = 00000000 # 731 GPR 24 = 00000000 # 731 GPR 25 = 00000000 # 731 GPR 26 = 00000000 # 731 GPR 27 = 00000000 # 731 GPR 28 = 00000000 # 731 GPR 29 = 00000000 # 731 GPR 30 = 00000000 # 731 GPR 31 = 00000000 # 740 (mips_tb)clk = 0 # 750 (GPR)Write:false # 750 (PC)NextPcAddr00000000010000000000000001001100 # 750 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001011000, out = 00000000000000000000000000000000 # 750 (IM)Current Code:001111 00000 01000 00000 00000 000000 ; TheAddrOfCurCode = 00000000010000000000000001010100 # 750 (NPC)CurPCAddr:00000000010000000000000001010100 NextPcAddr:00000000010000000000000001010100 # 750 (MUX RegWriteAddr)control = 00, din0 = 01000, din1 = 00000, out = 01000 # 750 (Control) LUI # 750 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 750 (EXT)EXTOp = 01; EXTin = 0000000000000000 EXTout = 00000000000000000000000000000001 # 750 (ALU)(DEFAULT) # 750 (NPC)CurPCAddr:00000000010000000000000001010100 NextPcAddr:00000000010000000000000001010100 # 750 (Control) LUI # 750 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 750 (EXT)EXTOp = 00; EXTin = 0000000000000000 EXTout = 00000000000000000000000000000000 # 750 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000000000100, Result = 00000000000001000000000000000000 # 750 (NPC)CurPCAddr:00000000010000000000000001010100 NextPcAddr:00000000010000000000000001011000 # 750 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000100, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 750 (MUX RegWriteData)control = 00, din0 = 00000000000001000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001011000, out = 00000000000001000000000000000000 # 750 (ALU)(16toUp32)A = 00000000000000000000000000000000, B = 00000000000000000000000000000000, Result = 00000000000000000000000000000000 # 750 (Control) LUI # 750 (CTRL)RegDst=00 ALUSrc=1 MemToReg=00 RegWrite=1 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=011 j_ctr=0 jr_ctr=0 DMSrc=0 # 750 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001011000, out = 00000000000000000000000000000000 # 750 (NPC)CurPCAddr:00000000010000000000000001010100 NextPcAddr:00000000010000000000000001011000 # 750 (mips_tb)clk = 1 # 760 (mips_tb)clk = 0 # 770 (Write GPR)PC00000000010000000000000001010100: WriteAddress01000 <= Data00000000000000000000000000000000 # 770 (PC)NextPcAddr00000000010000000000000001010100 # 770 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001011100, out = 00000000000000000000000000000000 # 770 (MUX DataTo DM/ALU)control = 0, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 770 (MUX DataTo DM/ALU)control = 1, din0 = 00000000000000000000000000000000, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 770 (IM)Current Code:xxxxxx xxxxx xxxxx xxxxx xxxxx xxxxxx ; TheAddrOfCurCode = 00000000010000000000000001011000 # 770 (NPC)CurPCAddr:00000000010000000000000001011000 NextPcAddr:00000000010000000000000001011100 # 770 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 00000000000000000000000000000000, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 770 (MUX DataTo DM/ALU)control = 1, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 00000000000000000000000000000000, out = 00000000000000000000000000000000 # 770 (MUX RegWriteAddr)control = 00, din0 = xxxxx, din1 = xxxxx, out = xxxxx # 770 (Control) DEFAULT2 # 770 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 770 (EXT)EXTOp = 00; EXTin = xxxxxxxxxxxxxxxx EXTout = 0000000000000000xxxxxxxxxxxxxxxx # 770 (ALU)(16toUp32)A = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, B = 00000000000000000000000000000000, Result = 00000000000000000000000000000000 # 770 (NPC)CurPCAddr:00000000010000000000000001011000 NextPcAddr:00000000010000000000000001011100 # 770 (Control) DEFAULT2 # 770 (CTRL)RegDst=00 ALUSrc=0 MemToReg=00 RegWrite=0 MemWrite=0 PCSrc=0 ExtOp=00 ALUctr=111 j_ctr=0 jr_ctr=0 DMSrc=0 # 770 (ALU)(DEFAULT) # 770 (MUX DataTo DM/ALU)control = 0, din0 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din1 = 0000000000000000xxxxxxxxxxxxxxxx, out = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # 770 (ALU)(DEFAULT) # 770 (mips_tb)clk = 1 # 771 (Show GPR) # 771 GPR 0 = 00000000 # 771 GPR 1 = 00000000 # 771 GPR 2 = 00000000 # 771 GPR 3 = 00000000 # 771 GPR 4 = 00000000 # 771 GPR 5 = 00000000 # 771 GPR 6 = 00000000 # 771 GPR 7 = 00000000 # 771 GPR 8 = 00000000 # 771 GPR 9 = 00000004 # 771 GPR 10 = 00ff0000 # 771 GPR 11 = 00ff5555 # 771 GPR 12 = 00000001 # 771 GPR 13 = 00000008 # 771 GPR 14 = 00000009 # 771 GPR 15 = 0000000a # 771 GPR 16 = 00000000 # 771 GPR 17 = 00000000 # 771 GPR 18 = 00000000 # 771 GPR 19 = 00000000 # 771 GPR 20 = 00000000 # 771 GPR 21 = 00000000 # 771 GPR 22 = 00000000 # 771 GPR 23 = 00000000 # 771 GPR 24 = 00000000 # 771 GPR 25 = 00000000 # 771 GPR 26 = 00000000 # 771 GPR 27 = 00000000 # 771 GPR 28 = 00000000 # 771 GPR 29 = 00000000 # 771 GPR 30 = 00000000 # 771 GPR 31 = 00000000 # 780 (mips_tb)clk = 0 # 790 (GPR)Write:false # 790 (PC)NextPcAddr00000000010000000000000001011000 # 790 (MUX RegWriteData)control = 00, din0 = 00000000000000000000000000000000, din1 = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, din2 = 00000000010000000000000001100000, out = 00000000000000000000000000000000 # ** Note: $finish : C:/modeltech64_10.4/examples/work/MyCPU/mips_tb.v(20) # Time: 2 us Iteration: 0 Instance: /mips_tb # 1 # Break in Module mips_tb at C:/modeltech64_10.4/examples/work/MyCPU/mips_tb.v line 20
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。