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 a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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