Overview of course content Specification of digital functions and - - PowerPoint PPT Presentation

overview of course content
SMART_READER_LITE
LIVE PREVIEW

Overview of course content Specification of digital functions and - - PowerPoint PPT Presentation

Overview of course content Specification of digital functions and system Digital building blocks Combinatorial systems Digital Arithmetic Synchronous systems and state


slide-1
SLIDE 1

Overview of course content

William Sandqvist william@kth.se

  • Specification of digital functions and system
  • Digital building blocks
  • Combinatorial systems
  • Digital Arithmetic
  • Synchronous systems and state machines
  • Asynchronous systems and state machines
  • A little larger digital systems - the CPU and

computers VHDL is not significantly included - because it will need a complete course for itself.

slide-2
SLIDE 2

Digital Design IE1204

William Sandqvist william@kth.se

Digital Design Everywhere!

slide-3
SLIDE 3

William Sandqvist william@kth.se

40-100 microprocessors in a car!

  • Ignition system
  • Emission control

system

  • Anti-lock brakes
  • Dashboard display
  • Entertainment system
  • Navigation system
  • . . .
slide-4
SLIDE 4

The development of electronics

William Sandqvist william@kth.se

Intel 4004 (1971) 108 KHz 2,300 transistors Intel Xeon 5400 (2008) 3.0 GHz 820 millions of transistors If there had been a corresponding development of the car speed, one would be able to drive from San Francisco to New York in about 13 seconds (Intel).

slide-5
SLIDE 5

Why is digital technology so successful?

William Sandqvist william@kth.se

slide-6
SLIDE 6

Simplicity, imunity of electromagnetical disturbances.

William Sandqvist william@kth.se

  • Simple mathematical model

– with only 1's and 0's as values – Boolean algebra

  • Imunity of electromagnetical disturbances,

effective implementation of the mathematical model

– Transistors – Integrated circuits – Advances in semiconductor technology

  • Efficient design methods and tools
slide-7
SLIDE 7

Analog or Digital signals?

William Sandqvist william@kth.se

000 001 010 001 010 011 100 100 011 011

101 100 011 010 001

time 5 4 3 2 1

An analog signal can assume continuous values, while a digital signal may assume only discrete values (here, 0 ... 5)

value Analog continuous signal Digital signal with discrete values

slide-8
SLIDE 8

Digital should be worse?

William Sandqvist william@kth.se

0001 0011 0101 0011 0101 0111 1001 1001 0111 0111

1011 1001 0111 0101 0011

Analog signal Digital signal (3 bits)

  • Digital signal (4 bits),
  • double sampling frequency

But if you have enough bits and sufficiently high sampling rate, the digital signal mimics the analog signal

value time

slide-9
SLIDE 9

Digital technology is very insensitive to interference

William Sandqvist william@kth.se Logic value 1 Undefined Logic value 0 Voltage V

DD

V

1,min

V

0,max

V

SS (Gnd)

  • It is not only one voltage value

which is translated as ”1” or ”0”, it’s a wider voltage ranges.

  • A disturbance of some mV can

affect the value of an analog signal a lot, but it will not move the value out of the digital range.

slide-10
SLIDE 10

Imunity of electromagnetical disturbances

William Sandqvist william@kth.se

Great affection Unaffected

  • Digital data processing can be done insensitive of

electromagnetic disturbances! Analog: Digital:

slide-11
SLIDE 11

Digital Signal Processing

ADC Digital Signal processing

Microphone Antenna Analog signal Digital signals

01101010100 1010101 10 101010

Carrier frequency Modulated signal

DAC

Analog-Digital Converter Digital-Analog Converter

11 IE1204 Digital Design

When possible all signal processing is done digitally today

slide-12
SLIDE 12

Catching the data is still critical!

William Sandqvist william@kth.se

Although most of the signal processing is now done digitally and thus safe from interference, it is still critical to "catch" the data in a good way – the analog / digital conversion! Any disturbancies that accompany the data into the digital system we then will have to live with! 100111011101111011110

slide-13
SLIDE 13

Mathematical model - Boolean algebra: axioms

William Sandqvist william@kth.se

  • In Boolean algebra, there is only one (true) and 0 (false) as

values

  • The following operations are defined: AND (), OR (+),

NOT (x)

  • The following axiom defines the Boolean algebra
slide-14
SLIDE 14

Booleska Algebra: rules

William Sandqvist william@kth.se

Rules can be derived from axioms

– many of the rules are consistent with our usual algebra! – comfortable that we can continue to use rules as has been done in primary school! – but beware! Some rules are new and different!

  • More soon in the course ...
slide-15
SLIDE 15

The technical background

William Sandqvist william@kth.se

When telephone exchanges were automated, Boolean algebra was used as a tool to calculate how the networks could be simplified. The switches is drawn in their unaffected state.

Making contact Breaking contact, ”not” + for parallell connection the ”or”-function

⋅ ⋅ ⋅ ⋅ for serial connection,

the ”and” -function

slide-16
SLIDE 16

Gates instead of switches

William Sandqvist william@kth.se

+ ”or”-gate

⋅ ⋅ ⋅ ⋅ ”and”-gate

”not” inverter

With these three basic gate types: OR AND NOT can all logical functions be performed. The switches were eventually replaced by "gates" made of electronic components

  • More soon in the course ...
slide-17
SLIDE 17

Only one single gate type!

William Sandqvist william@kth.se

Actually it will Suffice with one single gate type, NAND, for making every other!

Extreme simplification,

  • ne single gate type is

enough for everything!

  • More soon in the course ...
slide-18
SLIDE 18

CMOS NAND - gate

William Sandqvist william@kth.se

An effective implementation of CMOS NAND gate requires only four transistors ... CMOS gates consume only effect when changing state. Good thing, otherwise today's computer chips would be even hotter. A N-MOS transistor.

  • More soon in the course ...
slide-19
SLIDE 19

Memoryfunction?

William Sandqvist william@kth.se

Traffic lights and elevators must "remember" your button presses. This is done by "flip- flops" or "latches" - which you can also make with NAND gates.

  • More soon in the course ...
slide-20
SLIDE 20

William Sandqvist william@kth.se

See-of-Gates

Because only one single type of gates is needed, you can do anything with a "sea of gates" completed with printed wires designed for its own specific function.

slide-21
SLIDE 21

William Sandqvist william@kth.se

See-of-Gates

Because only one single type of gates is needed, you can do anything with a "sea of gates" completed with printed wires designed for its own specific function.

slide-22
SLIDE 22

William Sandqvist william@kth.se

slide-23
SLIDE 23

How to design with a billion gates?

William Sandqvist william@kth.se

A modern processor can contain a billion gates - you can not draw such a circuit diagram by hand ... We need other methods to describe such a system!

slide-24
SLIDE 24

CAD-tools

  • A CAD tool is a program that helps the engineer

to design (eg, an integrated circuit)

  • CAD tools can be fully automated or interactive
  • CAD tools are based on algorithms that define

the order of a sequence of methods to be applied

William Sandqvist william@kth.se

slide-25
SLIDE 25

Hardware description languages

William Sandqvist william@kth.se

Entity Architecture Inpursignals Outputsignals

The Design is described with an entity (black box) and an architecture (the content of the box)

slide-26
SLIDE 26

Design-tools

William Sandqvist william@kth.se

VHDL-code

Equations

Implemen- tation

Step 1: VHDL-Description of the desired hardware is translated into Boolean equations Step 2: Boolean equations is translated to the available hardware

In the course You will try out the design tool Quartus II

slide-27
SLIDE 27

Example of VHDL-code

William Sandqvist william@kth.se

LIBRARY ieee ; USE ieee.std_logic_1164.all ; ENTITY mux4to1 IS PORT( w0, w1, w2, w3 : IN STD_LOGIC ; s : IN STD_LOGIC_VECTOR(1 DOWNTO 0) ; f : OUT STD_LOGIC ) ; END mux4to1 ; ARCHITECTURE Behavior OF mux4to1 IS BEGIN WITH s SELECT f <= w0 WHEN "00", w1 WHEN "01", w2 WHEN "10", w3 WHEN OTHERS ; END Behavior ;

VHDL is a very complex language - this course can not accommodate so much of this.

Advanced level courses are available!

slide-28
SLIDE 28

Boolean equation

William Sandqvist william@kth.se

f = s

1⋅ s0⋅ w0 + s 1⋅ s0⋅ w1 + s 1⋅ s0⋅ w2 + s 1⋅ s0⋅ w3

  • More soon in the course ...
slide-29
SLIDE 29

A gate circuit that implements the function

William Sandqvist william@kth.se

The textbook uses American symbols: AND OR NOT

  • More soon in the course ...
slide-30
SLIDE 30

William Sandqvist william@kth.se

slide-31
SLIDE 31

Technology Advances

William Sandqvist william@kth.se

The trend is furious fast ...

slide-32
SLIDE 32

Digital hardware in a computer

William Sandqvist william@kth.se

System Modules Gates and flip-flops Transistors

slide-33
SLIDE 33

The Designprocess

William Sandqvist william@kth.se

In the course we are simulating a design with ModelSim

slide-34
SLIDE 34

Binary numbers

William Sandqvist william@kth.se

Digital technology uses only two numerical symbols: 0 and 1

– Easy to implement - each value corresponds to a voltage level, e.g.

0 Volt corresponds to 0 5 Volt corresponds to 1

How can ordinary numbers be represented?

slide-35
SLIDE 35

Decimal number system

William Sandqvist william@kth.se

In the decimal number system we have 10 different numeric symbols: 0-9 A decimal number is represented with a sequence of numeric symbols

– The position in the sequence gives the digit its weight and is multiplied by a power of 10 (the base of the decimal system is 10)

1 2 10

