Create a subcircuit for the major parts

Assignment Help Programming Languages
Reference no: EM131153279

Detailed Question: this assignment need to build 16 bit cpu in logisim

Description
For your final project, you will put together all that you have learned to design the simplest CPU that can do something slightly interesting. It will execute a small set of 16-bit instructions, of two formats:

R-type:

opcode (4-bits)

RS (2-bits)

RT (2-bits)

RD (2-bits)

Unused (6-bits) 000000

15

 

 

 

0

I-type (includes jump):

opcode (4-bits)

RS (2-bits)

RT (2-bits)

Immediate (8-bits)

15

 

 

Registers
There will be four 8-bit registers: $R0, $R1, $R2, and $R3. $R0 is always zero. The rest will hold readable and writeable data.

Instructions

Opcode

Instruction

Action

0000

add $RD, $RS, $RT

$RD = $RS + $RT

0001

sub $RD, $RS, $RT

$RD = $RS - $RT

0010

slt $RD, $RS, $RT

$RD = $RS < $RT

0011

bne $RS, $RT, Immediate

If $RS!=$RT then $PC=$PC+2+Immediate<<1

0100

addi $RT, $RS, Immediate

$RT = $RS + Immediate

0101

beq $RS, $RT, Immediate

If $RS==$RT then $PC=$PC+2+Immediate<<1

0110

nand $RD, $RS, $RT

$RD = !($RS && $RT)

0111

UNUSED

 

1000

sb $RT, Immediate($RS)

Memory[$RS + Immediate] = $RT

1001

UNUSED

 

1010

UNUSED

 

1011

j Immediate

$PC = Immediate

1100

lb $RT, Immediate($RS)

$RT = Memory[$RS + Immediate]

1101

rand $RT, $RS

$RT = random number [0, $RS-1]

1110

disp $RS

Display $RS on the 2 digit hex display

1111

halt

Stops the CPU

Circuit Implementation

As with large programs, designing a large circuit should be done in small, manageable chunks. You will want to create a subcircuit for the major parts such as the register file, control, and ALU.

Clock
The most important part of your circuit is a clock element. It will be wired into each of the state elements (Instruction Memory, Register File, Data Memory) to trigger an update.

The halt instruction should block the clock output from reaching the state elements which will effectively stop the CPU from running.

Instruction Memory
For instruction memory, we will use ROM. It will be 8-bit addressable and hold 16-bit data words (our instructions). You can edit the contents of the ROM using the pointer tool and typing hexadecimal numbers or by right clicking the ROM and saying edit or load... I hope to have an assembler for you soon, but in the meantime, you can assemble them by hand. Once you do that, you may save programs you have input and load them later. I will provide a few sample programs to test your CPU with.

The output of the ROM is an instruction. You can either use a bunch of splitters to extract the right bits and recombine them (for opcode, registers, immediate, etc.) or you can use a bit selector component in logisim. For instance, a bit selector with output bits set to 4 and the selection input of 3 (use a constant element in logisim) will select the 3rd group of 4-bits from the instruction word. Since it is zero-indexed, this means the highest order group of 4 bits, which is our opcode.

Data Memory

Data memory will be a RAM component. Use an 8-bit address and 8-bit data.

Requirements

By the due date, you need to submit:

· Your circuit file from logisim with at least the ALU, Register file, and control as subcircuits.
· 2 different programs that run on your CPU written in assembly.
· The machine code version of the 2 programs above saved from the ROM component in logisim.

https://people.cs.pitt.edu/~jmisurda/teaching/cs447/ApAsm.htm

Reference no: EM131153279

Questions Cloud

What is procurement strategy and inventory strategy : Assuming that you are a manufacturing company that make a medical device to measure a heart rate and blood pressure. You are looking for an opportunity to export your product. What is your procurement strategy? Explain the customization process and w..
What are the fiscal demands of correctional organizations : What are the fiscal demands of correctional organizations? How do these demands affect competencies for wardens or superintendents in corrections today: should more emphasis be given in financial competency for this field?
Probability that exactly five customers are very satisfied : A hotel claims that 95% of its customers are very satisfied with its service. Complete parts a through d below based on a random sample of six customers. a. What is the probability that exactly five customers are very satisfied?
Evaluate the constitutional safeguard provided by amendments : Write a 1,400- to 1,750-word paper identifying and evaluating the constitutional safeguards provided by the 4th, 5th, and 6th Amendments to the United States Constitution as they apply to both adult and juvenile court proceedings.
Create a subcircuit for the major parts : Design the simplest CPU that can do something slightly interesting. It will execute a small set of 16-bit instructions -  create a subcircuit for the major parts such as the register file, control, and ALU.
Define rulemaking authority of foreign administrative bodies : Write a paper of not more than 1,400 words analyzing one of the administrative bodies in Europe and Asia that regulate global business in countries in those regions. Discuss the rulemaking authority of these foreign administrative bodies and their ..
Standard deviations below the mean of the sums : An unknown distribution has a mean of 80 and a standard deviation of 12. A sample size of 95 is drawn randomly from the population.
Determine the goal of a preliminary death investigation : Determine the goal and the main procedure of a preliminary death investigation. Include one example of a successful preliminary death investigation to support your response.
Determine the upper and lower limits of the prediction : As part of a research program for a new cholesterol drug, a pharmaceutical company would like to investigate the relationship between the ages and LDL (low-density lipoprotein) cholesterol of men. The accompanying data set shows the ages and LDL c..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write function which takes a string as the argument

Some examples are: "1234321", "C", "ABCBA". Write down a function which takes a string as the argument and returns 1 if string is palindrome and 0 otherwise.

  Write grading program using parallel arrays

Write grading program Using Parallel Arrays to read 20 students' ID and 3 exam scores for each student - calculate each student's average.

  Html5 assignment i need an assignment for html5 containing

i need an assignment for html5 containing 2 parts1 3 pages html5 website2 report more important than the website

  Decrypt all entries of username variable

Need a another cgi file to decrypt all entries of ' username ' variable and restore it to original plain/text, it should be start restoring the inputs to original text the cgi file

  Write the code using recursive decent parser

Write the code, using recursive decent  parser and write the code, using a table-driven parser

  Develop a simple rentalcarcompany program for a rental car

Develop a simple RentalCarCompany program for a Rental Car Company, call it whatever you like. We will have two classes, a Car class and aRentalCarCompany class

  Write class to represent temperatures in degree-fahrenheit

Write Temperature class to represent temperatures in degrees in Celsius, Fahrenheit and Kelvin. Use floating-point number for temperature and a character (type char) for scale.

  Write a program that is passed a virtual address

Write a program that is passed a virtual address (in decimal) via the attached txt file and have it output the page number and offset for the given address in the command line.

  Program to compute net pay of employee

A program to compute net pay of employee. It must permit one to read deposit number, account name, amount deposited, and yesr.check.

  Find largest number in array

Find the largest number in the array and output the result. use a subprogram to input the numbers, a function to use the largest number.

  Name few languages that allow use of variables

What is a keyword in a programming language? Why it is not a good practice to use reserved words as variable names?

  Validate the pairing of parenthesis in an expression

You are to write two programs. One will validate palindromes; the other will validate the pairing of parenthesis in an expression. These programs must both use stacks. You can write either an array based stack, or a linked list to perform these ta..

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