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

  • Powerful Essays

    CODE FOR THE ABOVE FRAGMENT addi $t6, $zero, 101 # the loop termination value add $t0, $zero, $zero # i = 0 addi $t2, $a0, 0 # ptr to current A[i] addi $t3, $a1, 0 # ptr to current B[i] loop: lw $t4, 0($t3) # load B[i] add $t4, $t4, $s0 # B[i] + c sw $t4, 0($t2) # store in A[i] addi $t0, $t0, 1 # i++ addi $t2, $t2, 4 # ptr to next A[i] addi $t3, $t3, 4 # ptr to next B[i] bne $t0, $t6, loop # if i < 101, goto loop IF ANY QUERIES REGARDING CODE…

    • 107 Words
    • 1 Page
    Powerful 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

    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
  • Good Essays

    Nucleus: The nucleus is the most obvious organelle in any eukaryotic cell. It is enclosed in a double membrane and communicates with the surrounding cytosol via numerous nuclear pores. Within the nucleus is the DNA responsible for providing the cell with its unique characteristics. The DNA is similar in every cell of the body, but depending on the specific cell type, some genes may be turned on or off - that's why a liver cell is different from a muscle cell, and a muscle cell is different from a fat cell. When a cell is dividing, the nuclear chromatin (DNA and surrounding protein) condenses into chromosomes that are easily seen by microscopy.…

    • 1224 Words
    • 5 Pages
    Good Essays
  • Good Essays

    it320 assignment 1-3

    • 1779 Words
    • 8 Pages

    5. This chapter describes the concepts behind how a CPU reads the contents from RAM. Which of the following is true about the process of read data, as described in the chapter? (A. the CPU tells the RAM which address holds the data that the CPU wants to read.)…

    • 1779 Words
    • 8 Pages
    Good 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
  • 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

    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
  • 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
  • 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

Related Topics