Sheet 4-1
Sheet 4-1
Sheet 4-1
R Memory
W
Address Data Bus
Bus
M M A
IR A D A ALU Z
Control Unit
R R
B
2. The Figure shown below shows a part of a simple CPU with single-bus tri-state internal bus and separate
external memory bus. The CPU has 8 instructions and all registers are 16 bits. Three of these instructions
are:
(𝑞0 ) LD A,IMMD : A ← IMMD Load A with Immediate value,
(𝑞1 ) ADD A,R : A← A+R Add Register R to A and store result in A
(𝑞2 ) BRC XXX : if CF = 1 then PC ← XXX Jump to address XXX if Carry Flag =1
a. Write the microinstructions required by the fetch cycle and these 3 instructions.
R
Memory
W
Address Bus Data Bus
A
Control Unit M M
IR R A ALUR PC
A D
R R B
ALU
3. The CPU architecture shown in figure I may execute some memory-reference instructions.
The instruction format used by this CPU consists of three main parts:
- The first is one bit that represent whether the operation
uses direct or indirect addressing mode.
- The second one is three bits long and it represents the
instruction code.
- The third one, that is twelve bits long, represents the memory location address in case of direct
memory addressing.
The instructions to be used are listed below, you are required to:
a. Design all logic circuits for the registers control as well as the bus control as function in the instruction
code and the timing signals. The design is built by ordinary gates.
b. Repeat part (a) using PAL chips PAL16L8 and write the corresponding PALASM programs.
Hexadecimal code
Symbol Description
I=0 I=1
Page 2 of 3
b. Design the CPU control unit in this case assuming ROM based design
Page 3 of 3