Preview

lab1_32x32_registerfile

Good Essays
Open Document
Open Document
1009 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
lab1_32x32_registerfile
Fre-E CSE471 - Computer Organization and Design
Semester 2 2012-2013
Danang University of Technology, Faculty of Electronics and Telecommunications
Prepared by Ho Viet Viet, Pham Xuan Trung and Nguyen Van Hieu

Lab1: Design a MIPS 32 by 32 Register File
Due Date:
Lab Objectives:
For this lab1 you are to construct a 32 by 32 register file using Verilog HDL. The register file is introduced in chapter 4 of the class textbook. Within the 32 by 32 register file is an array of 32 different 32-bit registers. These registers must be constructed from D flip-flops (positive edge-triggered). Note that for MIPS, register zero ($zero) is hardwired to always output the value zero, regardless of what may or may not be written to it. The figure below shows a block diagram of a register file (this is a modified reproduction of figure 4.7 on page 310 of the textbook: Computer Organization and
Design 4th edition by Patterson and Hennessy).
5

Read
Register 1

5

Read
Register 2

5

Read
Data 1

32

Read
Data 2

32

Write
Register

32

Write
Data

RegWrite

Read Register 1 and Read Register 2 select the registers whose values are output on the Read Data 1 bus and Read Data 2 bus respectively. The Write Register input bus selects the target of the write; when RegWrite is true, the information on the Write Data bus register is written into that register.
Computer resources and software tools:
PCs with Software Quartus II, ModelSim, IVerilog installed, testbench file: regstim.v
Implementation:
A simple implementation of the 32 by 32 MIPS register file can be made using
Registers composed of D flip-flops, a 5:32 enabled decoder, and two large 32x32 to 32 multiplexors. This is shown in the following block diagram (note that the clock is omitted for clarity).

32

Register 1

32

Register 2

32

Decoder

Multiplexor

0

RegWrite

32

Register 31

5

Read Register 1

5
32
32

Write Data

32

32

You May Also Find These Documents Helpful

  • Satisfactory Essays

    4. In the source window right click on the device and select add source and add the written verilog code as shown in figure 3 and figure 4.…

    • 419 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1210 Chapter 1 Review

    • 1315 Words
    • 6 Pages

    6. A user file has opened a word processor, typed the numbers 123456789, and stored the document as a file called report 1. Which of the following determines, in part what bits the computer stores in the file to represent the text typed into the report.…

    • 1315 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    See the Assignment 3 post in Main forum or Course Materials forum for detailed instructions.…

    • 571 Words
    • 4 Pages
    Satisfactory Essays
  • Powerful Essays

    En1320 Unit 1 Research Paper 1

    • 27742 Words
    • 111 Pages

    instructions to load the registers of the processor with data from a central memory and to…

    • 27742 Words
    • 111 Pages
    Powerful Essays
  • Powerful Essays

    13. Which two tools might a software developer or system administrator use to register a component of an application in the windows registry?…

    • 850 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    Quiz Comp Archi

    • 438 Words
    • 3 Pages

    12) Please list registers and their functions in ARM. How many general purpose registers and how to use them in the program?…

    • 438 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Register is a record sense keeps. This record is to record if the students attend the day at…

    • 676 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Sheet01

    • 1045 Words
    • 5 Pages

    4. What is the result of the following code and where is it kept? LDAA #$15 ADDA #$13 5. Which of the following instructions is (are) illegal? a- LDAA #500 b- LDAA #50 c- LDAA #00 d- LDAA #$255 e- LDAA #$25 f- LDAA #$F5 g- ADDA mybyte , #$25 6. Which of the following instructions is (are) illegal? a- ADDA #$300 b- ADDA #$50 c- ADDA #$500 d- ADDA #$255 e- ADDA #12 f- ADDA#$F5 g- ADDA #$25 7. 8. 9. 10. Show a simple code to load values 30H and 97H into locations 805H and 806H, respectively. Show a simple code to load value 55H into locations 300H and 308H. Show a simple code to load value 5FH into Port B. Which of the following is an invalid use of the immediate addressing mode? a- LDDA #$24 b- LDAA $30 c- LDAA #$60…

    • 1045 Words
    • 5 Pages
    Satisfactory Essays
  • Better Essays

    1. Admission registers: This register has details about the student’s entry and exit, details of education. It helps trace entry and exit of any student admitted in the school. It also provides personal and family background of a student.…

    • 1076 Words
    • 5 Pages
    Better Essays
  • Powerful Essays

    knowing

    • 1842 Words
    • 8 Pages

    purpose of this book: to show you how to communicate with the SAS macro facility so…

    • 1842 Words
    • 8 Pages
    Powerful Essays
  • Good Essays

    Circuit Debugging Tips

    • 859 Words
    • 4 Pages

    describes the control registers related to various ports. Sometimes you may have to look in other…

    • 859 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Question Papers

    • 389 Words
    • 2 Pages

    b)Name the header files that shall be needed for the successfully execution of following code: 2…

    • 389 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    maths

    • 9650 Words
    • 53 Pages

    The original form of this book is L TEX source code. Compiling this code has the…

    • 9650 Words
    • 53 Pages
    Powerful Essays
  • Satisfactory Essays

    Online Grading System

    • 392 Words
    • 2 Pages

    On the thesis A Computer-Based Generic Registration System by Julius Ivan A. Layos (2002), he stated that computers are known for their speed, accuracy and efficiency. The proponent conducted this study that arrived to create a standard computer based registration system for elementary and high schools. The software is designed to run on Windows 95, 98, NT, ME and 2000. Visual Basic 6 by Microsoft was the programming used in implementing the software product. It is the most popular Rapid Application Development (RAD) tool. One very important feature of Visual Basic is a reversal of the normal approach to programming. Adobe Photoshop is also one of the software used in creating the system.…

    • 392 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    registration

    • 1536 Words
    • 7 Pages

    Registration is a method of officially recording something. Usually something is registered to claim more rights, or to protect ownership, or because the law says it must be registered to be used legally. Based on the definition, a registration system is an application which a certain individual can record his or her data or information, which is commonly used in different companies, schools etc. Just like a Online System, registration system is a system which can be found in many pages or websites in the Internet. We can easily make an account in a certain page we want.…

    • 1536 Words
    • 7 Pages
    Powerful Essays

Related Topics