10 3 10 5 10 6 ) 653 ( ⋅ + ⋅ + ⋅ =

slide-36
SLIDE 36

Decimal number system

William Sandqvist william@kth.se

1 1 2 2 1 1 10

10 10 10 10 ⋅ + ⋅ + ⋅ + ⋅ =

− − − −

x x x x N

m m m m

  • +

⋅ + ⋅ + ⋅ + ⋅ + ⋅ + ⋅ =

− − − − − − − − 2 2 1 1 1 1 2 2 1 1 10

10 10 10 10 10 10 x x x x x x N

m m m m 2 1 10

10 3 10 5 10 6 ) 53 . 6 (

− −

⋅ + ⋅ + ⋅ =

1 2 10

10 3 10 5 10 6 ) 653 ( ⋅ + ⋅ + ⋅ =

Representation of an integer Representation of a ”decimal point number”

slide-37
SLIDE 37

Binary number system

William Sandqvist william@kth.se

The binary system works the same way as the decimal system, but using base 2 instead of 10!

  • +

⋅ + ⋅ + ⋅ + ⋅ + ⋅ + ⋅ =

− − − − − − − − 2 2 1 1 1 1 2 2 1 1 2

2 2 2 2 2 2 x x x x x x N

m m m m 10 1 2 2

) 6 ( 2 2 1 2 1 ) 110 ( = ⋅ + ⋅ + ⋅ =

10 2 1 1 2

) 25 . 3 ( 2 1 2 2 1 2 1 ) 01 . 11 ( = ⋅ + ⋅ + ⋅ + ⋅ =

− −

slide-38
SLIDE 38

Octal number system

William Sandqvist william@kth.se

In the octal number system the base is 8 and therefore numerical symbols 0-7 are used

  • +

⋅ + ⋅ + ⋅ + ⋅ + ⋅ + ⋅ =

− − − − − − − − 2 2 1 1 1 1 2 2 1 1 8

8 8 8 8 8 8 x x x x x x N

m m m m 10 1 1 8

) 375 . 53 ( 8 3 8 5 8 6 ) 3 . 65 ( = ⋅ + ⋅ + ⋅ =

slide-39
SLIDE 39

Hexadecimal number system

William Sandqvist william@kth.se

In the hexadecimal number system the base is 16, and thus the numeric symbols 0 to 9 and A to F are used

  • +

⋅ + ⋅ + ⋅ + ⋅ + ⋅ + ⋅ =

− − − − − − − − 2 2 1 1 1 1 2 2 1 1 16

16 16 16 16 16 16 x x x x x x N

m m m m 10 1 1 16

) 5 . 174 ( 16 8 16 14 16 10 ) AE.8 ( = ⋅ + ⋅ + ⋅ =

slide-40
SLIDE 40

Number system with base b

William Sandqvist william@kth.se

A general formulation can be obtained for the base b

  • +

⋅ + ⋅ + ⋅ + ⋅ + ⋅ + ⋅ =

− − − − − − − − 2 2 1 1 1 1 2 2 1 1

b x b x b x b x b x b x N

m m m m b

slide-41
SLIDE 41

The integers for the different number systems

William Sandqvist william@kth.se

Base 2 Base 8

Base 10 Base 16

1 1 1 1 10 2 2 2 11 3 3 3 100 4 4 4 101 5 5 5 110 6 6 6 111 7 7 7 Base 2 Base 8

Base 10 Bas 16

1000 10 8 8 1001 11 9 9 1010 12 10 A 1011 13 11 B 1100 14 12 C 1101 15 13 D 1110 16 14 E 1111 17 15 F 10000 20 16 10

slide-42
SLIDE 42

Quickie Question

William Sandqvist william@kth.se

Discuss your answer along with your bench neighbors! What hexadecimal number corresponds to the binary number 00010111?

slide-43
SLIDE 43

Quickie Question

William Sandqvist william@kth.se

What hexadecimal number corresponds to the binary number 00010111?

1 7

slide-44
SLIDE 44

Conversion between decimal and binary numbers

William Sandqvist william@kth.se

  • Conversion from binary to decimal is trivial
  • The conversion from decimal to binary is done by repeatedly

dividing by 2

– The rest gives the numerical value – Digits are calculated in reverse order - Least Significant Bit (LSB) comes first

(MSB) 1 1 Rest 2 1 1 1 Rest 1 2 3 Rest 3 2 6 1 1 Rest 6 2 13 Rest 3 1 2 26 (LSB) 1 1 Rest 26 2 53

5 4 3 2 1

=

  • =

÷ =

  • =

÷ =

  • =

÷ =

  • =

÷ =

  • =

÷ =

  • =

÷ x x x x x x

5310 = 1101012

slide-45
SLIDE 45

Summary

William Sandqvist william@kth.se

  • There are various number systems
  • Digital technology uses the binary number

system

  • You can convert numbers between different

number systems

slide-46
SLIDE 46

William Sandqvist william@kth.se