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

  Dns servers and dhcp servers

Assume that both the DNS servers and the DHCP servers send your client PC and IP addresses. Write down the differences between these two addresses.

  Produce a book class that stores book information

Produce a Book class that stores book information

  If a class is derived protected from a base class describe

if a class is derived protected from a base class explain how this affects the inheritance of all the public protected

  Write down the sql command to add math scope

Write down the SQL command to add SUBJECT to TUTOR. The only values allowed for SUBJECT will be "Reading", "Math", and "ESL".

  Write ieee floating point representation of the following

Write IEEE floating point representation of the following decimal numbers.

  What ethical issues does management require to consider

a hacker is an individual with technical skills and creative savvy who is willing to push the limits of technology in

  Questioncreate a shadow on phrase html5 canvas with an

questioncreate a shadow on phrase html5 canvas with an offeset -x of 2px an offset-y of 5px a blur of 6px and a

  When to use and function to set multiple conditions

When to use AND function to set multiple conditions that must be met and how to use AND function to set multiple conditions that must be met?

  You have just been hired as an information security

you have just been hired as an information security engineer for a large multi-international corporation.

  Describe how the five types of ai systems differ

Explain how the Internet and the World Wide Web have evolved over the years and disrupted traditional ways of doing business. ??

  How can string and word variable type data structures be

how can string and word variable type data structures be implemented? describe how a word from a programming language

  Write a program with a graphical interface

Write a program with a graphical interface that allows the user to convert an amount of money between U.S. dollars (USD), Euros (EUR), and British pounds (GBP).

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