Professional Documents
Culture Documents
Micro
Micro
Cotrol memory
Cotrol uit is geerally used to geerate cotrol sigals,so usig the cotrol sigal the cpu trasfer the data
etwee diffret register or instruct ALU to perform several operatio.
So it the role of control uit to execute the flow of the program execution.
Y geeratig the cotrol sigal it initiated the microperatios.
I hardwired cotrol organisation the logic will be build with the help of hardwire components example
flip flop,decoders,encoders
So to design cotrol unit we need to develop mcro-prormam which is stored in control memory .
So control memory is a ROM as read only memory we cannnot perform any write operation only read
operation
Once the control unit is designed with the help of microprogrmmed approach then do not contain any
chance of modification on the control unit because the control memory is designed as ROM
Then we have control address regiser as well as control data register ,as control address register
contains the address of microinstructions that is to be read from control memory .
Cotrol data register cotains data of instrution to be executed.
While the cpu is executing the data which is present in control data register simultaneously the next
address generator regenrates the next instruction address that is to be executed
We know that control data register contains some micro instruction and it also xontains some
additional bits in order to generates next instruction address.
So the sequencer generates the next instrction address so that that the address will bw stored in
control address register and the address of the next instructon is to be read from control memory and
to be stored in control data register .
As the control data regoster contain micro istructio ,microinstruction contain collection of cotrol
words ,next instructio address gennerator can be external device also..
Cotrol data register is also called pipeline register because of the execute of multipe task
simultaneosly in less amount of time .and also helps in next instruction address generation.with the
help of status its.
So while CPU is exectig current istructio address the we have to generate necxt instruction address so
tgis two task should be done simultneously
So generating the next address instruction simultaneously is called as address sequencing or micro
programm sequecer.
For this purpose we are using instruction register ex 1011 and next is some address ,here we will do
some mapping on the opcode one this 4 bit we will do some mapping add one 0 to the left and two 0
to the right and in middle we have don’t cares this is done to generate some address so the next
instruction address is 0101100 the above steps is called mapping logic ( add one 0 to the left and two
0 to the right and in middle we have don’t cares this is called mapping logic ) and the multiplexer
transfer this address to the control address register.
Micro-program Example
First let see about basic diagram of computer hardware configuration
Here we have two types of memory one is main memory and second is control
memory main memory is used for storing instruction and data ,there are four
registers which are associaed with main emory 1.data register 2. accumulator
3.address register 4.program counter here the size of the memory is 2048 words
where each word size is 16 bit .So 2048 means 2^11 so here 11 it are required to
specify the address ,actually till now we uses 12 bit to specify the address and 3 bit
for opcode where coming to the miccoprogram concept we are using 11 bits to
specify the address and 4 bit tomspecify the opcode ,so thr size of the address
register and progrm counter is 11 bits ,as size of the word is 16 bit so size of the data
refister is 16 bit as well as size of accumulator is 16 bits .
For control memory .It is used to store the micrprogram there are two register
related to control memory 1.is subroutine register(SBR) 2 .control address register
(CAR) here the size of the control memory is 128 words so 2^7 so 7 bit are required
to specify the address of the subroutine register as well as control register ,here size
of the instruction is 20 words .
Here we are using multiplexers in order to transfer the information among the
register ,generally in order to transfer the information we uses common bus system
or multiplexer in this we are using multiplexer I order to transfer information among
different register .
Data register receives information from three ways
1. Address register
2. Main memory
3. Accumulator
And multiplexer transfer information from this four to the data register
Arithmetic Logic and shift unit performs operation on content of Data register and
Accumulator and the correspodig result is being transferred to accumulator
So we kow the size of the instruction format is 16 bits in which we uses 11 bits in order to specify the
address ,4 bit for opcode and 1 bit for indirect mode so e can define totally 2 ^4 operations ,out of 16
operaions we are demonstratig 4 operations.
1. Add operation
2. Branch operation 3. store 4. exchange
Microinstruction format.
Control unit contains control memory ,control memory control micro-program ,micro-program
contains several microinstruction .
Here the size of the micrinstruction is 20 bits in order to specify the address e uses 7 bit.because 128
means 2^7 .
1. Microoperation are divided into 3 fields F!,F2,F3 where size of each is 3 bits
2. Conditional field uses 2 bits in order to store condition
3. BR specifies the branch 2 bits used so the corresponding control goes to this address
4. AD field specifies the address.
Symbolic micro-program
Micro-program means collection of microinstruction
Each microinstruction should contain five field:
1. label,2.microoperation,3.condition field,4.branch field,5.Address field.
Design of Control Unit
Micro-programmed control unit
As micro-program cosist of microinstruction so microinstruction F1,F2,F3 each 8 operation
In addition to F1,F2,F3 we have condition field,branch field,address field
Size of F1,F2,F3 is 3 bits ,it is decoded by 3*8 decoder As decoder has advantage that it takes n input
and produces 2^n output as 1 doesn’t cannot have any operation so total 7 operation ,same for F2
but for F3 we have one more reserved operation so total 6 operation.So total 20 operation but out of
20 operation we are demonstrating only 5 operations we have not any operation from F2 so only
from F1 and F2 .
So In F3 we chooses output line 3 and given to ALU and it performs AND operation with accumulator
And corresponding result is transferred to AC .
Let assume F1 means arithmetic operation,F2 means Logic operation,F3 means shift operation
We uses Load when the load is on corresponding result is transferred to Accumulator.
For F1 we take output 1 and transfers to ALU and ADD operation is performed on Accumulator and
content is transferred to accumulator when load is on.
When the F1 6(110) is activated then corresponding program counter is transferred to address
register.
When the F1 5(101) is activated then corresponding data register is transferred to address register.
As the multiplexer is used for the F1(5) and F1(6) 0 for F1(6) ad 1 for F1(5).
Micro-program Sequencer
1. The basic components of a micro programmed control unit are the control memory and the
circuits that select the next address. The address selection part is called a micro-program sequencer.
2. The purpose of a microprogram sequencer is to present an address to the control memory so that
a microinstruction may be read and executed.
3. The next-address logic of the sequencer determines the specific address source to be loaded into
the control address register. The choice of the address source is guided by the next-address
information bits that the sequencer receives from the present microinstruction.
4. The block diagram of the microprogram sequencer is shown in Fig. 7-8.The control memory is
included in the diagram to show the interaction between the sequencer and the memory attached to
it.
5. There are two multiplexers in the circuit. The first multiplexer selects an address from one of four
sources and routes it into a control address register CAR.
6. The second multiplexer tests the value of a selected status bit and the result of the test is applied
to an input logic circuit.
7. The output from CAR provides the address for the control memory.
8. The content of CAR is incremented and applied to one of the multiplexer inputs and to the
subroutine register SBR.
9. The other three inputs to multiplexer number 1 come from the address field of the present
microinstruction, from the output of SBR, and from an external source that maps the instruction.
10. The CD (condition) field of the microinstruction selects one of the status bits in the second
multiplexer. If the bit selected is equal to 1, the T (test) variable is equal to 1; otherwise, it is equal to
0. The T value together with the two bits from the BR (branch) field go to an input logic circuit.
11. The input logic circuit in Fig. 7-8 has three inputs, l0, l1, and T, and three outputs, S0, S1, and L.
12. Variables So and S, select one of the source addresses for CAR.
13. . The binary values of the two selection variables determine the path in the multiplexer.
14. The bit values for 51 and So are determined &om the stated function and the path in the
multiplexer that establishes the required transfer. The subroutine register is loaded with the
incremented value of CAR during a call microinstruction (BR ; 01) provided that the status bit
condition is satisfied (T ; 1). The truth table can be used to obtain the simplified Boolean functions for
the input logic circuit: