control unit for cpu

Thread Starter

vead

Joined Nov 24, 2011
629
I want to make control unit for 4 bit cpu I know control unit is made of many other circuit such as decoder ,multiplexer timer but I am confused which circuit make control unit for cpu

1)how to decide which logic circuit is used to make control unit for cpu
2)what circuit component I need to make control unit (i think basic gates)
3) what should I need to know before to make control unit for cpu

please anyone give me idea how to make control unit for cpu
 

MrChips

Joined Oct 2, 2009
30,800
What is a control unit for a CPU?

The only answers to your questions I can suggest are:

1) There is no single logic circuit.

2) There is no circuit component. If you want to create a single chip solution you would have to use an FPGA.

3) You need to study combinational and sequential logic design and finite state machines.
 

Thread Starter

vead

Joined Nov 24, 2011
629
What is a control unit for a CPU?

The only answers to your questions I can suggest are:

1) There is no single logic circuit.

2) There is no circuit component. If you want to create a single chip solution you would have to use an FPGA.

3) You need to study combinational and sequential logic design and finite state machines.
I know combinational circuit make with the help of basic gates like encoder, decoder, multiplexer, demultiplexer these type of circuit make with basic gates like and not nor nand xor xnor

sequential circuit make with the help of flip flop, latches like counter timer
we use flip flop latches to make memory circuit

cpu make with help of alu amd control unit
i can make alu with basic gates to perform addition subtraction ......

but my question is that how to make control unit for cpu or which circuits are used to make control unit if you want make control unit then first what things arise in your mind
 
Last edited:

BobTPH

Joined Jun 5, 2013
8,951
The simplest control unit would be a simple alternating fetch / execute cycle. A single flip flop would determine which was active. On the fetch cycle, a word of program memory would be fetched into an internal register, and the PC incremented. On the execute cycle, the bits of the instruction word would determine what function would be performed, using decoders and multiplexers. You can get more complex, first by overlapping the two, them by addign more stages (a pipeline).

Bob
 

absf

Joined Dec 29, 2010
1,968
I want to make control unit for 4 bit cpu I know control unit is made of many other circuit such as decoder ,multiplexer timer but I am confused which circuit make control unit for cpu
I have constructed a 4 bit TTL cpu with the help from the designer. His web site only gave the block diagram of his cpu. So after a few weeks of emails Q&A, I finally got the cpu working executing a simple program flashing some LEDs.

His original design used 2 PAL chips and 5 TTL chips but in my design I used 15 TTL + 2716 EPROM and 2114 static RAM chips cause I dont have a PAL programmer. IIRC, the site was called "Mark's TTL microprocessor".

The control unit was nothing more than just logic gates and a 74LS138 decoders.

Allen
 

Thread Starter

vead

Joined Nov 24, 2011
629
I think control unit is responsible for arithmetic logic. control unit inform to arithmetic logic what they should be perform what should be done in result
cpu fetch and execute instruction so i think for fetching I need to encoder and multiplexer and for executing I need to decoder and demultiplexer and counter to count next step
 

ScottWang

Joined Aug 23, 2012
7,399
I have constructed a 4 bit TTL cpu with the help from the designer. His web site only gave the block diagram of his cpu. So after a few weeks of emails Q&A, I finally got the cpu working executing a simple program flashing some LEDs.

His original design used 2 PAL chips and 5 TTL chips but in my design I used 15 TTL + 2716 EPROM and 2114 static RAM chips cause I dont have a PAL programmer. IIRC, the site was called "Mark's TTL microprocessor".

The control unit was nothing more than just logic gates and a 74LS138 decoders.

Allen
What's your ALU made from ?
Are you using 74F181,74LS181 or just made from TTL ICs?

 

absf

Joined Dec 29, 2010
1,968
Nop, it doesnt has an dedicated ALU. The concept is very simple. It has an Accumulator, a 12 bit program counter able to address 4K memory , 16 nibble RAM and only 5 instructions.

-sta store accumulator in RAM
-lda load accumulator (RAM or immediate)
-inc increment accumulator
-jmp jmp to new location
-cse skip next instruction if acc=data in RAM.

There is no stack, no subroutine call and no arithmetic instructions. See the attached block diagram. There is no assembler as well. Every program has to be hand assembled and entered in binary.

Allen
 

Attachments

Last edited:

ScottWang

Joined Aug 23, 2012
7,399
Nop, it doesnt has an dedicated ALU. The concept is very simple. It has an Accumulator, a 12 bit program counter able to address 4K memory , 16 nibble RAM and only 5 instructions.

-sta store accumulator in RAM
-lda load accumulator (RAM or immediate)
-inc increment accumulator
-jmp jmp to new location
-cse skip next instruction if acc=data in RAM.

There is no stack, no subroutine call and no arithmetic instructions. See the attached block diagram. There is no assembler as well. Every program has to be hand assembled and entered in binary.

Allen
What is Mag?
What is IR? (instruction register?)
 
Top