Design computer with risc instruction set architecture

Assignment Help Computer Engineering
Reference no: EM131854270

Learning objectives

Upon successful completion of this coursework, the student is expected to:

Be aware of the diversity in Instruction Set Architectures and the issues architects consider when designing new ISAs.

Become familiar with assembly language programming and its relationship to high-level languages, both in theory and practice.
Understand the details of CPU and memory organization.

Understand the operation of the CPU Fetch-Decode-Execute cycle.

Appreciate the technique of software simulation to test designs, such as Instruction Set Architectures.
Be familiar with information units (bits, bytes, words) and number systems (binary, decimal, hexadecimal).

Description / Scenario

As a computer architect, you are given the task to design a simplified computer with its own RISC Instruction Set Architecture. Having this task completed, your next step is to test the new ISA by writing an interpreter that simulates programs in this language.

The designed computer has a 2 -byte word size (hence, the term "word" is redefined in this project to mean 2 rather than 4 bytes), is equipped with a total of 16 general purpose registers of size one word, numbered 0 to 15, and a small main memory (RAM) of 256 words. The computer CPU also contains one program counter (PC) register and one instruction register (IR) where the current instruction is temporarily stored. Given these characteristics, the new ISA is a simplified version of MIPS, which consists of fixed-size 16-bit instructions, i.e. they occupy one word of the memory. More details in attached file.

Task 1

Manually write machine language programs in the newly-designed ISA for the following:

a) Read a positive number n from the keyboard and compute and display its partial sum, calculated by n(n+1)/2

b) Read a positive number from the keyboard and compute and display the smallest power of two, which is larger than the read number. E.g. for 1000, the program should produce 1024.

c) Read a series of integer numbers, and determine and display the largest number. The first number read indicates how many numbers should be processed.

Associate each line of the program with a short comment or explanation.

Task 2

In this task you are going to develop your own interpreter of the new ISA, in your programming language of choice. This will turn the machine into a simulator of the newly- designed computer system and test its operation, before having to invest huge sums of money in the manufacture of its hardware chips!

Although students have the choice of command-line versus graphical interface for the ISA simulator, they are recommended to keep it simple with a Command Line Interface (CLI). The simulator begins its execution by prompting the user to enter the program one hexadecimal line (word) at a time for each memory address, starting from 00. User signals the end of the program by a special value, e.g. -11111. As the program is entered, the simulator loads it into the memory.

The memory can be represented with a one- dimensional array of 256 integer elements (since instructions as well as data are numbers). In this design the memory is word-addressed rather than byte-addressed. If the second were the case, the simulator would be slightly more complex by accessing memory at even-number locations, and PC would have to be incremented by 2 each time.

Next, the simulator executes the program. Execution begins with the instruction in location 00 and continues sequentially, unless a transfer of control instruction is encountered.

CPU registers (16 general, 1 PC and 1 IR) will have to be stored in separate variables. Also use a variable to hold the op-code of the instruction currently being executed. Do not execute instructions directly from memory. Rather, "fetch" the next instruction to be performed (incrementing PC as appropriate) from the memory array to the IR. Then "pick off" the leftmost hexadecimal digit and place it in op-code variable. Decode the instruction based on the op-code (e.g. through a "switch" structure) and based on the instruction type read the rest of the fields in separate variables. Keep in mind that when the simulated computer begins execution, the registers are all initialized to zero.

When the assembly program completes execution, the name and contents of each register, as well as the contents of memory should be displayed ("computer dump"). In order to keep the output size manageable, do not display all 256 words, but say the first 100 words in memory.

At this point, you should be able to implement the new ISA simulator and run each of the assembly programs in Task 1.

You are encouraged to extend the simulator to check for various types of errors. For example, during the program-loading phase, each hexadecimal number that is entered must be in the range -ffff to +ffff.

During the execution phase, the simulator should check for various types of errors, such as detecting an instruction with invalid op-code, or outside the range (e.g. negative), register overflows and underflows during arithmetic instructions, etc. Other types of execution errors could be attempts to divide by zero. Whenever errors are encountered, the simulator should terminate with the display of the appropriate message, as well as a full computer dump. This treatment will help the user debug the assembly programs.

The student should be careful to make the necessary conversions between hexadecimal and decimal number systems and not confuse the two. In Java, the library class Integer provides methods that parse a hexadecimal string to an integer, and vice versa, output an integer as a hexadecimal string.

Attachment:- Handout.rar

Verified Expert

This paper is about designing a computer with our own ISA (Instruction Set Architecture). All the design parameters were reduced according to the new ISA, for example, we have only 12 OP-Code (0-c), 256 RAM (00-FF) and 18 registers (0-10, PC, IR) including Program Counter and Instruction Register. After the implementation of our system with the new ISA, we have tested our system with three programs given as task 1. In the next task, we have designed our own interpreter to simulate the program written with this new ISA .The interpreter was design using JAVA language and was tested on the example problems as well as on the three problems given in task 1.

Reference no: EM131854270

Questions Cloud

Assume the implied ppp rate of exchange of mexican pesos : Assume the implied PPP rate of exchange of Mexican Pesos per U.S. dollar is 8.50 according to the Big Mac Index.
What is your personal reaction to the work : What is your personal reaction to their work? Do you feel their work is important? That there work can make a difference? Why or why not?
Discuss the talent management strategies : Suggest two (2) talent management strategies designed to prepare the organization for its readiness to share knowledge and maintain a learning environment.
Metal whose threshold frequency : A metal whose threshold frequency is 8.22×1014 s^-1 emits an electron with a velocity of 6.59×105 m/s when radiation
Design computer with risc instruction set architecture : NY403205 – Computer Organization And System Architecture - determine and display the largest number. The first number read indicates how many numbers
What is the binding energy of the electron : What is the binding energy of the electron in kJ/mol? [Note that KE = 1/2 mv^2 and 1 electron volt (eV) = 1.602×10^-19 J.]
Write a two page mechanism description telling an audience : Write a one to two page mechanism description telling an audience of fifth graders in a science class how the appliance works.
Substances dissolve in water : When the following substances dissolve in water, what major species (other than water) are present? Include aggregation states. Note that this text
Compute the value of the FRA : The 2-year risk-free rate is 4% with continuously compounding. Compute the value of the FRA.

Reviews

inf1854270

4/9/2018 5:30:37 AM

May I have for now only the first task of the coursework? I need for now only the first task of the assignment, not all the assignment solution. May I have only the first task for now please? In all the three given programs to do, we have to use 1 (numerical value) to initialize the loop counting variable. But out of the given 12 instructions we can’t use them to get this done ...Have your prof. gave any clue/hit for this? He can use whatever works... Don't worry Thank you very much!!! I know is a tough project!

len1854270

2/8/2018 2:17:58 AM

Students are expected to submit: Short report documenting the work done in Task 1 and Task 2. For Task 2, briefly describe the design and implementation the simulator, as well as instructions to install and execute the simulator program, possibly with screenshots. The report must be submitted through Turnitin before the deadline. Program source code, compressed in a zip file and sent by email to instructor’s address ([email protected]) before the deadline.Correct implementation of programs in the new assembly language, in Task 1. (30%) Report structure, completeness and clarity. (20%) Completeness and correctness of the simulator program in Task 2. Proper code documentation with comments is highly recommended. (50%)

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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