0% found this document useful (0 votes)
5 views

Module 1 Dsd

The document provides a comprehensive overview of number system conversions, including binary, decimal, octal, and hexadecimal systems. It details methods for converting between these systems, such as the division and subtraction methods, and includes numerous examples for clarity. The content is structured in modules, focusing on the principles and calculations involved in each conversion process.

Uploaded by

btech10220.23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Module 1 Dsd

The document provides a comprehensive overview of number system conversions, including binary, decimal, octal, and hexadecimal systems. It details methods for converting between these systems, such as the division and subtraction methods, and includes numerous examples for clarity. The content is structured in modules, focusing on the principles and calculations involved in each conversion process.

Uploaded by

btech10220.23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 180

EC203 Digital System Design

Module-1
1 Part-1
Part
(Number System)

ECE Dept. BIT Mesra


Binary to Decimal Conversion
 To convert a base 2 (binary) number to base 10 (decimal):
 Add all the values (positional weights) where a one digit occurs
 Positions where a zero digit occurs do NOT add to the value, and
can be ignored

Example 1:: Convert binary 100101 to decimal


(written 1 0 0 1 0 1 )2 =

1*20 + 1+
0*21 +
1*22 + 4+
0*23 +
0*24 +
1*25 32
3710
Binary to Decimal Conversion
 Example 1 Convert binary 101112 to decimal
positional powers of 2: 24 23 22 21 20
decimal positional value: 16 8 4 2 1
Ans 101112 = 2310
binary number:
1 0 1 1 1
16 + 4 + 2 + 1 = 2310
 Example 2 Convert binary 100112 to decimal
positional powers of 2: 24 23 22 21 20
decimal positional value: 16 8 4 2 1 Ans 100112 = 1910
binary number:
1 0 0 1 1
16 + + +1 =1910
+2
 Example 3: Convert binary 1100102 to decimal
positional powers of 2: 25 24 23 22 21 20
decimal positional value: 32 16 8 4 2 1
Ans 1100102 = 5010

binary number: 1 1 0 0 1 0
32+ 16 + 2 = 5010
1(b) Decimal to Binary Conversion
(i) Division Method
Decimal to Binary Conversion
The Division Method:
1) Start with your number (call it N) in base 10
2) Divide N by 2 and record the remainder
3) If (quotient = 0) then stop
else make the quotient your new N, and go back to step 2
The remainders comprise your answer, starting with the last remainder as your
first (leftmost) digit.

In other words, divide the decimal number by 2 until you reach zero, and
then collect the remainders in reverse.
reverse
Converting a decimal number to a number in base r

Ques. Convert decimal 41 to binary.


Solution:
 First, 41 is divided by 2 to give an integer quotient of 20 and a remainder of 12
 Then the quotient is again divided by 2 to give a new quotient and remainder.
 The process is continued until the integer quotient becomes 0.
 The coefficients of the desired binary number are obtained from the remainders
as follows:
Decimal to Binary Conversion
Example 2: Convert decimal 2210 to binary
Using the Division Method
2210 =
2 ) 22 Rem
2 ) 11 0
2) 5 1
Ans 2210 = 101102
2) 2 1
2) 1 0
0 1

Example 3: Convert decimal 5610 to binary


Using the Division Method
5610 =
2 ) 56 Rem:
2 ) 28 0
Ans. 5610 = 1110002
2 ) 14 0
2) 7 0
2) 3 1
2) 1 1
0 1
1(b) Decimal to Binary Conversion
(ii) Subtraction Method
Decimal to Binary Conversion
The Subtraction Method:
 Subtract out largest power of 2 possible (without going below zero),
repeating until you reach 0.
 Place a 1 in each position where you COULD subtract the value
 Place a 0 in each position that you could NOT subtract out the value
without going below zero.

Example 1: Convert decimal 2110 to binary


Using the Subtraction Method
2110= 26 25 24 23 22 21 20
21 64 32 16 8 4 2 1
- 16 1 0 1 0 1 Ans. : 2110 = 101012
5
- 4 1
- 1
1 1
Decimal to Binary Conversion
Example 2: Convert decimal 5610 to binary
Using the Subtraction Method
5610= 26 25 24 23 22 21 20
56 64 32 16 8 4 2 1
- 32 1 1 1 0 0 0
24
Ans. : 5610 = 111002
- 16 1
8
- 8 1
0
Example 3: Convert decimal 4210 to binary
Using the Subtraction Method
4210= 26 25 24 23 22 21 20
42 64 32 16 8 4 2 1
- 32 1 0 1 0 1
10
Ans. : 5610 = 1010002
- 8 1
2
- 2 1
0
Octal Number System
Base: 8
Digits: 0, 1, 2, 3, 4, 5, 6, 7

Octal number: 3578 = (3 x 82 ) + (5 x 81) + (7 x 80)


To convert to base 10, beginning with the rightmost digit, multiply each nth digit
by 8(n-1), and add all of the results together.

Example1: Convert octal 3578 to decimal

Positional powers of 8: 82 81 80
Decimal positional value: 64 8 1
Octal number: 3 5 7
Value of 357 = (3 x 64) + (5 x 8) + (7 x 1)
= 192 + 40 + 7 = 23910

Answer: 3578 = 23910


Octal to Decimal Conversion
Example 2: Convert octal 12468 to decimal
Positional powers of 8: 83 82 81 80
Decimal positional value: 512 64 8 1
Octal number: 1 2 4 6
Value of 12468 (1 x 512) + (2 x 64)
64 + (4 x 8) + (6 x 1)
= 512 + 128 + 32 + 6 = 67810

Answer: 12468 = 67810

Example 3: Convert octal 15038 to decimal

Positional powers of 8: 8 3 82 81 80
Decimal positional value: 512 64 8 1
Octal number: 1 2 4 6
Value of 12468 (1 x 512) + (5 x 64) + (0 x 8) + (3 x 1)
= 512 + 320 + 0 + 3 = 83510

Answer: 15038 = 83510


2(b) Decimal to Octal Conversion
(i) Division Method
Decimal to Octal Conversion
The Division Method:
1) Start with your number (call it N) in base 10
2) Divide N by 8 and record the remainder
3) If (quotient = 0) then stop
else make the quotient your new N, and go back to step 2
The remainders comprise your answer, starting with the last remainder as your first
(leftmost) digit.
In other words, divide the decimal number by 8 until you reach zero, and then
collect the remainders in reverse.

Example 1: Convert decimal 21410 to octal


Using the Division Method
21410 =
8 ) 214 Rem.
8 ) 26 6
Answer: 21410 = 3268
8) 3 2
0 3
Decimal to Octal Conversion
Example 2: Convert decimal 433010 to octal
Using the Division Method
433010=
8 ) 4330 Rem:
8 ) 541 2
8 ) 67 5
Answer: 433010 = 103528
8) 8 3
8) 1 0
0 1

Example 3: Convert decimal 433010 to octal


Using the Division Method
258110=
8 ) 2581 Rem:
8 ) 322 5 Answer: 258110 = 50258
8 ) 40 2
8) 5 0
0 5
2(b) Decimal to Octal Conversion
(ii) Subtraction Method
Decimal to Octal Conversion
The Subtraction Method:
 Subtract out multiples of the largest power of 8 possible (without going
below zero) each time until you reach 0.
 Place the multiple value in each position where you COULD subtract
the value.
 Place a 0 in each position that you could NOT subtract out the value
without going below zero.

Example 1: Convert decimal 31510 to octal


315 82 81 80
- 256 (4 x 64) 64 8 1
59 4 7 3
- 56 (7 x 8)
3
- 3 (3 x 1)
Answer: 31510 = 4738
0
Decimal to Octal Conversion
Example 2: Convert decimal 201810 to octal
Using Subtraction Method
2018 84 83 82 81 80
-1536 (3 x 512) 4096 512 64 8 1
482 3 7 4 2
- 448 (7 x 64)
34
- 32 (4 x 8)
2 Answer: 201810 = 37428
- 2 (2 x 1)
0
Example 3: Convert decimal 26910 to octal
Using Subtraction Method
269 82 81 80
- 192 (3 x 64) 64 8 1
77 3 9 5
- 72 ( 9 x 8)
5
Answer: 26910 = 3958
- 5 (3 x 1)
0
3(a) Hexadecimal to Decimal Conversion
Hexadecimal (Hex) Numbering System
Base: 16
Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Hexadecimal (Hex) Extra Digits


Decimal Value Hexadecimal Digit
10 A
11 B
12 C
13 D
14 E
15 F

To convert to base 10,


 beginning with the rightmost digit,
 multiply each nth digit by 16(n-1), and
 add all of the results together.

Hexadecimal number: 1F416 = (1 x 162 ) + (F x 161) + (4 x 160)


3(a) Hexadecimal to Decimal Conversion
Example 1: Convert Hexadecimal 1F416 to decimal

positional powers of 16: 163 162 161 160


decimal positional value: 4096 256 16 1
Hexadecimal number : 1 F 4
Value of 1F416 : (1 x 256) + (F x 16)
16 + (4 x 1)
= (1 x 256) + (15 x 16)
16 + (4 x 1)
= 256 + 240 + 4 = 50010
Answer: 1F416 = 50010

Example 2: Convert Hexadecimal 25AC16 to decimal

positional powers of 16: 163 162 161 160


decimal positional value: 4096 256 16 1
Hexadecimal number: 2 5 A C
Value of 25AC16 (2 x 4096) + (5
( x 256) + (A x 16) + (C x 1)
= (2 x 4096) + (5 x 256) + (10 x 16) + (12 x 1)
= 8192 + 1280 + 160 + 12 = 964410
Answer: 25AC16 = 964410
3(b) Decimal to Hex Conversion
(i) Division Method
Decimal to Hex Conversion
The Division Method:
1) Start with your number (call it N) in base 10
2) Divide N by 16 and record the remainder
3) If (quotient = 0) then stop
else make the quotient your new N, and go back to step 2
The remainders comprise your answer, starting with the last remainder as your first
(leftmost) digit.

In other words, divide the decimal number by 16 until you reach zero, and then
collect the remainders in reverse.

Example 1: Convert decimal 12610 to Hexadecimal Using The


Division Method:
12610 =
16) 126 Rem:
16) 7 14= E
0 7= 7
Answer: 12610 = 7E16
Decimal to Hex Conversion
Example 2: Convert decimal 60310 to Hexadecimal
Using The Division Method:
60310 =
16) 603 Rem:
16) 37 11=B
16) 2 5 Ans. 60310 = 25B16
0 2

Example 3: Convert decimal 60310 to Hexadecimal


Using The Division Method:
184410 =
16) 1844 Rem:
16) 115 4
16) 7 3
0 7
3(b) Decimal to Hex Conversion
(ii) Subtraction Method
Decimal to Hex Conversion
The Subtraction Method:
 Subtract out multiples of the largest power of 16 possible (without going below
zero) each time until you reach 0.
 Place the multiple value in each position where you COULD to subtract the
value.
 Place a 0 in each position that you could NOT subtract out the value
without going below zero.

Example 1: Convert decimal 81010 to Hexadecimal


Using The Subtraction Method
81010=
810 162 161 160
- 768 (3 x 256) 256 16 1
42 3 2 10 (A)
- 32 (2 x 16)
10 Answer 81010 = 32A16
Answer:
- 10 (10 x 1)
0
Decimal to Hex Conversion
Example 2: Convert decimal 15610 to Hexadecimal
Using The Subtraction Method
156 =
156 162 161 160
- 144 (9 x 16) 256 16 1
12 9 C
- 12 (12 x 1)
Answer: 15610 = 9C16
0

Example 3: Convert decimal 15610 to Hexadecimal


Using The Subtraction Method
88 =
88 162 161 160
- 80 (5 x 16) 256 16 1
8 5 8
- 8 (8 x 1)
0 Answer:: 8810 = 5816
4(a) Octal to Binary Conversion
Octal to Binary Conversion
 The maximum value represented in 3 bit is: 23 – 1 = 7

 So using 3 bits we can represent values from 0 to 7=8 Digits which are the digits of the Octal
numbering system.

 Thus, three binary digits can be converted to one octal digit.

Three-bit Group Decimal Digit Octal Digit


000 0 0
001 1 1
010 2 2
011 3 3
100 4 4
101 5 5
110 6 6
111 7 7
Octal to Binary Conversion
Example 1: Convert octal 7428 to binary
Convert each octal digit to 3 bits:
bits
7428 =
7 = 111
4 = 100
2 = 010
111 100 010
Ans. 7428 = 1111000102

Example 2: Convert octal 5368 to binary


Convert each octal digit to 3 bits:
bits
5368 =
5 = 101
3 = 011
6 = 110
101 011 110
Ans. 7428 = 1010111102
4(b) Binary to Octal Conversion
Binary to Octal Conversion
Example 1: Convert 101001102 to octal
Starting at the right end, split into groups of 3:
010 100 110 
110 = 6
100 = 4
010 = 2 (pad empty digits with 0)

101001102 = 2468

Example 2: Convert 1001001102 to octal


Starting at the right end, split into groups of 3:
100 100 110 
100 = 4
100 = 4
110 = 6

101001102 = 4468
5(a) Binary to Hex Conversion
Binary to Hex Conversion
 The maximum value represented in 4 bit is: 24 – 1 = 15
 So using 4 bits we can represent values 0 to 15=16 Digits which are the digits
of the Hexadecimal numbering system.
 Thus, four binary digits can be converted to one hexadecimal digit.

Four-bit Group Decimal Digit Hexadecimal Digit


0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 8 8
1001 9 9
1010 10 A
1011 11 B
1100 12 C
1101 13 D
1110 14 E
1111 15 F
Binary to Hex Conversion
Example 1 : Convert 1101001102 to hex
Starting at the right end, split into groups of 4:

1 1010 0110 
0110 = 6
1010 = A
0001 = 1 (pad empty digits with 0)

Ans. 1101001102 = 1A616

Example 2 : Convert 11111001102 to hex


Starting at the right end, split into groups of 4:
11 1110 0110 
0110 = 6
1110 = E
0011 = 3 (pad empty digits with 0)

Ans 11111001102 = 3E616


5(b) Hex to Binary Conversion
Hex to Binary Conversion
Example 1: : Convert 3D916 to binary
Convert each hex digit to 4 bits:
3 = 0011
D = 1101
9 = 1001

Ans. 0011 1101 1001 


3D916 = 11110110012 (can remove leading zeros)
6. Hex to Octal & Octal to Hex Conversion
Hex to Octal Conversion
 To convert between the Hex to Octal number system
 Convert from given Hex number to binary first
 Then re-group
group obtained binary number in group of 3 bits

 pad starting empty digits with 0 if required


 convert from binary to the Octal numbering system starting on the right

Octal to Hex Conversion


 To convert between the Octal to Hex number system

 Convert from given Octal number to binary first

 Then re-group
group obtained binary number in group of 4 bits

 pad starting empty digits with 0 if required

 convert from binary to the Hex number system starting on the right
Hex to Octal Conversion
Example 1 : Convert E8A16 to octal
First convert the hex to binary:
(E 8 A )16
1110 1000 10102
111 010 001 010 and re-group
re by 3 bits
Then convert the binary to octal:
7 2 1 2 (starting on the right)
Ans E8A16 = 72128

Example 2 : Convert C7D16 to octal


First convert the hex to binary:
(C 7 D )16
1100 0111 11012
110 001 111 101 and re-group
re by 3 bits
Then convert the binary to octal:
6 1 7 5 (starting on the right)
Ans C7D16 = 61758
Octal to Hex Conversion
Example 1 : Convert 7528 to hex
First convert the octal to binary:
( 7 5 2)8
111 101 0102
re-group by 4 bits starting from the right
0001 1110 1010 Add leading zeros if required
Then convert the binary to hex:
1 E A
Ans. 7528 = 1EA16

Example 2 : Convert 4278 to hex


First convert the octal to binary:
(4 2 7 )8
100 010 1112
re-group by 4 bits starting from the right
0001 0001 0111 Add leading zeros if required
Then convert the binary to hex:
1 1 7
Ans. 4278 = 11716
Conversion Problem
Convert the following numbers:
 10101111012 to Hex
 82F16 to Binary

Answers

• 10101111012  10 1011 1101 = 2BD16

• 82F16 = 0100 0010 1111  100001011112


Fractional Numbers

xample
-1
(1011.101)2 =(?)10

Ex-2
Conversion of Fractional Part
(N)10 (fractional)= (M)b (fractional)
ecimal to binary
The procedure for converting this is to multiply (N)10 (fractional) by b.
f the resulting product is less than 1, then the most significant (leftmost) digit of the
fractional part is 0.
f the resulting product is greater than 1, the most significant digit of the fractional par
the integer part of the product.
The next most significant digit is formed by multiplying the fractional part of this prod
by b and taking the integer part.
The remaining digits are formed by repeating this process.
The process may or may not terminate.
n general,
Consider the number of integer part of the resulting product
Conversion of Fractional Part

ecimal to binary/ octal


Decimal to binary/ octal

Note: octal is equivalent to binary 3-bit


bit group number, hence…0.101011=0.53
hence…0.
Codes can be categorized as

• Weighted
• Non-weighted
• 8 4 2 1 (Binary Coded Decimal)
Weighted: • 24 2 1
• Decimal • 8 4 -2 -1
• Other
• Binary
• Octal
• Hexadecimal

Non-Weighted:
• Gray Code [consecutive number differs by one bit]
• Excess-3 code [8421 CODE+3]
• ASCII code
Gray code
The reflected binary code or Gray code is an ordering of the binary nume
system such that two successive values differ in only one bit (binary digit).
Gray codes are very useful in the normal sequence of binary numbers generat
by the hardware that may cause an error or ambiguity during the transition fro
one number to the next.
ASCII code
• ASCII,, stands for American Standard Code for Information
Interchange

• It's a 7-bit
bit character code where every single bit represents a
unique character.

• ASCII is the most common character encoding format for


text data in computers and on the internet.

• In standard ASCII-encoded
encoded data, there are unique values for 12
alphabetic, numeric or special additional characters and control
codes.
Addition Subtraction
Binary Arithmetic:
• Addition
• Subtraction
• Multiplication
• Division
Multiplication
EC203 Digital System Design

Module-1 1 Part-2
Part
(Basics, logic families)

Dr. S. Sengupta, ECE Dept. BIT Mesra


Digital Electronics
igital Systems are extremely used for
• Computation and data processing
• Control Systems, Communication and measurements
n digital systems
In a digital system the physical quantities or signal can assume only discrete values
(0 V and 5 V), while the analogue system take a certain range of voltage
Advantages of digital system
As digital system work with discrete quantities they are easier to design. Exact values
of voltage for current are not important only the range in which they fall.
Information storage is easy (allows many operation on data)
Accuracy and precision are greater
Operation can be programmed (flexibility)
Digital circuits are less affected by noise (low or high can be distinguished if noise is
not very large)
More digital circuits circuitry can be fabricated on IC chips
Image/ speech processing, enhancement, compression etc.
Limitations of digital system
The real world is analog; hence the inputs or outputs are in analog form, which are alwa
monitored operated and controlled

Process of digital systems


1. Convert the real-world
world analog data into digital data by ADC (analog to digital converter circu
2. Process the digital information
3. Convert the digital outputs into real world analog data by DAC
Inverse:
x*y=e
i.e. a.a’=0; a+a’=1
a+a

Distributive Law:

x*(y.z)=(x*y).(x*z)
As, x+yz=(x+y)(x+z)
x(y+z)=x.y+x.z
Theorems of Boolean algebra
Duality

Other way to find the dual of a function:


1.Complement
Complement the function
2. Invert each variable
Implement the following functions using gates

F1=xyz’
F2=x+y’z
F3=x’y’z+x’yz+xy
x’y’z+x’yz+xy’
F4=xy’+x’z
Logic Family
Digital IC gates are classified by logic operation and logic family
Each logic family has its own basic circuit based on which digital circuit and
functions are developed
The basic circuit in each logic family is NAND gate or NOR gate
The logic family is named by the components it uses
Different logic families of digital ICs:

• RTL Resistor-transistor logic


• DTL Diode-transistor logic
• I2L Integrated Injection Logic
• TTL Transistor-transistor logic
• ECL Emitter Coupled Logic
• MOS Metal Oxide Semiconductor
• CMOS Complementary Metal Oxide Semiconductor
haracteristics of Logic Families

he main characteristics of Logic families include:


•Speed
•Fan-in
•Fan-out
•Noise Immunity
•Power Dissipation

peed: Speed of a logic circuit is determined by the time between the application of inpu
nd change in the output of the circuit.

an-in: It determines the number of inputs the logic gate can handle.

an-out: Determines the number of circuits that a gate can drive.

oise margin/ immunity: Maximum noise that a circuit can withstand without affecting th
utput.

ower: When a circuit switches from one state to the other, power dissipates.
Transistor-Transistor
Transistor Logic (TTL)
mprovement over DTL
everal sub-families
families were developed based on reduced power consumption, increased s
nd driving capacity
Most basic version of TTL is standard-TTL,
TTL, developed in 1965

74/54 is the temperature range for


commercial and military use respect
e.g. -550C to +1250C
Transistor as an Inverter

• Transistor works in Saturation/ cut-off


cut region

• When Vin=Low (0 v), BJT is off, Vout=High


(+Vcc
Vcc)

• When Vin=High (5 v), BJT is on, Vout= Low (0 v


awbacks in the simple BJT inverter:

A) Effect of charge storage in transition from ON-to-OFF


ON (i.e. logic swing)
[increases turn-off time]
b) Slow charging and discharging of capacitive load [e.g. junction capacitance]

e first problem can be overcome by


Case-1: When, Vin=low, Q2 is on
Now, VBQ2=0.2+0.7=0.9
It is less than the voltage required to mak
Q1 on i.e. 0.6+0.6=1.2 v, hence Q1 is off

Hence, Vout=High
ase-2: When, Vin=high, Q2 is off
Now, VBQ2≈ 5 v
It is sufficient to make Q1 on, hence Q1 is on

Hence, Vout=low

• In this condition Q1 is ON, charges get stored in base


• To switch quickly it to off state, these charges must be removed
• When Q2 is on, these charges are dragged out and reducing the turn-off
turn time
cond problem: Capacitor charging and discharging in OFF and ON condition

Since, Rc (high) is used, the capacitor charges through a high resistance path, but discha
through very low resistive path [unequal charging and discharging time]
Also, in ON-condition,
condition, both transistor current and capacitor current (discharging) may fl
n BJT leading to its damage
he solution for the second problem:
The combined solution
Method to reduce the turnoff time more for transistor in TTL gate
When a transistor is ON (i.e. in deep saturation), charges get stored near base region
To switch it to cut-off mode (i.e 0 to 1) quickly, these charges need to be removed
Solution: A low cut-in
in voltage diode between base and collector may be used to
divert the stored charges towards collector
his can be achieved by
i) Ge-diode (ii) Schottky Diode

owever, Ge diode can not be


corporated in a Si-transistor as their
ocess technologies are different
Schottky Diode

• A Schottky Diode has low cut-in


in voltage of 0.25 v
• A Schottky Diode is formed by a metal (Al) and a semiconductor (n-type)
(n junction
• In IC technology, the Schottky clamped transistor can be fabricated by depositing a
layer of metal between n-type
type collector and p-type
p base
• In saturation, the excess/ stored carriers (minority electrons) in p-type
p base moves
towards collector through metal and preventing the transistor to go into saturation
i.e. decrease in noise immunity
Electrical characteristics of logic gates

A) Propagation delay
MOS LOGIC FAMILY
Classification of MOS
Enhancement type PMOS
Enhancement type NMOS
Symbols for MOS
[mostly used in enhancement type in digital circuits]
MOS as a resistor
PMOS inverter and NAND gates

Vin
Basic drawbacks of NMOS/ PMOS based design
NMOS is not capable of passing good logic 1 due to
threshold voltage effect
VOH=VDD-VT,LOAD

VT,LOAD
1
0 VDD-V
VT,LOAD
PMOS is not capable of passing good logic 0 due to threshold
voltage effect

S
Vin 0
D
1
-VT,LOAD

-VT,LOAD
Solution: Pseudo NMOS
EXAMPLE: NMOS GATE IMPLEMENTATION

XOR GATE
EC203 Digital System Design

Module-1
1 Part-3
Part
(VHDL)

Dr. S. Sengupta, ECE Dept. BIT Mesra


Introduction to VHDL
As integrated circuit (IC) technology has improved to allow more and
more components on a chip, digital systems.
Technology improvements have advanced the VLSI (very large-scale
large
integration) field continually.
The early integrated circuits belonged to SSI (small scale integration), MSI
(medium scale integration), or LSI (large scale integration) categories
depending on the density of integration.
SSI referred to ICs with 1 to 20 gates, MSI referred to ICs with 20 to 200
gates, and LSI referred to devices with 200 to a few thousand gates.
Many popular building blocks, such as adders, multiplexers, decoders,
registers, and counters, are available as MSI standard parts.
Introduction to VHDL
• When the term VLSI was coined, devices with 10,000 gates were
called VLSI chips.
• The boundaries between the different categories are fuzzy today.
• Many modern microprocessors contain more than 100 million
transistors.
• Compared to what was referred to as VLSI in its initial days, modern
integration capability could be described as ULSI (ultra large-scale
integration).
• Despite the changes in integration ability and the fuzzy definition,
the term VLSI remains popular, while terms like LSI are not
practically used any more.
Introduction to VHDL

As digital systems have become more complex, detailed design of the


systems at the gate and flip-flop level has become very tedious and time
consuming. Two or three decades ago, digital systems were created using
hand-drawn schematics, bread-boards,
boards, and wires that were connected to
the bread-board. Now, hardware design often involves no hands-on tasks
with bread-boards and wires.
Nowadays, computer-aided design with the help of hardware description
anguage are used for digital systems.
The digital hardware is easily described, simulated, and synthesized using
VHDL.
Ref Book:: 1) by Roth, ‘Digital system design with VHDL’
2) by R P Jain ‘Modern Digital Electronics’
Steps in modern digital system design
Nowadays, hardware description languages (HDLs) are
used to enter designs. Two popular HDLs are VHDL and
Verilog.

The acronym VHDL stands for VHSIC hardware


description language, and VHSIC in turn stands for very
high speed integrated circuit..
What is HDL?

DL stands for Hardware Description Language. It


programming language that is used to describ
imulate, and create hardware like digital circuits (ICS).
DL is mainly used to discover the faults in the design befo
mplementing it in the hardware.
he main advantage of HDLs is that it provides flexible modelin
apabilities and can express the large complex designs (>107 gates).

he most popular examples of VHDL are Odd Parity Generator, Pulse


enerator, Priority Encoder, Behavioral Model for 16 words, 8bit RAM,
tc.
What is Verilog?
Verilog is also a HDL (Hardware Description Languages) fo
describing electronic circuits and systems.
systems It is used in both hardwar
imulation and synthesis.

The most popular examples of Verilog are network switch,


microprocessor, a memory, a simple flip-flop, etc.
Difference between VHDL and Verilog
VHDL Verilog

It allows the user to define data types. It does not allow the user to define
data types.
It supports the Multi-Dimensional It does not support the Multi-
array. Dimensional array.
It allows concurrent procedure calls. It does not allow concurrent calls.
A mod operator is present. A mod operator is not present.
Unary reduction operator is not Unary reduction operator is present.
present.
It is more difficult to learn. It is easy to learn.
hardware description language allows a digital system to be designed and debugged a
higher level of abstraction than schematic capture with gates, flip-flops, and standar
MSI building blocks. The details of the gates and flip-flops do not need to be handle
uring early phases of design.

design can be entered in what is called a behavioral description of the design. In


ehavioral HDL description, one only specifies the general working of the design at
ow-chart or algorithmic level without associating to any specific physical parts
omponents, or implementations. Another method to enter a design in VHDL and Verilo
s the structural description entry.

n structural design, specific components or specific implementations of components ar


