ie1205 digital design - kth.se · digital design synthesisable rtl vhdl algorithm c ie1205, il2217...

28
IE1205 Digital Design Ahmed Hemani KTH/ICT/ES [email protected]

Upload: ledat

Post on 09-Apr-2018

259 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

IE1205 Digital Design

Ahmed Hemani

KTH/ICT/ES

[email protected]

Page 2: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Att lära ut de teoretiska grunderna för analys och konstruktion av kombinatoriska och sekventiella digitala kretsar

• Att genom praktisk problemlösning ge en förståelse för de olika design-/konstruktions-faserna i syfte att kursdeltagarna ska behärska konstruktion av enkla kombinatoriska och sekventiella digitala system

Kursens mål

2IE1205 Digital Design

Page 3: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Att lära kursdeltagarna en designmetodik

• Att med hjälp av denna metodik kunna konstruera enkla digitala system

Kursens mål

Specification(function and othercharacteristics)

Design / Synthesis

Implementation(network of modules)

Analysis

3IE1205 Digital Design

Page 4: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

What are the follow up courses

Library ofPre-designedPre-verified

Pre-characterizedBuilding Blocks

IL2225

Idea, Concept realisable as a Digital Design

Synthesisable RTL VHDLAlgorithm C

IE1205, IL2217

Verification is a much bigger

problem

IL2450 P4

ConstraintsArea

PerformancePower/Energy

Time to MarketManufacturability

Operating Conditions

IL2227 – Digital Design using HDL (Hardware Description Languages)IL2450 – System Level ValidationIL2225 – Embedded Hardware Design

Page 5: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Introducera studenterna till engelska och engelsk kurslitteratur

– Nästan all relevant litteratur inom ämnet är på engelska

– Engelska är arbetsspråk i alla större svenska internationella bolag

– Att tala engelska (någorlunda) flytande är en förutsättning för en framgångsrik karriär som civilingenjör

Advantages of studying in English

5IE1205 Digital Design

Page 6: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Examination

– LABA, 2 hp

• Betyg: G/U

– TENA, 4.0 hp

• Betyg A-E/F

• Föreläsningar - 28 h (14x2h)

• Övningar - 16 h (8x2h)

• Laborationer - 8 h (2x4h)

Examination och upplägg

6IE1205 Digital Design

Page 7: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Kursbok

– Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition), Mc-Graw-Hill, 2009 (Kårbokhandeln)

• Mer material finns på websida

– https://www.kth.se/social/course/IE1205/

– Förläsningsbilderna läggs ut på websidan efterlektionen!

Kurslitteratur

IE1205 Digital Design 7

Page 8: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Number Representation

• Digitala byggelement

• Kombinatoriska system

• Digital Aritmetik

• Synkrona system och tillståndsmaskiner

• Asynkrona system och tillståndsmaskiner

• Lite större digitala system – om processorn och datorer

• Vi kommer inte att gå igenom VHDL i någon större utsträckning – det är en hel kurs i sig.

Översikt Kursinnehåll

8IE1205 Digital Design

Page 9: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• att tempot är mycket högre på KTH än på gymnasiet!

• En civilingenjör har ett stort ansvar för samhället och måste därför har en gedigen utbildning!

Glöm inte…

IE1205 Digital Design 10

Page 10: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Föreläsare

– Ahmed Hemani

• Övningar

– Fredrik Lundeval

• Laborationer (utförs i Kista)

– William Sandqvist

• Examiner

– Ingo Sander

Personal

11IE1205 Digital Design

Page 11: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Tentamen äger rum på Campus Valhallavägen

– Aktuell information på KTH:s websidor

– Ordinarie tentamen, Friday 2016-01-15 14:00-18:00 E36,E51,E52,E53

• Anmälan krävs

– Senast två veckor innan tentamen!

– Rutinerna för anmälan kommer att informeras imer detalj senare

Tentamen

IE1205 Digital Design 12

Page 12: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Laborationer utförs i Kista

– KTH-Kista, Electrum

• Anmälan krävs och görs via Daisy-systemet

– https://daisy.ict.kth.se/

• Personliga förberedelseuppgifter, kontrollera din personliga kod i Daisy

• Obligatoriska labbförberedelser. Var beredd att redovisa muntligt vid tavlan på laborationen.

Laborationer

IE1205 Digital Design 13

Page 13: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Föreläsaren försöker att vara tillgänglig under rasten och en stund efter lektionen

– Utnyttja den tiden

• Mail

– KTH-personal dränks i mailfloden, så det kan ta en stund tills vi hinna svara på ett e-mail• Titta först på websidan om du har en fråga

• Skicka tydliga och klara mail till rätt person

• Använd din KTH-mailadress!

• Kalla ditt meddelande ”IE1205 : …”, så att vi lätt hittar kursrelaterade brev

Kontakt med KTH-Personal

IE1205 Digital Design 14

Page 14: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Det är inte möjligt att gå igenom all information under lektionen

• Besök hemsidan (uppdateras kontinuerligtunder kursen)

– https://www.kth.se/social/course/IE1205/

Mer information finns på webben!

IE1205 Digital Design 15

Page 15: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

Some thing about me

Page 16: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

Why Digital ?

Page 17: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Digitaltekniken använder bara två siffersymboler: 0 och 1

– Enkelt att implementera – varje värde motsvarar en spänningsnivå,t ex

• 0 Volt motsvarar 0

• 5 Volt motsvarar 1

Binära tal

IE1205 Digital Design 18

Hur kan man då representera vanliga tal?

Page 18: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• I det decimala talsystemet har man 10 olika siffersymboler: 0 till 9

• Ett decimaltal representeras med en sekvens av siffersymboler

– Positionen i sekvensen ger siffrans vikt och multipliceras med en potens av 10 (basen i decimalsystemet är 10)

Decimala talsystemet

IE1205 Digital Design 19

012

10 103105106)653(

Page 19: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Representation av ett heltal

• Representation av ett decimaltal

Decimala talsystemet

IE1205 Digital Design 20

0

0

1

1

2

2

1

110 10101010

xxxxN m

m

m

m

2

2

1

1

0

0

1

1

2

2

1

110 101010101010 xxxxxxN m

m

m

m

210

10 103105106)53.6(

012

10 103105106)653(

Page 20: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Binärsystemet fungerar på samma sätt som decimalsystemet, men man använder basen 2 i stället för 10!

Binära talsystemet

IE1205 Digital Design 21

2

2

1

1

0

0

1

1

2

2

1

12 222222 xxxxxxN m

m

m

m

(110)2 1 22 1 21 0 20 (6)10

(11.01)2 1 21 1 20 0 21 1 22 (3.25)10

Page 21: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• I det oktala talsystemet är basen 8 och därmed används siffersymbolerna 0 till 7

Oktala talsystemet

IE1205 Digital Design 22

2

2

1

1

0

0

1

1

2

2

1

18 888888 xxxxxxN m

m

m

m

(65.3)8 6 81 5 80 3 81 (53.375)10

Page 22: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• I det hexadecimala talsystemet är basen 16 och därmed används siffersymbolerna 0 till 9 och A till F

Hexadecimala talsystemet

IE1205 Digital Design 23

2

2

1

1

0

0

1

1

2

2

1

116 161616161616 xxxxxxN m

m

m

m

10

101

16 )5.174(16816141610)AE.8(

Page 23: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• En allmän formulering kan erhållas för basen b

Talsystem med basen b

IE1205 Digital Design 24

2

2

1

1

0

0

1

1

2

2

1

1 bxbxbxbxbxbxN m

m

m

mb

Page 24: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

2 8 10 16

0 0 0 0

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

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

Heltalen för olika talsystem

IE1205 Digital Design 25

Page 25: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

Quick question

Vilket hexadecimala tal motsvarar detbinär talet 00010111 ?

A: 23

B: 13

C: 17

Page 26: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Omvandling från binär till decimal är trivial

• Omvandlingen från decimaltal till binärtal görs genom upprepade delning med 2

– Resten ger siffervärdet

– Siffrorna kommer i omvänd ordning – Least Significant Bit (LSB) kommer först

Omvandling mellan decimalaoch binära tal

IE1205 Digital Design 27

(MSB) 11R021

11R123

00R326

11R6213

003R1226

(LSB) 11R26253

5

4

3

2

1

0

x

x

x

x

x

x

Dvs 53 decimalt motsvarar 110101 binärt

Page 27: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),
Page 28: IE1205 Digital Design - kth.se · Digital Design Synthesisable RTL VHDL Algorithm C IE1205, IL2217 ... –Brown/Vranesic, Fundamentals of Digital Logic with VHDL Design (3rd edition),

• Det finns olika talsystem

• Digitaltekniken använder det binära talsystemet

• Man kan omvandla tal mellan olika talsystem

Sammanfattning

IE1205 Digital Design 29