Being a computer science or electrical engineering student, you probably have assembled a PC before. You may
have gone out to purchase the motherboard, CPU (central processing unit), memory, disk drive, video card, sound
card, and other necessary parts, assembled them together, and have made yourself a state-of-the-art working
computer. But have you ever wondered how the circuits inside those IC (integrated circuit) chips are designed? You
know how the PC works at the system level by installing the operating system and seeing your machine come to life.
But have you thought about how your PC works at the circuit level, how the memory is designed, or how the CPU
circuit is designed?
In this book, I will show you from the ground up, how to design the digital circuits for microprocessors, also
known as CPUs. When we hear the word “microprocessor,” the first thing that probably comes to many of our
minds is the Intel Pentium
®
CPU, which is found in most PCs. However, there are many more microprocessors that
are not Pentiums, and many more microprocessors that are used in areas other than the PCs.
Microprocessors are the heart of all “smart” devices, whether they be electronic devices or otherwise. Their
smartness comes as a direct result of the decisions and controls that microprocessors make. For example, we usually
do not consider a car to be an electronic device. However, it certainly has many complex, smart electronic systems,
such as the anti-lock brakes and the fuel-injection system. Each of these systems is controlled by a microprocessor.
Yes, even the black, hardened blob that looks like a dried-up and pressed-down piece of gum inside a musical
greeting card is a microprocessor.
There are generally two types of microprocessors: general-purpose microprocessors and dedicated
microprocessors. General-purpose microprocessors, such as the Pentium CPU, can perform different tasks under
the control of software instructions. General-purpose microprocessors are used in all personal computers.
Dedicated microprocessors, also known as application-specific integrated circuits (ASICs), on the other
hand, are designed to perform just one specific task. For example, inside your cell phone, there is a dedicated
microprocessor that controls its entire operation. The embedded microprocessor inside the cell phone does nothing
else but control the operation of the phone. Dedicated microprocessors are, therefore, usually much smaller and not
as complex as general-purpose microprocessors. However, they are used in every smart electronic device, such as
the musical greeting cards, electronic toys, TVs, cell phones, microwave ovens, and anti-lock break systems in your
car. From this short list, I’m sure that you can think of many more devices that have a dedicated microprocessor
inside them. Although the small dedicated microprocessors are not as powerful as the general-purpose
microprocessors, they are being sold and used in a lot more places than the powerful general-purpose
microprocessors that are used in personal computers.
Designing and building microprocessors may sound very complicated, but don’t let that scare you, because it is
not really all that difficult to understand the basic principles of how microprocessors are designed. We are not trying
to design a Pentium microprocessor here, but after you have learned the material presented in this book, you will
have the basic knowledge to understand how it is designed.
This book will show you in an easily understandable approach, starting with the basics and leading you through
to the building of larger components, such as the arithmetic logic unit (ALU), register, datapath, control unit, and
finally to the building of the microprocessor — first dedicated microprocessors, and then general-purpose
microprocessors. Along the way, there will be many sample circuits that you can try out and actually implement in
hardware using the optional Altera UP2 development board. These circuits, forming the various components found
inside a microprocessor, will be combined together at the end to produce real, working microprocessors. Yes, the
exciting part is that at the end, you actually can implement your microprocessor in a real IC, and see that it really
can execute software programs or make lights flash!
1.1 Overview of a Microprocessor
The Von Neumann model of a computer, shown in Figure 1.1, consists of four main components: the input, the
output, the memory, and the microprocessor (or CPU). The parts that you purchased for your computer can all be
categorized into one of these four groups. The keyboard and mouse are examples of input devices. The CRT
(cathode ray tube) and speakers are examples of output devices. The different types of memory (cache, read-only
memory (ROM), random-access memory (RAM), and the disk drive) are all considered part of the memory box in
the model. In this book, the focus is not on the mechanical aspects of the input, output, and storage devices. Rather,
Digital Logic and Microprocessor Design with VHDL Chapter 1 - Designing Microprocessors