ssociated with the design. A structural VHDL or Verilog model of a design can b
onsidered as a textual description of a schematic diagram that you would have draw
nterconnecting specific gates and flip-flops.
nce the design has been entered, it is important to simulate it to confirm that the
nceptualized design does function correctly.. Initially, one should perform the simulation
the high-level behavioral model. This early simulation unveils problems in the initia
sign. If problems are discovered, the designer goes back and alters the design to mee
e requirements.
nce the functionality of the design has been verified through simulation, the next step
nthesis. Synthesis means “conversion of the higher-level abstract description of th
sign to actual components at the gate and flip-flop level.” The output of the synthes
ol, consisting of a list of gates and a list of interconnections specifying how
erconnect them, is often referred to as a netlist. Synthesis is analogous to writin
ftware programs in a high-level language such as C and then using a compiler to conve
e programs to machine language. Just like a C compiler can generate optimized
optimized machine code, a synthesis tool can generate optimized or unoptimize
rdware.
e next step in the design flow is post-synthesis
synthesis simulation. The earlier simulation at
gher level of abstraction does not take into account specific implementations of th
rdware components that the design is using. If post-synthesis simulation unve
oblems, one should go back and modify the design to meet timing requirements. Arrivin
a proper design implementation is an iterative process.

ext, a designer moves into specific realizations of the design. A design can be implemen
several different target technologies (next slide).
slide) It could be a completely custom IC o
uld be implemented in a standard part that is easily available from a vendor.

the lowest level of sophistication and density is an old-fashioned


old printed circuit board
th off-the-shelf gates, flip-flops,
flops, and other standard logic building blocks. Slightly higher
nsity are programmable logic arrays (PLAs), programmable array logic (PAL), and simple
ogrammable logic devices (SPLDs).
Ds with higher density and gate count are called complex programmable logic devic
LDs). Then there are the popular field programmable gate arrays (FPGAs) and ma
grammable gate arrays (MPGAs), or simply gate arrays. The highest level of density a
formance is a fully custom application-specific
specific integrated circuit (ASIC).

o most common target technologies nowadays are FPGAs and ASICs. The initial steps in
ign flow are largely the same for either realization.
realization Toward the final stages in the des
w, different operations are performed depending on the target technology. This is indica
igure 2-1. The design is mapped into specific target technology and placed into spe
ts in the target ASIC or FPGA. The paths taken by the connections between compone
decided during the routing. If an ASIC is being designed, the routed design is used
erate a photomask that will be used in the IC manufacturing process. If a design is to
lemented in an FPGA, the design is translated to a format specifying what is to be don
ous programmable points in the FPGA.
FPGA is a device that contains a matrix of re-configurable gate array log
cuitry. When a FPGA is configured (say, by VHDL), the internal circuitry
nnected in a way that creates a hardware implementation of the softwa
plication.
Basics of VHDL

Source: https://www.tutorialspoint.com/vlsi_design/vlsi_design_vhdl_introduction.htm

Video: https://www.youtube.com/watch?v=BDq8
https://www.youtube.com/watch?v=BDq8-QDXmek
VHDL Data type

ata types used are namely, STD_LOGIC and BIT, as well as their vector form
TD_LOGIC_VECTOR and BIT_VECTOR.
BIT_VECTOR

IT
he BIT data type can only have the value 0 or 1. When assigning a value of 0 o
a BIT in VHDL code, the 0 or 1 must be enclosed in single quotes: '0' or '1’.

IT_VECTOR
he BIT_VECTOR data type is the vector version of the BIT type consisting of two
ore bits. Each bit in a BIT_VECTOR can only have the value 0 or 1.
When assigning a value to a BIT_VECTOR, the value must be enclosed in dou
uotes, e.g. "1011" and the number of bits in the value must match the size of
IT_VECTOR.
VHDL Data type

TD_LOGIC
he STD_LOGIC data type can have the value X, 0, 1 or Z. There are other values that this dat
ype can have, but the other values are not synthesizable – i.e. they can not be used in VHD
ode that will be implemented on a CPLD or FPGA.
FPGA
hese values have the following meanings:
X – unknown
0 – logic 0
1 – logic 1
Z – high impedance (open circuit) / tristate buffer
When assigning a value to a STD_LOGIC data type, the value must be enclosed in single quotes
X', '0', '1' or 'Z’.

TD_LOGIC_VECTOR
he vector version of the STD_LOGIC data type. Each bit in the set of bits that make up the vecto
an have the value X, 0, 1 or Z.
When assigning a value to a STD_LOGIC_VECTOR type, the value must be enclosed in doubl
uotes, e.g. "1010", "ZZZZ" or "ZZ001". The number of bits in the value must match the size of th
TD_LOGIC_VECTOR.
Waveforms

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy