# Computer_architecture **Repository Path**: alexies-he/computer_architecture ## Basic Information - **Project Name**: Computer_architecture - **Description**: 以下是该项目的基本介绍,项目基于西电微电子学院研究生课程《计算机组成与架构 (X1MI9030)》的期末大作业:  该项目是一个基于16位宽的MIPS指令集架构的LC_3处理器设计,该处理器是一个多周期结构设计(后期会优化为五级流水线设计) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-06-20 - **Last Updated**: 2022-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: Verilog, mips ## README # Computer_architecture #### 项目介绍 **以下是该项目的基本介绍,项目基于西电微电子学院研究生课程《计算机组成与架构 (X1MI9030)》的期末大作业:**  该项目是一个基于16位宽的MIPS指令集架构的LC_3处理器设计,该处理器是一个多周期结构设计(后期会优化为五级流水线设计) #### 文件结构 1. 文件树──**work** |──My_code ──**IP_CORE** |——IP_Library |——homework 2. 文件说明其中work/My_code是处理器的源代码;IP_CORE是之前写过的一些数字小模块;包括一些运算单元等;在My_cdoe中包含LC_3.xlsx是LC_3的状态机的微码 3. 设计架构说明 ![输入图片说明](work/My_code/doc/The%20microstructure%20of%20LC_3--1.png) #### RAM中指令说明 1. 初始化过程 ```assembly # Initialize 0:AND R0(DR) R7(SR1) 0(imm5:000) =>R0 = 0 1:AND R1(DR) R7(SR1) 0(imm5:000) =>R1 = 0 2:AND R2(DR) R7(SR1) 0(imm5:000) =>R2 = 0 3:AND R3(DR) R7(SR1) 0(imm5:000) =>R3 = 0 4:AND R4(DR) R7(SR1) 0(imm5:000) =>R4 = 0 5:AND R5(DR) R7(SR1) 0(imm5:000) =>R5 = 0 6:AND R6(DR) R7(SR1) 0(imm5:000) =>R6 = 0 7:AND R7(DR) R7(SR1) 0(imm5:000) =>R7 = 0 ``` 2. 指令测试过程 ```assembly # Test for ADD_Instr 8:ADD R1(DR) R0(SR1) 2(imm5:010) =>R1 = 2 9:ADD R2(DR) R0(SR1) 2(imm5:010) =>R2 = 2 10:ADD R4(DR) R0(SR1) 16(imm5:10000)=>R4 = 16 # Test for LD_Instr 11:LD R3(DR) 8(PCoffset+PC = 20)=>R3 <- MEM[20]=8 # Test for SRI_Instr 12:STI R2(DR) 8(PCoffset+PC = 21)=>MEM[21] <- R2=2 # Test for JMP_Instr 14:JMP R4(DR) =>PC <- R4=16 15: 16:LDR R5(DR) R2(BsR) 21(offset6) =>R5 <- MEM[21+2] #DATA 20:Store 8 21:MEM[21] <- R2 = 2 22:Store 23:Store 77 ```