Spring 2008 Signoff: By 14 March, 2008 ECE Computer Architecture and Operating Systems. Lab Assignment 2 Pipelined MIPS

Similar documents
LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

Computer Organization and Components

Generating MIF files

CSE 141L Computer Architecture Lab Fall Lecture 2

ASYNCHRONOUS COUNTERS

EE361: Digital Computer Organization Course Syllabus

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Design of Digital Circuits (SS16)

Lesson 1 - Creating a Project

Counters and Decoders

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

The 104 Duke_ACC Machine

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Digital Systems. Syllabus 8/18/2010 1

Computer organization

UT69R000 MicroController Software Tools Product Brief

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Wiki Lab Book. This week is practice for wiki usage during the project.

State Machines in VHDL

Lab 1: Introduction to Xilinx ISE Tutorial

EC313 - VHDL State Machine Example

ECE 451 Verilog Exercises. Sept 14, James Barnes

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern:

A New Paradigm for Synchronous State Machine Design in Verilog

Finite State Machine Design A Vending Machine

CS311 Lecture: Sequential Circuits

Cascaded Counters. Page 1 BYU

Figure 1: Graphical example of a mergesort 1.

A Verilog HDL Test Bench Primer Application Note

Memory Elements. Combinational logic cannot remember

Lesson 12 Sequential Circuits: Flip-Flops

Digital Systems Design! Lecture 1 - Introduction!!

Pipeline Hazards. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by Arvind and Krste Asanovic

AC : A PROCESSOR DESIGN PROJECT FOR A FIRST COURSE IN COMPUTER ORGANIZATION

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

CHAPTER 11: Flip Flops

Lecture 8: Synchronous Digital Systems

Chapter 2 Logic Gates and Introduction to Computer Architecture

Modeling Latches and Flip-flops

Traffic Light Controller. Digital Systems Design. Dr. Ted Shaneyfelt

Asynchronous Counters. Asynchronous Counters

EXPERIMENT 8. Flip-Flops and Sequential Circuits

No serious hazards are involved in this laboratory experiment, but be careful to connect the components with the proper polarity to avoid damage.

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Software Version 10.0d Mentor Graphics Corporation All rights reserved.

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

Counters. Present State Next State A B A B

Sequential Logic: Clocks, Registers, etc.

PCSpim Tutorial. Nathan Goulding-Hotta v0.1

FPGA Implementation of an Advanced Traffic Light Controller using Verilog HDL

Modeling Registers and Counters

16-bit ALU, Register File and Memory Write Interface

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Multiplexers Two Types + Verilog

Lecture 7: Clocking of VLSI Systems

Fall 2006 CS/ECE 333 Lab 1 Programming in SRC Assembly

An Introduction to MPLAB Integrated Development Environment

Module 3: Floyd, Digital Fundamental

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Introducción. Diseño de sistemas digitales.1

Solutions. Solution The values of the signals are as follows:

Quartus II Software Design Series : Foundation. Digitale Signalverarbeitung mit FPGA. Digitale Signalverarbeitung mit FPGA (DSF) Quartus II 1

A FPGA Implementation of a MIPS RISC Processor for Computer Architecture Education

Lab 1: Full Adder 0.0

Altera Error Message Register Unloader IP Core User Guide

Summary of the MARIE Assembly Language

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

Finite State Machine Design and VHDL Coding Techniques

ModelSim-Altera Software Simulation User Guide

EE360: Digital Design I Course Syllabus

CS352H: Computer Systems Architecture

Project Development & Software Design

Getting the Most Out of Synthesis

Price: see your VeriFone sales representative. Per student, Excluding VAT.

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

EE411: Introduction to VLSI Design Course Syllabus

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Electronic Circuits Spring 2007

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

MipsIt A Simulation and Development Environment Using Animation for Computer Architecture Education

Lecture 10: Sequential Circuits

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

The components. E3: Digital electronics. Goals:

A Comparison of Student Learning in an Introductory Logic Circuits Course: Traditional Face-to-Face vs. Fully Online

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December :59

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Using Xilinx ISE for VHDL Based Design

Virtual Machines as an Aid in Teaching Computer Concepts

Lecture-3 MEMORY: Development of Memory:

Digital Design with VHDL

Engineering Change Order (ECO) Support in Programmable Logic Design

Transcription:

Spring 2008 Signoff: By 14 March, 2008 ECE 3055 Computer Architecture and Operating Systems Lab Assignment 2 Pipelined MIPS For this assignment, you must go to lab hours held by a TA and have your assignment checked off by him before the due day. There is no need to turn in any separate document. Honor Code. This assignment must be done individually. You can discuss questions with other students but you are not allowed to copy other s code. For those who violate the rule, both the originator and the copier will receive zero credit and will be immediately reported to the Dean of Students for further action. This assignment has two parts, the first part is simple, you just have to run an existing VHDL-based MIPS hardware simulation using an HDL simulation tool ModelSim and understand the results. The second part, adding Pipelining to the model may take a significant effort for some of you. Note that the grading (TA check-off) of this assignment is completely based on your implementation of the Pipelining part. ModelSim is available in the ECE PC labs, and the Sun Solaris labs. You can also download a Starter version from the web. Please go to our course website, and follow the instructions to acquire the software and installation guide. Before you start working on this project, you need to download the provided MIPS VHDL source files from the assignments page. 1. Create a Project file in ModelSim and compile the MIPS single cycle datapath design. Information on this model was covered in our class lecture and also described in the textbook. After compilation, please perform the following steps: Display the waveform (timing diagram) from the simulation. Prior to advancing your simulation by Run command, you need to set the master clock and assert the reset signal to clear the PC to the default starting PC (0x00000000). Then you need to deassert the reset signal to start the normal operation of the machine. Verify that the information on the timing diagram shows that the hardware is functioning correctly. The instructions and data memory have been programmed with default values in IFETCH.VHD and DMEMORY.VHD. Look at the program counter, instruction, register file, ALU outputs, and control signals on the waveform and carefully follow the execution of each instruction in the default program. During this exercise, you need to learn how to read values of waveform for signals from different VHDL files, how to debug the VHDL code using breakpoints, and how to use commands such as step or examine.

(These commands can be entered using the Transcript sub-window at the bottom.) 2. Pipeline the MIPS VHDL simulation. Test your VHDL model by running a simulation of the example program on page 396 using the hardware shown in Figure 6.27 in Computer Organization and Design The Hardware/Software Interface. To minimize changes, pipeline registers must be placed in the VHDL module that generates the input to the pipeline. As an example, all of the pipeline registers that store control signals must be placed in the control module. Compile and check the control module first, since it is simple to see if it works correctly when you add the pipeline flip-flops. Use the following notation to add new latched signals, add a "D_" in front of the signal name to indicate it is the input to a D flip-flop used in a pipeline register. Signals that go through two D flip- flops would be "DD_" and three would be "DDD_". As an example, instruction would be the registered version of the signal, D_instruction. This will minimize the changes needed in the top level module since the global signal names used to connect modules will not change. Add pipeline registers to the existing modules that generate the inputs to the pipeline registers shown in the text. Add signal and process statements to model the pipeline modules see the PC in the IFETCH.VHD module for an example of how this can work (the PC is already pipelined). A few muxes may have to be moved to different modules. In DMEMORY.VHD, the data memory address and data inputs are already pipelined inside the altsyncram function used for data memory (this is why it has a clock input). You will need to take this into account when you pipeline your design. High speed memory writes almost always require a clock and the design in the book skips over this point since they do not have their design running on real hardware. The control module should contain all of the control pipeline registers 1, 2, or 3 stages of pipeline registers for control signals. Some control signals must be reset to zero, so use a D flip-flop with a synchronous reset for these pipeline registers. This generates a flip-flop with a Clear input that will be tied to Reset. Critical pipeline registers with control signals such as regwrite or memwrite should be cleared at reset so that the pipeline starts up correctly. The MIPS instruction sll $0, $0, 0 is all zeros in machine code and does not modify any values in registers or memory. It is used to initialize the IF/ID pipeline at reset. You will need to replace the instruction definitions in INST_MEM with your new machine code for the test program. Put an initial data value of 0x55555555 in word 21 and 0xAAAAAAAA in word 25 for your programs memory test data (used by lw instructions in the test program). Initialize other data locations to all 0 s. Sections 6.2 and 6.3 of Computer Organization and Design The Hardware/Software Interface contain additional background information on pipelining. Note that the VHDL input signal, function_opcode in EXECUTE.VHD can be tied to the low six-bits of the pipelined instruction sign-extend field as shown in the text s diagrams. Your simulation should show the major busses just as in part one. You can add other signals as needed. To display internal signals in the simulation, you may also need to make them outputs from the toplevel module. Print out the simulation results. Label the simulation output to indicate how

the instructions move through the pipeline. Note: This program deliberately does not contain any data or branch hazards. Hardware for forwarding and branch flushing will be added in later labs.