Project - isa design and cpu implementation

Assignment Help Computer Engineering
Reference no: EM133027630

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).

Reference no: EM133027630

Questions Cloud

What amount of cash will each partner receive : The firm owes Kathryn $50,000. Upon liquidation, $450,000 is available for distribution to the partners. What amount of cash will each partner receive
How much should bell company report as debt investment : In its December 31, 2014 statement of financial position, how much should Bell Company report as debt investment
Multifactor authentication : Multifactor authentication (MFA) requires users to authenticate their identities with at least two factors to access a system or an application.
What amount of interest income should be reported : What amount of interest income should be reported by Cambodia Company for the year ended Dec 31, 2011 under the effective interest method
Project - isa design and cpu implementation : Project - ISA Design and CPU implementation and how the flow from one instruction to the next should progress - provide instructions sufficient to set constants
What is the gross pay for martin : Payroll data for the current week are as follows: hours worked, 46; federal income tax withheld, $337; What is the gross pay for Martin
Determine the total overhead costs allocated : The square footage for S1 is assumed to be zero for this purpose. Determine the total overhead costs allocated to each of the two production departments
Disadvantages of creating a recruitment and selection plan : Discuss the advantages and disadvantages of creating a recruitment and selection plan using both interval and/or external applicant pools.
What is employee engagement : What is employee engagement, why is it important, and how can it be enhanced in a healthcare organization?

Reviews

len3027630

11/11/2021 9:06:24 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

  Create code for and16 logic using quartus two software

I need to create code for AND16 logic using Quartus 2 version 16.0 software. Also I need a brief description of how the AND16 logic works.

  Suppose you have a relation schema about teaching classes

suppose you have a relation schema about teaching classes that has the following attributes class instructor time and

  Write a script that generates a random integer

Using MATLAB, write a script that generates a random integer between 5 and 30000, and then creates the reverse version of that number.

  What is the one-way function in the given system

What is the one-way function in this system? What is the trapdoor in this system? Define the public and private keys in this system.

  Derive excitation tables and state tables

Complete the timing diagram, starting with YIY2 = 00 (at time = 0). Derive excitation tables.

  Design the underflow and overflow detection circuits

Develop the stages needed for a floating-point multiplier, assuming that the numbers are represented in the IEEE standard form.

  What fail securely means

The Open Web Application Security Project (OWASP) provides a distillation of several of the most well known sets of computer security principles.

  Design a document containing plan for authentication methods

Design a document containing a sample plan for authentication methods, users, and roles used for a test database.

  What is the running time of your algorithm

What is the running time of your algorithm? Your program will take as input a file with edge information.

  Find a lower interest rate

how much does it lower your payment if you shop around and find a lower interest rate? How much could you lower the payment by having a bigger down payment? What happens if you extend the term of the loan.

  Calculate the accumulated sample error for one character

Suppose that a remote transmitter sends a message at 2500 Baud and the receiver is expecting the data rate to be 2400 Baud.

  What are the sizes of tag and index and offset fields

What are the sizes of tag, index, and offset fields (in bits) for a cache of size S Kbytes, a block size of B bytes, and W-way associativity?

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