Design your own instruction set architecture

Assignment Help Computer Engineering
Reference no: EM133027724

Computer Organization and Architecture

TKGate Lab Project: ISA Design and CPU implementation

Part 1: ISA Design

The first part of this project requires you to design your own instruction set architecture (ISA): a specification for format of machine code words and their meaning. You must define the size of each machine code instruction, how its bits are divided, what the values for each of those bits imply, and how the flow from one instruction to the next should progress.
Your ISA should be designed within the following constraints:

1. Word length: The machine word should be one byte (8 bits). That means that each register should hold one byte, and that each memory address should be one byte. Consequently, your main memory should 28 =256 bytes long.

2. Instruction length: A machine code instruction may consist of as many words as you like. I strongly recommend that it be a fixed number.

3. Registers: Your ISA must specify how many addressable registers are available for an instruction to use.
• You may even choose no have no registers, where your instructions use only main memory addresses.
• Alternatively, you may assume a register file with not exceeding 8 registers.
4. Capabilities: Your ISA must be capable of the following operations:

• Data movement: You must provide instructions sufficient to set constants and move data.
? A program must be able to load constants into either registers or main memory locations (or both);
? It must also be able to copy values between registers and/or main memory locations.
? Note that you may choose to provide a minimal set of instructions, and require the programmer to perform multiple steps for some kinds of data movement.
? For example, to move from one main memory location to another, you may require the programmer to copy a value from the source main memory location into a register, and then copy it from the register to the destination main memory location. Such requirements save you the work of also creating an instruction that is capable of directly copying data from one main memory location to another.

- Logical Operations: Your ISA must allow for bitwise AND and OR operations on two input values, and NOT on a single input value. It may also provide other logic operations, such as XOR, NAND, NOR, etc.
- Arithmetic Operations: There must be instructions to perform addition, subtraction (using two-complement to represent negative integers), multiplication or division on two input values.
- Unconditional branching: There must be at least one type of jump instruction.
- You may choose to use labels (i.e., immediate constants) as the jump targets. These constants may be expressed either as literal main memory locations or as offsets from the PC (depending on the size of your instructions).
- The jump target could also be register based, where the branch target is taken from a register or main memory location.
- Note that you do not need a procedure call instruction.
- Conditional branching: You must provide the ability to compare two values for equality or inequality, and to branch only if that condition is true. For example, you may choose to provide only comparisons to zero (equal to zero, less than zero or negative, greater than zero or positive). Any comparison between two values is possible when combined with simple arithmetic operations.

Part 2: Designing a CPU to implement your ISA

Once you have specified ISA, you have to build a CPU to carry out instructions. In particular, you must build a full datapath and control. Your design must include a register file (if your ISA assumes any addressable registers), a main memory, a PC, and an ALU. It should be possible to load the main memory with instructions of the format specified by your ISA, and then to have your CPU carry out the program specified by those instructions.

Design decisions
Instruction length: Multiple-word instructions can make the programming task easier, but that choice implies that your CPU will require multiple clock cycles to carry out each instruction. For each word of the n-word machine code instruction, at least n-1 cycles will be required to load the first n-1 words of the current instruction into temporary registers. At the earliest, on the nth cycle the processor will have all of the bits of the instruction available to decode and execute. Thus, your control unit's inputs are no longer just the opcode, but also the cycle number for the processing of this instruction.

Unaddressable registers: Single-word instructions can be loaded from main memory and then immediately decoded and executed, avoiding the need (at least in terms of fetching the instruction) for multiple clock cycles per instruction. However, you may have noticed that a single word may have insufficient space to specify all of the registers, addresses, or immediate values that you need. For example, if you want to add the values from two registers and store the resulting sum in a third register, there simply are not enough bits in one word for an opcode and three register numbers.

What to do? Create instructions that perform simpler tasks and that store those results in an intermediate register called an accumulator. So, for example, consider that to add the values in two source registers and then store the sum in a third register, you split the task across multiple instructions. One possibility is that you specify an add on the two source registers, but you don't specify a destination register. The result of the addition is placed into the accumulator so that the next instruction can copy the contents of the accumulator into the destination register.

Main memory access: Each main memory address is a one-word value that specifies a particular byte in the main memory. However, depending on how you have structured your ISA and imagined your CPU datapath and control, you may have to think carefully about how main memory is used.

For example, consider an instruction that copies a value from main memory and into a register. To perform this task, the instruction itself must be loaded from main memory, and then the value requested must be read from main memory as well. Since the main memory must be read twice for a single instruction, a multi-cycle control is necessary.

Another approach is to divide main memory into two components. The first component can be used to store only instructions, and the machine code of any program would have to be placed here. The second component can contain only data, and be accessed only by load and store instructions. This approach is less realistic than a real CPU using a typically unified main memory, but it is a reasonable approach to creating a working CPU.

Part 3: Testing your CPU
In order to determine whether your datapath and control work properly, you'll need to test it. Initially, you should hard-wire certain input patterns to your datapath to be sure that smaller components are responding properly. Once that's done, you need to write small programs to test the CPU's function overall. You should begin with extremely simple programs (e.g., add two numbers). Then move onto something slightly more complex (e.g., a simple loop).

Attachment:- Gate project.rar

Reference no: EM133027724

Questions Cloud

How much do you need to deposit today : Suppose you need $1,000 in 9 years. How much do you need to deposit today if the annual interest rate = 8.8%, but compounded monthly
How many cookbooks does doop need to produce : If fixed costs are increased by $8,000, How many cookbooks does Doop need to produce each month to break even
What is the effective tax rate on the inter-company dividend : If the parent company's marginal tax rate is 23% and if the exclusion on inter-company dividends is 70%, what is the effective tax rate
What is the unadjusted cash in bank per ledger : The bank erroneously credited Rose Company for P21 000 on July 25. What is the unadjusted cash in bank per ledger on July 31, 2022
Design your own instruction set architecture : Design your own instruction set architecture and Designing a CPU to implement your ISA - This approach is less realistic than a real CPU using a typically
Calculate the deferred tax balance at December : Calculate the deferred tax balance at December 31, 2021 and Calculate the current tax expense for the year ended December 31, 2021
What would be reported for cost of goods sold : What would be reported for Cost of Goods Sold on the income statement for the year ending December? 31, 2025 if the perpetual inventory system
Calculate the cost of goods sold for the year : At the end of the? year, the company counted the inventory and found 58 units remaining. Calculate the cost of goods sold for the year
Calculate the depreciation expense for each of the five year : Calculate the depreciation expense for each of the five years, assuming the use of double-declining-balance depreciation

Reviews

len3027724

11/11/2021 10:43:03 PM

Attaching the file, you can see the question in file itself. Let me please specify one thing that the I required a simple project on Tkgate software which is available for free on both windows and ubuntu and not required a practical model which is made by hand. I just want to design project on TK gate.

Write a Review

Computer Engineering Questions & Answers

  Communicate information effectively in a multimedia format

Produce documents and present work in multimedia formats appropriate for the intended audience and apply basic design elements, principles and techniques in different scenarios.

  Implement a financial app for macquarie financial group

ISYS254 - Applications Modelling and Development - implement a financial app for Macquarie Financial Group to generate a quarterly summary report.

  Clearly explain what n represents in your program

Clearly explain what n represents in your program. Make some assumption about how long it would take to execute one of the operations that you are counting.

  Determine how many fibonacci numbers must be generated

Given a specified "distance" from the golden ratio, determine how many Fibonacci numbers must be generated in order to get this close.

  Write the matlab code lines that add 2 to the value

Provide the matlab syntax that will ask a user at the command window to enter a name and assign the name to a variable called 'name'.

  Define research interests in area of information technology

What are your research interests in the area of Information Technology? Why are you inspired to research in this area, and why do you think it is important.

  Write a short java program that takes two arrays a and b

Write a short Java program that takes two arrays a and b of length n storing in t values, and returns the dot product of a and b.

  What are the object-oriented and structured designs

explain the architectural differences between the object-oriented and structured designs.

  Find out the differences between the two files

Append the last two lines of each file to the file known Mollett.out without cutting and pasting (Hint: tail command can do this)

  Review problem on project documentation

Refer to the business information system proposed in week 1 power point presentation. In this presentation, you would include sample data-entry screens.

  Group of data elements that describes a single entity

Which of the following data structures is a group of data elements that usually describes a single entity or event.

  What changes have to be made to accept $ and cents

What changes have to be made to accept $ and cents

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