1. Objectives: To design and verify a simple RISC processor in Verilog 2. Processor Specifications 1....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Objectives: To design and verify a simple RISC processor in Verilog 2. Processor Specifications 1. The instruction size is 32 bits 2. 32 32-bit general-purpose registers: from RO to R31. 3. A special purpose register for the program counter (PC) 4. It has a stack called control stack which saves the return addresses 5. Stack pointer (SP), another special purpose register to point to the top of the control stack. SP holds the address of the empty element on the top of the stack. For simplicity, you can assume a separate on-chip memory for the stack, and the initial value of SP is zero. 6. Four instruction types (R-type, 1-type, J-type, and S-type). 7. The processor's ALU has an output signal called "zero" signal, which is asserted when the result of the last ALU operation is zero. 8. Separate data and instructions memories 3. Instruction Types and Formats As mentioned above, this ISA has four instruction formats, namely, R-type, I-type, J-type, and S-type. These four types have the following common fields: a. 2-bit instruction type (00: R-Type, 01: J-Type, 10: l-type, 11: S-type) Page 1 of 5 b. 5-bit function, to determine the specific operation of the instruction c. Stop bit, which is the least significant bit of each instruction binary format, and it is used to mark the end of a function code block. In other words, if the value of this stop bit is "1", this means that this instruction is the last instruction of the function, and hence the execution control should return to the return address which is stored on the top of the control stack. R-Type (Register Type) Format 5-bit Rs1: first source register 5-bit Rd: destination register 5-bit Rs2: second source register 9-bit unused Function 5 I-Type (Immediate Type) Format Function5 Rs15 Rd5 Rs15 Rd5 Rs25 5-bit Rs1: first source register 5-bit Rd: destination register 14-bit immediate: unsigned for logic instructions, and signed otherwise. Function5 J-Type (Jump Type) Format 24-bit signed immediate: jump offset S-Type (Shift Type) Format Unused Immediate 4 14 Type Signed Immediate24 Type Stop Type 5-bit Rs1: first source register 5-bit Rd: destination register 5-bit Rs2: second source register. This register stores the shift amount in case the shift amount is variable and it is calculated at runtime 5-bit SA: the constant shift amount. 4-bit unused Stop Stop No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Instr AND ADD SUB CMP ANDI ADDI LW SW BEQ J JAL SLL SLR SLLV SLRV Meaning R-Type Instructions Reg(Rd) = Reg(Rs1) & Reg(Rs2) Reg(Rd) = Reg(Rs1) + Reg(Rs2) Reg(Rd) = Reg(Rs1) - Reg(Rs2) zero-signal = Reg(Rs) < Reg(Rs2) I-Type Instructions Reg(Rd) = Reg(Rs1) & Immediate 4 Reg(Rd) Reg(Rs1) + Immediate 14 Reg(Rd) = Mem (Reg(Rs1) + Imm4) Mem(Reg(Rs1) +Imm4) Reg(Rd) Branch if (Reg(Rs1) == Reg(Rd)) J-Type Instructions 24 = PC = PC + Immediate24 PC = PC + Immediate24 Stack.Push (PC + 4) S-Type Instructions Reg(Rd) = Reg(Rs1) < < SA5 Reg(Rd) = Reg(Rs1) >> SA5 Reg(Rd) = Reg(Rs1) < < Reg(Rs2) Reg(Rd) = Reg(Rs1) >> Reg(Rs2) Function Value 00000 00001 00010 00011 00000 00001 00010 00011 00100 00000 00001 00000 00001 00010 00011 5. RTL Design You need to design and implement a datapath and control path that support all of the aforementioned instructions. You have three design options 1. Single cycle processor. In this case the project will be graded out of 80% 2. Multi-cycle processor with five stages: fetch, decode, execute, memory access, and write back. Page 3 of 5 In this case the project will be graded out of 100% 3. 5-stage pipelined processor (fetch, decode, execute, memory access, and write back). In this case, the project will be graded out of 120%, i.e., there is a bonus that can reach 20% of the project grade. 6. Verification To verify the RTL design, write a testbench around it. Moreover, you need to write multiple code sequences in the given ISA and show how the processor you designed executed these code sequences. 1. Objectives: To design and verify a simple RISC processor in Verilog 2. Processor Specifications 1. The instruction size is 32 bits 2. 32 32-bit general-purpose registers: from RO to R31. 3. A special purpose register for the program counter (PC) 4. It has a stack called control stack which saves the return addresses 5. Stack pointer (SP), another special purpose register to point to the top of the control stack. SP holds the address of the empty element on the top of the stack. For simplicity, you can assume a separate on-chip memory for the stack, and the initial value of SP is zero. 6. Four instruction types (R-type, 1-type, J-type, and S-type). 7. The processor's ALU has an output signal called "zero" signal, which is asserted when the result of the last ALU operation is zero. 8. Separate data and instructions memories 3. Instruction Types and Formats As mentioned above, this ISA has four instruction formats, namely, R-type, I-type, J-type, and S-type. These four types have the following common fields: a. 2-bit instruction type (00: R-Type, 01: J-Type, 10: l-type, 11: S-type) Page 1 of 5 b. 5-bit function, to determine the specific operation of the instruction c. Stop bit, which is the least significant bit of each instruction binary format, and it is used to mark the end of a function code block. In other words, if the value of this stop bit is "1", this means that this instruction is the last instruction of the function, and hence the execution control should return to the return address which is stored on the top of the control stack. R-Type (Register Type) Format 5-bit Rs1: first source register 5-bit Rd: destination register 5-bit Rs2: second source register 9-bit unused Function 5 I-Type (Immediate Type) Format Function5 Rs15 Rd5 Rs15 Rd5 Rs25 5-bit Rs1: first source register 5-bit Rd: destination register 14-bit immediate: unsigned for logic instructions, and signed otherwise. Function5 J-Type (Jump Type) Format 24-bit signed immediate: jump offset S-Type (Shift Type) Format Unused Immediate 4 14 Type Signed Immediate24 Type Stop Type 5-bit Rs1: first source register 5-bit Rd: destination register 5-bit Rs2: second source register. This register stores the shift amount in case the shift amount is variable and it is calculated at runtime 5-bit SA: the constant shift amount. 4-bit unused Stop Stop No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Instr AND ADD SUB CMP ANDI ADDI LW SW BEQ J JAL SLL SLR SLLV SLRV Meaning R-Type Instructions Reg(Rd) = Reg(Rs1) & Reg(Rs2) Reg(Rd) = Reg(Rs1) + Reg(Rs2) Reg(Rd) = Reg(Rs1) - Reg(Rs2) zero-signal = Reg(Rs) < Reg(Rs2) I-Type Instructions Reg(Rd) = Reg(Rs1) & Immediate 4 Reg(Rd) Reg(Rs1) + Immediate 14 Reg(Rd) = Mem (Reg(Rs1) + Imm4) Mem(Reg(Rs1) +Imm4) Reg(Rd) Branch if (Reg(Rs1) == Reg(Rd)) J-Type Instructions 24 = PC = PC + Immediate24 PC = PC + Immediate24 Stack.Push (PC + 4) S-Type Instructions Reg(Rd) = Reg(Rs1) < < SA5 Reg(Rd) = Reg(Rs1) >> SA5 Reg(Rd) = Reg(Rs1) < < Reg(Rs2) Reg(Rd) = Reg(Rs1) >> Reg(Rs2) Function Value 00000 00001 00010 00011 00000 00001 00010 00011 00100 00000 00001 00000 00001 00010 00011 5. RTL Design You need to design and implement a datapath and control path that support all of the aforementioned instructions. You have three design options 1. Single cycle processor. In this case the project will be graded out of 80% 2. Multi-cycle processor with five stages: fetch, decode, execute, memory access, and write back. Page 3 of 5 In this case the project will be graded out of 100% 3. 5-stage pipelined processor (fetch, decode, execute, memory access, and write back). In this case, the project will be graded out of 120%, i.e., there is a bonus that can reach 20% of the project grade. 6. Verification To verify the RTL design, write a testbench around it. Moreover, you need to write multiple code sequences in the given ISA and show how the processor you designed executed these code sequences.
Expert Answer:
Answer rating: 100% (QA)
The objectives of this project are to design and verify a simple RISC processor in Verilog The processor will have the following specifications The in... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
How does Realism as an artistic movement negotiate the tension between objective representation and subjective interpretation, particularly in its portrayal of everyday life and social realities ?
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
When silicon chips are fabricated, defects in materials (e.g., silicon) and manufacturing errors can result in defective circuits. A very common defect is for one wire to affect the signal in...
-
A physical pendulum of mass m = 3 . 3 6 kg is comprised of an odd shape that has a centre - of - mass a distance of d = 0 . 5 5 5 m from the pivot point. The pendulum is displaced from equilibrium to...
-
Determine the x, y, z components of internal loading at a section passing through point C in the pipe assembly. Neglect the weight of the pipe. Units Used: kip = 103 lb F1 = (0 350 -400) lb F2 = (150...
-
If a tracked dozer is used about 1,500 hours per year. It cost $500,000 new and has a useful life of 15,000 hours. Estimated salvage value after 15,000 hours of use is $95,000. Minimum attractive...
-
An article in the Journal of Pharmaceutical Sciences \((\mathbf{8 0}, 971-977,1991)\) presents data on the observed mole fraction solubility of a solute at a constant temperature, along with...
-
Recall the Innis Investments problem. Letting S = units purchased in the stock fund M = units purchased in the money market fund Leads to the following formulation: Min8S + 3M s.t. 50S + 100M ...
-
You are given that xp0 = 1 - ( x /105)2, 0 x 105. What is the probability of (25) dies between ages 54 and 55 OR survives to at least age 55?
-
The following information is taken from the accounts of FasGrow Company. The entries in the T-accounts are summaries of the transactions that affected those accounts during the year. The overhead...
-
The total memory space of a microcomputer consisting of 128K addresses is organized into memory pages, each of 512 addresses. Starting from the lowest address, 12 memory pages are allocated to RAM,...
-
Deep Seas Submarine must implement a new engine in its submarines to meet the needs of clients who desire quieter operation. Two designs, both technologically feasible, have been created, and Deep...
-
Are there any topics on which you are already a Level 2 expert (i.e., someone who has deep knowledge about a topic)? How did you gain that expertise? What research sources or approaches would you...
-
Which of the notes regarding the Elmer Fund is correct? A. Only Note 4 B. Only Note 5 C. Both Note 4 and Note 5 Three years ago, the Albright Investment Management Company (Albright) added four new...
-
Show that the transfer function of a given digital filter is invariant with respect to a linear transformation of the state vector \[\mathbf{x}(n)=\mathbf{T} \mathbf{x}^{\prime}(n)\] where...
-
Bailey, Inc., is considering buying a new gang punch that would allow them to produce circuit boards more efficiently. The punch has a first cost of \($100\),000 and a useful life of 15 years. At the...
-
A company Digicom Parts manufactures 2 types of unique products for laptop and desktop computers. It manufactures 10 types of laptop products and 42 types of desktop products. Each product...
-
Find the image of x = k = const under w = 1/z. Use formulas similar to those in Example 1. y| y = 0 -21 -2 -1 -1, /1 12 T -1 -1 y= -2 x =0
-
Find the angle between the vectors (a) In radians (b) In degrees u = 2i3j+ k v=i - 2j + k
-
Show that the function is a joint density function and find the required probability. faxy, 0x 2,0 y 2 0, elsewhere P(0 x 1, 1 y 2) f(x, y) =
-
In Exercises find the indefinite integral by using substitution followed by integration by parts. sin sin x dx
-
Describe what sexual harassment is and what forms it can take.
-
Describe what is meant by retaliatory and constructive discharge and how to defend a claim for unfair discharge.
-
Explain public policies that protect employees from unlawful discharge.
Study smarter with the SolutionInn App