Ask Electrical & Electronics Expert

EE Design Project - 4-Bit Mini-CPU 

Problem Statement: You are to design a 4-bit mini-CPU which will perform 6 instructions: Compare, Add, Subtract, AND, OR, and NOT.  That is, it can compare two 4-bit numbers, add two numbers, subtract two numbers, AND two numbers, OR two numbers, and take the 1's complement of a single number.  The CPU does only fixed-point number manipulations, so you do not have to worry about floating point numbers. 

Both data and instructions are loaded from a single bus which comes from computer memory.  You do not have to worry about the other end of that bus.  The system operates on a 3-bit counter that counts modulo-8, driven by a clock that is supplied.  On count 1, the 4-bit instruction is loaded from the bus.  On count 3, the first operand is loaded, and the second operand is loaded on count 4.  The result is loaded into the "result register" on count 7.  Count 0 is a pulse at the beginning of the cycle that signals that data on the output bus is valid.  The output of this register is all you are responsible for. How the resulting data is used is taken care of by another designer. All you must do is computer the result and generate the "Data Valid +" signal at clock count 0. 

There is a reset that starts up your system, and then the clock starts and runs continuously. Since your circuit is based on an 8-count cycle after the clock starts, you must provide a modulo-8 counter (3-bit binary counter). The following signal inputs are given:

1. Clock In: A 50/50 pulse input that begins after Reset- and runs continuously.  

2. Reset-: A negative-going signal that resets the system at startup before clock start (clears all registers).   

3. Instruction/Data Bus:  Four data lines, W-Z (W = MSB), on which data and instructions appear as noted above:  The Instruction Word is valid on lines W-Z on count 1 of the clock, Operand 1 is valid on count 3, and Operand 2 is valid on count 4.  

4. Note that in the instruction word, W is the most significant bit.  The Op codes for the instructions are as follows: Compare = 0x2, Add = 0x4, SUB = 0x6, AND = 0x7, OR = 0xa, and NOT = 0xe. These Op codes must be decoded so the correct answer will be loaded in the result register.  

Your job is to design the following:    

1. Build a 3-bit counter that counts modulo-8 continuously. It is reset only at startup with Reset-.

2. Build three 4-bit registers to hold the Instruction Word that is transmitted on count 1, Operand 1 that is transmitted on count 3, and Operand 2 that is true on count 4.

3. You may use a 4-bit adder chip instead of designing the adder from smaller logic pieces. Note that using the adder chip, you may add, subtract, and compare (all 3!), so you do not have to build a separate subtractor or comparator unit. 

4. Note that the comparator should be designed only to show equal or not equal. It is not designed to show which operand in a compare is larger.  

5. Design a 4-bit bit inverter for the NOT circuit.  Note:  In the case of the NOT instruction, only Operand 1 is used.

6. Design 4-bit AND and OR circuits to perform those operations.

7. Design a 5-bit register to hold the sum and carry out (overflow) of the adder (outputs V'-Z'), as well as the result of the other functions.  Note that V' is used to hold the Carry Out bit for Add and Subtract instructions and the compare status bit when a compare is executed. For Operands 1 and 2 equal, V' = 1, for Operands 1 and 2 NOT equal, V' = 0. NOTE! When using the adder as a comparator, be certain to disable the carry bit, as you are using V' as the compare valid bit. 

8. Build a timer circuit that detects counts 0, 1, 3, 4, and 7 and generates the appropriate signals.

9. Build a MUX that chooses the correct result by decoding the Op codes 2, 4, 6, 7, 0xa, and 0xe.  This will allow storage of the correct result in the Output Register. Also, send the control lines that activate the six functions out of the system as well (just as "Data Valid +" is output), so that the receiving circuits will have a signal as to what operation is performed.

Attachment:- Assignment.rar

Electrical & Electronics, Engineering

  • Category:- Electrical & Electronics
  • Reference No.:- M91961856

Have any Question?


Related Questions in Electrical & Electronics

Question 1for the ce amplifier in figure 1 given the

Question 1 For the CE amplifier in Figure (1), given the following component parameters: Parameter Value β DC , β AC 150 V BE 0 . 7 V V CC 12 V R C 820 ? R E 1 100 ? R E 2 220 ? R 1 20 k? R 2 5 . 2 k? R L 100 k? C 1 , C ...

Question -i a star-connected three-phase synchronous

Question - (i) A star-connected, three-phase synchronous induction motor takes a current of 10 amps from a 415 volt supply at unity power factor when supplying a steady load. If the synchronous reactance is 5 ohms/phase ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Question 1 in the voltage regulator circuit in figure p221

Question 1: In the voltage regulator circuit in Figure P2.21, V 1 = 20 V, V Z = 10 V, R i = 222Ω and P z (max) = 400 mW. (a) Determine I L, I z , and I L , if R L = 380Ω. (b) Determine the value of R L , that will establ ...

Summative assessmentin 2017 sej101 assessment will consist

Summative Assessment In 2017 SEJ101 assessment will consist of nine tasks that will develop a portfolio of your assessed work. Throughout the trimester you will have the opportunity for feedback on all nine tasks before ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Case studythis assignment consists of a written report of

CASE STUDY This assignment consists of a written report of approximately 1000 words and any diagrams in which you are asked to critically compare different process methods used to achieve the same result and show an awar ...

Problem 1 a two-phase servomotor has rated voltage applied

Problem 1: A two-phase servomotor has rated voltage applied to its excitation winding. The torque speed characteristic of the motor with Vc = 220 V, 60 Hz applied to its control phase winding is shown in Fig.1. The momen ...

Electrical engineering questions -q1 two ideal voltage

Electrical Engineering Questions - Q1. Two ideal voltage sources designated as machines 1 and 2 are connected, as shown in the figure below. Given E 1 = 65∠0 o V, E 2 = 65∠30 o V, Z = 3Ω. Determine if Machine 1 is genera ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As