Implement a cycle-by-cycle simulator for simple five-stage

Assignment Help Computer Engineering
Reference no: EM13864296

Programming Project on Simulator for APEX

Both project parts require you to submit a hardcopy design documentation, a CD of your code and example results. Both parts also require you to demonstrate your simulator to one of the TAs. Instructions for scheduling the demos will be provided later.

PART 1. Demo to be scheduled with one of the TAs for the period 11/16 to 11/20.

This part of the project requires you to implement a cycle-by-cycle simulator for the simple 5-stage APEX pipeline. Assume that the code to be simulated is stored in a text file with one ascii string representing an instruction (in the symbolic form, such as ADD R1, R4, R6) in each line of the file. The instructions supported are:

• Register-to-register instructions: ADD, SUB, MOVC, MUL, AND, OR, EX-OR (all done on the ALU in a single cycle). You can assume that the result of multiplying two registers will fi into a single register.

• Memory instructions: LOAD, STORE

• Control flow instructions: BZ, BNZ, JUMP, BAL, HALT

Assume that there are 8 architectural registers, R0 through R7. Memory is viewed as a linear array of integer values (4 Bytes wide) numbered 0 through 9999.

The BAL register implements function calls, saves the return address in a special register X and transfers control to a specified target address:

BAL <register>, literal: saves address of next instruction in X and then sets fetch PC to contents of <reg> plus the literal.

The HALT instruction stops execution. JUMP specifies a register and a literal and transfers control to the address obtained by adding the contents of the register to the literal.

To invoke the simulator, you specify the name of the executable and the name of the ascii file that contains the code to be simulated.

Your simulator should have a command interface that allows users to execute the following commands:

Initialize: Initializes the simulator state, sets the PC of the fetch stage to point to the first instruction in the ascii code file, which is assumed to be at address 20000. Each instruction takes 4 bytes of space, so the next instruction is at address 20001, as memory words are 4 Bytes long, just like the integer data items.

Simulate <n>: simulates the number of cycles specified as <n> and waits. Simulation can stop earlier if a HALT instruction is encountered and when the HALT instruction is in the WB stage.

Display: Displays the contents of each stage in the pipeline and the contents of the first 100 memory locations containing data, starting with address 0.

PART 2. Demo to be scheduled with one of the TAs during the finals week.

This part requires you to extend and modify your simulator of Part 1 as follows to simulate a datapath that looks like Variation 2. Three function units are present:

• INT (implements integer and logical instructions) - one stage, single cycle latency.

• MUL (implements the MUL operation, non-pipelined, latency 4 cycles,).

• Memory (implements LOAD and STORE instruction, 3 pipeline stages with a single cycle latency per stage.)

The issue queue has 8 entries, the LSQ has 4 entries and the ROB has 16 entries. The physical register file has 16 registers. You can assume that a tag based forwarding mechanism is used.

The command interface is similar to that in Part 1, but the Display command displays, in addition to what is displayed in Part 1, the contents of the architectural and physical registers, what is inside each FU, the rename table, the IQ and ROB, the free list of registers and all structures relevant to renaming, including the tag and result value broadcasted etc. An additional requirement for Part 2 is that you document in detail what each team member did.

• Variation 2: A separate physical register file (PRF) and an architectural register file is used. The ROB entry of an instruction that has a destination register points to the physical register is assigned to hold the result. In this case, the physical registers are called rename buffers. The IBM Power PC 604 implements this design.

378_IBM Power PC Design.png

Reference no: EM13864296

Questions Cloud

Dolphins cost of goods sold : The accounting records of Dolphin Company revealed the following information: Dolphin's cost of goods sold is:
Cost of goods manufactured : The accounting records of Bronco Company revealed the following information: Bronco's cost of goods manufactured is:
Speech on the american dream : American Dream
What are the total costs : Total costs are $180,000 when 10,000 units are produced; of this amount, variable costs are $64,000. What are the total costs when 13,000 units are produced?
Implement a cycle-by-cycle simulator for simple five-stage : This part of the project requires you to implement a cycle-by-cycle simulator for the simple 5-stage APEX pipeline. Assume that the code to be simulated is stored in a text file with one ascii string representing an instruction.
What role does medicare and medicaid play : What role does Medicare and Medicaid play in meeting the health care needs of the American public? Which portion of Medicare is universal? What elective option does Medicare offers
What are the fixed costs per unit : The fixed costs per unit are $10 when a company produces 10,000 units of product. What are the fixed costs per unit when 8,000 units are produced?
Peremptory refers to the fact that forensic accountant : The scribes of ancient Egypt were the forerunners of today's accountants. Consulting standards may apply to a forensic accountant can be proactive. Arthur Andersen created a CPA firm that eventually disappeared. Peremptory refers to the fact that a f..
Disclosed raw materials used in production : Carolina Plating Company reported a cost of goods manufactured of $520,000, with the firm's yearend balance sheet revealing work in process and finished goods of $70,000 and $134,000, respectively. If supplemental information disclosed raw materials ..

Reviews

Write a Review

Computer Engineering Questions & Answers

  How to display the sorted data

Using Java write down a program to create a file named Exercise8_5.txt if it does not exist. Write 100 randomly created integers into the file using text I/O. Integers are separated by spaces in the file. Read the data back from the file and displ..

  What will be the list assumptions for the scope of project

What will be the list assumptions for the scope of project? Give detailed and measurable non functional requirements.

  Bus collision avoidance protocol

Before effective Ethernet switching existed, some network designers are used an alternative bus collision avoidance protocol termed as the token bus protocol.

  Programming for a pattern

Write down a program in order to print the following pattern on screen.

  What would be the mappings between cache block

take a memory of 64 blocks (labeled 0 through 63) and a cache of 16 blocks (labeled 0 through 15). In the questions below, list only correct results.

  Build appropriate functions for these classes

A CollegeCourse class includes fields representing department, course number, credit hours, and tuition. Its child, LabCourse, includes one more field that holds a lab fee charged in addition to the tuition.

  Find the volume of each cylinder

Suppose that you are building 5 cylindrical nuclear reactors of various diameters. Ask the user to input height and diameter of each cylinder.

  Download an image from the online companion web site

Download an image from the Online Companion Web site or find out an image of your own. Add text around the image. Experiment with the float property and its values to view the way that the text wraps.

  Create the boolean algebra expression for the output

Create a truth table for your circuit that lists the following: X1, X2, S, D, Q, and Not Q. X1 and X2 are input signals to the multiplexer, and S is the multiplexer selector signal.

  Developing the flowchart as per the algorithm

Design an algorithm to prepare a job applicant report. Input contains of a series of records which consists of the Social Security number or equivalent, last name, first name, middle initial, verbal test score, science test score, math test score,..

  Program of five to ten lines in assembly language

Program of five to ten lines in assembly language

  The ways to depict constraint graph

The ways to depict constraint graph? illustrate how splitting a domain can be used to solve this problem.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd