Inhoudstafel Inleiding De basis van digitaal ontwerp

Slides:



Advertisements
Verwante presentaties
KWALITEITSZORG november 2012
Advertisements

Construeren van een Tennishal Vergeet-mij-nietjes. Week 12
Hoe werkt een rekenmachine?
November 2013 Opinieonderzoek Vlaanderen – oktober 2013 Opiniepeiling Vlaanderen uitgevoerd op het iVOXpanel.
Global e-Society Complex België - Regio Vlaanderen e-Regio Provincie Limburg Stad Hasselt Percelen.
Rekenen 31 januari.
Ronde (Sport & Spel) Quiz Night !
Digitale Elektronica en Processoren
Basisgeheugenschakelingen
Logische schakelingen
Katholieke hogeschool Kempen Peter Slaets1 Hoofdstuk 3 Vereenvoudigen van logische functies.
bewerkingen in programmeeromgevingen
Inhoudstafel Inleiding De basis van digitaal ontwerp
VHDL Taal beschrijvingen
Start.
Kb.1 Ik leer op een goede manier optellen en aftrekken
F. Rubben NI Lookout 1 06/RIS/05 - NI Lookout VTI Brugge F. Rubben, ing.
© BeSite B.V www.besite.nl Feit: In 2007 is 58% van de organisaties goed vindbaar op internet, terwijl in 2006 slechts 32% goed vindbaar.
Leiden University. The university to discover. ICLON, Interfacultair Centrum voor Lerarenopleiding, Onderwijsontwikkeling en Nascholing Denkgereedschap.
© GfK 2012 | Title of presentation | DD. Month
Fysische Informatica sensoren en AD-omzetter
Nooit meer onnodig groen? Luuk Misdom, IT&T
Tentoonstelling Scryption Tilburg
FOD VOLKSGEZONDHEID, VEILIGHEID VAN DE VOEDSELKETEN EN LEEFMILIEU 1 Kwaliteit en Patiëntveiligheid in de Belgische ziekenhuizen anno 2008 Rapportage over.
Herleiden (= Haakjes uitwerken)
Elke 7 seconden een nieuw getal
Digitale foto Megapixel à 3 bytes = 12 Megabyte.
Visibility-based Probabilistic Roadmaps for Motion Planning Tim Schlechter 13 februari 2003.
1 introductie 3'46” …………… normaal hart hond 1'41” ……..
Inhoud Synthese van sequentiële netwerken
Inhoud (1) De ontwerpruimte en haar terminologie
Oefeningen F-toetsen ANOVA.
1 Ben Bruidegom AMSTEL-instituut Universiteit van Amsterdam Reehorstconferentie 2007 NLT-module Digitale Techniek Ontwerpen van digitale schakelingen met.
1Ben Bruidegom Hoe werkt een rekenmachine? Ben Bruidegom AMSTEL Instituut Universiteit van Amsterdam.
1 Woudschotenconferentie 2006 Ben Bruidegom AMSTEL-instituut Universiteit van Amsterdam NLT-module Digitale Techniek Ontwerpen van digitale schakelingen.
1Ben Bruidegom A Harvard Machine Recapitulatie Calculator Calculator  Calculator met “loopjes” Calculator met “loopjes”  Processor.
1Ben Bruidegom 1 Sequentiële schakelingen Toestand uitgang bepaald door:  ingangen &  vorige toestand uitgang.
Sequentiële schakelingen
Wat levert de tweede pensioenpijler op voor het personeelslid? 1 Enkele simulaties op basis van de weddeschaal B1-B3.
TUDelft Knowledge Based Systems Group Zuidplantsoen BZ Delft, The Netherlands Caspar Treijtel Multi-agent Stratego.
In dit vakje zie je hoeveel je moet betalen. Uit de volgende drie vakjes kan je dan kiezen. Er is er telkens maar eentje juist. Ken je het juiste antwoord,
Breuken-Vereenvoudigen
SPLD : Simple Programmable Logic Devices Dirk Smets KHLim - dep. IWT Digitale Elektronica Programmeerbare Logica DIA 1 DIA 1 Logische functie n Elke logische.
Dirk Smets KHLim - dep. IWT Digitale Elektronica Programmeerbare Logica FPGA : Field Programmable Gate Array DIA 1 DIA 1 Verdere FPGA-producten Discontinued!
Inkomen les 7 27 t/m 37.
Talstelsels, rekenen en rekenschakelingen
Finite State Machines.
Ben Bruidegom 1 Sequentiële schakelingen Toestand uitgang bepaald door:  ingangen;  vorige toestand uitgang.
Talstelsels, rekenen en rekenschakelingen
ribwis1 Toegepaste wiskunde Lesweek 01 – Deel B
Signaalverwerking Verwerkers. IR-buitenlamp. IJkgrafiek sensor.
Inhoud (3) Digitale Technologie Logische Schakelingen Interconnectie
Inhoudstafel Inleiding De basis van digitaal ontwerp
Informatica: Binair rekenen.
Subnetting Een inleidende sessie Bart Michel Sim Jacobs.
CMOS Technologie.
Hoofdstuk 9 havo KWADRATEN EN LETTERS
17/08/2014 | pag. 1 Fractale en Wavelet Beeldcompressie Les 5.
Fractale en Wavelet Beeldcompressie
STIMULANS KWALITEITSZORG juni 2014.
23 september 2014 Niels Vanmarcke
BINAIR REKENEN.
22/11/ DE ADVIEZEN VAN BEURSMAKELAAR BERNARD BUSSCHAERT Week
1 Zie ook identiteit.pdf willen denkenvoelen 5 Zie ook identiteit.pdf.
1 DE ADVIEZEN VAN BEURSMAKELAAR BERNARD BUSSCHAERT Week Us$ stijgt en de VS markten en grondstoffen markten+ obligatie markten storten ineen.
Dienstregelingen en Wiskunde
Bit`s en logische bouwstenen informatie. zVorm zInhoud Teken en betekenis Informatie heeft: symbool of teken boodschap.
Bits & bytes.
1 DE ADVIEZEN VAN BEURSMAKELAAR BERNARD BUSSCHAERT Week
Transcript van de presentatie:

Inhoudstafel Inleiding De basis van digitaal ontwerp Vak - hoofdstuk Inhoudstafel Inleiding De basis van digitaal ontwerp Combinatorische schakelingen: uitgang = combinatie ingangen Sequentiële schakelingen Niet-programmeerbare processoren Programmeerbare processoren Hardware-beschrijvingstalen

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Karnaugh-kaart Minimalisering met Karnaugh-kaarten Meerdere uitgangen ‘Don’t care’ condities Quine-McCluskey Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Waarom minimaliseren? Bijv. F = xy’z + xy’z’ = xy’(z + z’) = xy’ Vak - hoofdstuk Waarom minimaliseren? Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Kritisch pad = pad met de grootste vertraging van een ingang naar een uitgang Bijv. F = xy’z + xy’z’ = xy’(z + z’) = xy’ Kostprijs (1+1) + (4+4) + 3 = 13 1 + 3 = 4 Vertraging 1 + 2,8 + 2,4 = 6,2 1 + 2,4 = 3,4 x y z x y z

Hoe minimaliseren? Via manipulatie van Booleaanse uitdrukkingen Vak - hoofdstuk Hoe minimaliseren? Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Via manipulatie van Booleaanse uitdrukkingen Zeer moeilijk: er bestaat geen methode om de opeenvolgende theorema’s te kiezen die leiden tot de minimale oplossing Een voorstelling gebruiken waarin opvalt welke ingang geen belang heeft Waarheidstabel ? Duidelijk dat F = 1 als x = 1 en y = 0, onafhankelijk van z Alleen maar duidelijk voor z omdat de lijnen voor z = 0 of 1 onder mekaar liggen N-kubus of Karnaugh-kaart x y z F - 1 xy’z’ xy’z

Vak - hoofdstuk N-kubus Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL n-dimensionale kubus waarbij elke dimensie met 1 variabele overeen komt 2 variabelen 4 variabelen 3 variabelen 00 01 10 11 000 001 010 011 100 101 110 111 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

Karnaugh-kaart 2-dimensionale voorstelling van n-kubus  Vak - hoofdstuk Karnaugh-kaart Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL 2-dimensionale voorstelling van n-kubus elk vierkant heeft n buren naburige vierkanten hebben slechts voor 1 variabele een verschillende waarde 000 001 010 011 100 101 110 111 Spiegeling  z y x’y’z’ x’y’z xy’z’ xy’z x 1 yz 00 01 x’yz x’yz’ xyz xyz’ 11 10 xy’z’ xy’z xy’ (z niet belangrijk) x’z (y niet belangrijk) x’y’z x’yz x xy’z’ xyz’ xz’ (y niet belangrijk)

Meer dan 4 variabelen Spiegeling van kaart met 1 variabele minder Vak - hoofdstuk Meer dan 4 variabelen Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Spiegeling van kaart met 1 variabele minder Niet alle buren liggen fysisch naast mekaar! xy 10 11 01 00 y x z w v w z zw 00 01 11 10 xy 1 3 2 18 19 17 16 00 4 5 7 6 22 23 21 20 01 y 12 13 15 14 30 31 29 28 11 x 8 9 11 10 26 27 25 24 10 00101 01010

Meer dan 4 variabelen Herhaling van kaart met 1 variabele minder Vak - hoofdstuk Meer dan 4 variabelen Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Herhaling van kaart met 1 variabele minder Onoverzichtelijker naarmate meer variabelen! v w w z z zw 00 01 11 10 00 01 11 10 xy xy 1 3 2 16 17 19 18 00 00 4 5 7 6 20 21 23 22 01 01 y y 12 13 15 14 28 29 31 30 11 11 x x 8 9 11 10 24 25 27 26 10 10

Invullen Karnaugh-kaart Vak - hoofdstuk Invullen Karnaugh-kaart Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Vanuit waarheidstabel of canonische vorm x y z w F 1 1 1 1 m0 m1 m4 m5 xy 00 01 zw m3 m2 m7 m6 11 10 x z w m12 m13 m8 m9 m15 m14 m11 m10 y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Gebruiken Karnaugh-kaart Vak - hoofdstuk Gebruiken Karnaugh-kaart Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Zoek zo groot mogelijke subkubussen (= aaneengesloten gebieden met zelfde waarde) Bijv. F = x’y’z’w’ + x’yz’w + x’yzw + xy’z’w’ + xy’zw’ + xyz’w + xyzw w z zw xy 00 01 11 10 1 00 F = yw + xy’w’ 1 1 01 + y’z’w’ y 1 1 11 x 1 1 10

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Karnaugh-kaart Minimalisering met Karnaugh-kaarten Minimale AND-OR realisatie Minimale OR-AND realisatie Meerdere uitgangen ‘Don’t care’ condities Quine-McCluskey Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Minimalisering met Karnaugh-kaarten Vak - hoofdstuk Minimalisering met Karnaugh-kaarten Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Waarheidstabel of canonische vorm Maak de Karnaugh-kaart Bepaal alle priemimplicanten Bepaal alle essentiële priemimplicanten Zoek de minimale bedekking

1. Maak de Karnaugh-kaart Vak - hoofdstuk 1. Maak de Karnaugh-kaart Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL F = x’y’z’ + wz + xyz + w’y w x y z 1 1 1 F = x’y’z’ 1 1 + wz + xyz 1 1 + w’y Plaats enen op alle plaatsen in de Karnaugh-kaart waar een productterm 1 is.

2. Bepaal alle priemimplicanten Vak - hoofdstuk 2. Bepaal alle priemimplicanten Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL w’x’z’ z y x’y’z’ 1 1 1 w’y 1 1 yz x 1 1 wz w 1 1 1 wx’y’ Analyseer elke 1-minterm Bepaal de grootste subkubus(sen) die de minterm bevat(ten) en voeg ze toe aan de lijst van priemimplicanten (als ze er nog niet op staan)

3. Bepaal alle essentiële priemimplicanten Vak - hoofdstuk 3. Bepaal alle essentiële priemimplicanten Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL w’x’z’ z y x’y’z’ 1 1 1 w’y essentieel 1 1 yz x 1 1 wz essentieel w 1 1 1 wx’y’ Zoek 1-mintermen die slechts in 1 priemimplicant voorkomen; dit is een essentiële priemimplicant

4. Zoek de minimale bedekking Vak - hoofdstuk 4. Zoek de minimale bedekking z Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL y w’x’z’ 1 2 1 1 1 x’y’z’ 1 1 w’y essentieel x 1 1 yz w 1 1 1 wz essentieel Fmin = x’y’z’ + w’y + wz wx’y’ Zoek de kleinste set van (zo groot mogelijke) priemimplicanten die alle 1-mintermen omvat: Initieer de set met de essentiële priemimplicanten Voeg telkens een priemimplicant toe die zoveel mogelijk onbedekte 1-mintermen bevat Dit is een gulzige (‘greedy’) strategie: kies telkens de beste oplossing zonder rekening te houden met de gevolgen op toekomstige keuzes Niet noodzakelijk het globaal optimum

Winst t.g.v. minimalisering Vak - hoofdstuk Winst t.g.v. minimalisering Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Origineel F = x’y’z’ + w’y + xyz + wz Minimaal Fmin = x’y’z’ + w’y + wz w x y z w x y z Kostprijs = 4×1 + 2×4 + 2×3 + 1×5 = 23 Vertraging = 1 + 2,8 + 3,2 = 7 Kostprijs = 4×1 + 1×4 + 2×3 + 1×4 = 18 (22% goedkoper) Vertraging = 1 + 2,8 + 2,8 = 6,6 (6% sneller)

Een tweede voorbeeld v w x y z F 1 v w x y z F 1 Minimalisering Vak - hoofdstuk Een tweede voorbeeld Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL v w x y z F 1 v w x y z F 1

Realisatie als som van 1-mintermen Vak - hoofdstuk Realisatie als som van 1-mintermen Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL F = (6,7,10,11,14,15,21,23,25,27,29,31) v w x y z Kostprijs = 5×1 + 12×6 + 1×13 = 90 Vertraging = 1 + 3,6 + 6,4 = 11

Maak Karnaugh-kaart v z z y y 1 1 1 1 x 1 1 1 1 w 1 1 1 1 Vak - hoofdstuk Maak Karnaugh-kaart Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL v z z y y 1 1 1 1 x 1 1 1 1 w 1 1 1 1

Bepaal priemimplicanten Vak - hoofdstuk Bepaal priemimplicanten Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL v z z y y 1 1 1 1 x 1 1 1 1 w 1 1 1 1 v’xy v’wy xyz wyz vxz vwz

Bepaal essentiële priemimplicanten Vak - hoofdstuk Bepaal essentiële priemimplicanten Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL v z z y y 1 1 1 1 x 1 1 1 1 w 1 1 1 1 Reeds de minimale bedekking F1min2 = v’xy + v’wy + vxz + vwz

Minimale AND-OR realisatie Vak - hoofdstuk Minimale AND-OR realisatie Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL F1min2 = v’xy + v’wy + vxz + vwz v w x y z Kostprijs = 1×1 + 4×4 + 1×5 = 22 (76% goedkoper) Vertraging = 1 + 2,8 + 3,2 = 7 (34% sneller)

Realisatie in meer dan 2 lagen Vak - hoofdstuk Realisatie in meer dan 2 lagen Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL F = v’xy + v’wy + vxz + vwz = v’y(x + w) + vz(x + w) = (x + w)(v’y + vz) v w x y z Kostprijs = 1×1 + 5×3 = 16 (82% goedkoper) Vertraging = 1 + 2,4 + 2,4 + 2,4 = 8,2 (25% sneller)

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Karnaugh-kaart Minimalisering met Karnaugh-kaarten Minimale AND-OR realisatie Minimale OR-AND realisatie Meerdere uitgangen ‘Don’t care’ condities Quine-McCluskey Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Duale minimalisering met Karnaugh-kaart Vak - hoofdstuk Duale minimalisering met Karnaugh-kaart Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL v z z y y 1 1 1 1 x 1 1 1 1 w 1 1 1 1 Realiseer de nullen i.p.v. de enen

Bepaal de priemimplicanten Vak - hoofdstuk Bepaal de priemimplicanten Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL v z z y y x w v+y = (v’y’)’ v’+z = (vz’)’ w+x y+z

Bepaal essentiële priemimplicanten Vak - hoofdstuk Bepaal essentiële priemimplicanten Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL v z z y y x w Reeds de minimale bedekking F0min2 = (v+y)(w+x)(v’+z)

Minimale OR-AND realisatie Vak - hoofdstuk Minimale OR-AND realisatie Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL F0min2 = (v+y)(w+x)(v’+z) v w x y z Kostprijs = 1×1 + 3×3 + 1×4 = 14 (84% goedkoper) Vertraging = 1 + 2,4 + 2,8 = 6,2 (44% sneller)

Vak - hoofdstuk Samenvatting Minimalisering Karnaugh-kaart AND-OR OR-AND Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Realisatie Kost Rel. kost Vertraging Rel. vertraging Som van 1-mintermen 90 100% 11 Minimale AND-OR 22 24% 7 64% 3-lagen 16 18% 8,2 75% Minimale OR-AND 14 16% 6,2 56% compromis grootte  snelheid Verderop zullen we zien dat er nog andere mogelijkheden zijn, afhankelijk van de technologie OR-AND-INV Kostprijs = 11 (Rel. kostprijs = 12%) Vertraging = 4 (Rel. vertraging = 36%) NOR Kostprijs = 10 (Rel. kostprijs = 11%) Vertraging = 4,2 (Rel. vertraging = 38%)

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Karnaugh-kaart Minimalisering met Karnaugh-kaarten Meerdere uitgangen ‘Don’t care’ condities Quine-McCluskey Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Meerdere uitgangen Nadat alle essentiële priemimplicanten Vak - hoofdstuk Meerdere uitgangen 1 a x y z w Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Nadat alle essentiële priemimplicanten gerealiseerd zijn: Selecteer alle priemimplicanten die de mintermen realiseren en die al essentieel zijn voor een andere functie (en dus al gerealiseerd zijn) yw’ reeds essentieel voor a en b zw’ reeds essentieel voor a Kies de implicant die in het kleinst aantal functies voorkomt (om de fan-out zo laag mogelijk te houden) yw’ reeds in a en b zw’ reeds in a 1 b x y c 1 1 1 1 1 y a = yw’ + zw’ b = yw’ c = yz’ + y’z + zw’ 1 1 1 x 1 1

Vak - hoofdstuk Meerdere uitgangen Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Soms voordelig om niet-priemimplicanten te gebruiken (‘trial-and-error’!) Mogelijkheden stijgen als meerdere lagen toegelaten zijn 1 a x y z w b a = yz’ + yw + xwz’ b = yw’ + zy + xwy’z’ Kostprijs: 26 1 a x y b a = yz’ + wyz + xwy’z’ b = yw’ + wyz + xwy’z’ Kostprijs: 23

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Karnaugh-kaart Minimalisering met Karnaugh-kaarten Meerdere uitgangen ‘Don’t care’ condities Quine-McCluskey Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

‘Don’t care’ condities Vak - hoofdstuk ‘Don’t care’ condities Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL onvolledig gespecificeerde Booleaanse functie x y z w a b c d e f g 1 1 BCD  7-segment 1 1 a 1 1 f b g 1 1 1 e c 1 1 d X

1. Maak Karnaugh-kaarten Vak - hoofdstuk 1. Maak Karnaugh-kaarten Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL w w w w a z b z c z d z 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y X X X X X X X X X X X X X X X X x 1 1 X X 1 1 X X 1 1 X X 1 1 X X e f g 1 1 1 1 1 1 1 1 1 1 1 1 y X X X X X X X X X X X X x 1 X X 1 1 X X 1 1 X X

2. Bepaal alle priemimplicanten Vak - hoofdstuk 2. Bepaal alle priemimplicanten Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL w w w w a z b z c z d z 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 y X X X X X X X X X X X X X X X X x 1 1 X X 1 1 X X 1 1 X X 1 1 X X e f g 1 1 1 1 1 1 1 1 1 1 1 1 y X X X X X X X X X X X X x 1 X X 1 1 X X 1 1 X X

3. Bepaal alle essentiële priemimplicanten Vak - hoofdstuk 3. Bepaal alle essentiële priemimplicanten a = y’w’ + z + yw + x b = y’ + z’w’ + zw c = z’ + w + y Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL 1 X x y z w a volledige bedekking 1 X z w b volledige bedekking 1 X z w c volledige bedekking 1 X z w d volledige bedekking 1 X x y e volledige bedekking 1 X f volledige bedekking 1 X g onvolledige bedekking d = y’w’ + y’z + yz’w + zw’ + x e = y’w’ + zw’ f = z’w’ + yz’ + yw’ + x

4. Zoek de minimale bedekking Vak - hoofdstuk 4. Zoek de minimale bedekking Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Keuze van de priemimplicant die de overblijvende minterm realiseert: Selecteer alle priemimplicanten die de minterm realiseren en die al essentieel zijn voor een andere functie zw’ reeds essentieel voor d of e yw’ reeds essentieel voor f Kies de implicant die in het kleinst aantal functies voorkomt zw’ reeds in d en e yw’ reeds in f w z g 1 1 1 1 1 y X X X X x 1 1 X X g = y’z + yz’ + yw’ + x

Minimale realisatie x y z w a b c d e f g Minimalisering Vak - hoofdstuk Minimale realisatie x y z w Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL a b c d e f g

Kostprijs & vertraging Vak - hoofdstuk Kostprijs & vertraging Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Som van 1-mintermen Kostprijs = 110 (100%) Inverters : 4×1 = 4 AND-poorten : 10×5 = 50 OR-poorten : 9 + 9 + 10 + 8 + 5 + 7 + 8 = 56 Vertraging = 1 + 3,2 + 5,2 = 9,4 (100%) Kritisch pad = xc (9-input OR) Minimale 2-lagen-implementatie Kostprijs = 64 (58%) AND-poorten : 8×3 + 1×4 = 28 OR-poorten : 1×3 + 2×4 + 3×5 + 1×6 = 32 Vertraging = 1 + 2,8 + 3,6 = 7,4 (79%) Kritisch pad = zd (3-input AND & 5-input OR) x y z w a b c d e f g 1

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Karnaugh-kaart Minimalisering met Karnaugh-kaarten Meerdere uitgangen ‘Don’t care’ condities Quine-McCluskey Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Quine-McCluskey Karnaugh-kaart Quine-McCluskey Vak - hoofdstuk Quine-McCluskey Minimalisering Karnaugh-kaart Multi-uitgang Don't care Quine-McClusky Technologie Tijdsgedrag Basisblokken RTL Karnaugh-kaart handmatige methode: visuele patroonherkenning geen garantie op de optimale oplossing (gulzige strategie) Quine-McCluskey computermethode, gebruik makend van tabellen optimale oplossing vormt de basis van alle CAD-software van het ontwerpen van schakelingen moeilijk met de hand  zie boek

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Impact van technologie Gate array: NAND, NOR Componentenbibliotheek: AOI, OAI, … FPGA Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Optimalisering vertraging Vak - hoofdstuk Gate array Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Aanpassing nodig omdat ze enkel m-input NAND- of m-input NOR-poorten bevatten: INV-AND-OR (minimalisering 1-mintermen)  m-input NAND INV-OR-AND (minimalisering 0-maxtermen)  m-input NOR Aanpassing aan de technologie: Vervang n-input AND (OR) door m-input ANDs (ORs), met m<n Decompositie Conversie Vervang AND & OR door NAND (NOR) Optimalisering Elimineer dubbele negaties Optimalisering vertraging Tracht alle vertragingen van ingang naar uitgang gelijk te maken

Decompositie a + b + c + d = (a + b) + (c + d) = ((a + b) + c) + d = = Vak - hoofdstuk Decompositie Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL = = a + b + c + d = (a + b) + (c + d) = ((a + b) + c) + d

Conversie & optimalisering Vak - hoofdstuk Conversie & optimalisering Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Conversie gebaseerd op de wetten van De Morgan: Optimalisering: = (xy)’ = x’ + y’ = (x + y)’ = x’y’ = (x’)’ = x

Enkele voorbeelden De realisatie met alleen NAND of NOR is sneller: Vak - hoofdstuk Enkele voorbeelden Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL De realisatie met alleen NAND of NOR is sneller: geen extra inverter per poort

Realisatie van een inverter Vak - hoofdstuk Realisatie van een inverter Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL = Nadeel: verdubbeling belasting van de sturende poort = 1 Nadeel: langere bedrading

Optimalisering vertraging (‘retiming’) Vak - hoofdstuk Optimalisering vertraging (‘retiming’) Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL tracht alle vertragingen van een ingang naar een uitgang gelijk te maken Bijv. realiseer onderstaand voorbeeld enkel met 3-input NAND-poorten en optimaliseer de vertraging

Voorbeeld optimalisering vertraging Vak - hoofdstuk Voorbeeld optimalisering vertraging Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL 1e ontbinding in 3-input NAND 2e ontbinding in 3-input NAND Vertraging = 6×1,8 = 10,8 Vertraging = 4×1,8 = 7,2 (67%)

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Impact van technologie Gate array Componentenbibliotheek: AOI, OAI, … FPGA Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Bibliotheek van componenten Vak - hoofdstuk Bibliotheek van componenten Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL ASIC’s hebben AOI en OAI: klein en snel! Voor kleine functies: realiseer de inverse functie met AND-OR of OR-AND Bijv. 2e voorbeeld minimalisering: F = (6,7,10,11,14,15,21,23,25,27,29,31) Realisatie als som van 1-mintermen: kostprijs = 90 vertraging = 11 Minimale realisatie als OR-AND: kostprijs = 14 (16%) vertraging = 6,2 (56%)

Voorbeeld kleine functie Vak - hoofdstuk Voorbeeld kleine functie Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL F = (6,7,10,11,14,15,21,23,25,27,29,31)  F’= (0,1,2,3,4,5,8,9,12,13,16,17,18,19,20, 22,24,26,28,30) 1 w x y z v v w x y z F’ F F Kostprijs = 5×1 + 6 = 11 (12%) Vertraging = 1 + 3 = 4 (36%)

Grote functies (meerlagen realisatie) Vak - hoofdstuk Grote functies (meerlagen realisatie) Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Realiseer als AND-OR of OR-AND Transformeer naar NAND of NOR Bepaal kritisch pad Vervang zoveel mogelijk 2 lagen poorten op het kritisch pad door AOI/OAI (lagere kost / geen slechtere vertraging) Vervang zoveel mogelijk 2 lagen poorten buiten het kritisch pad door AOI/OAI (lagere kost)

Voorbeeld: F = w’z’ + z(w+y) Vak - hoofdstuk Voorbeeld: F = w’z’ + z(w+y) Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Realiseer met AND en OR y z w F Kostprijs = 14 Vertraging = 7,2 Transformeer naar NAND en NOR y z w F Kostprijs = 11 (79%) Vertraging = 5,2 (72%) Bepaal het kritisch pad

AOI/OAI gebruiken (1e poging) Vak - hoofdstuk AOI/OAI gebruiken (1e poging) Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Vervang 2 poorten op kritisch pad door AOI y z w F Kostprijs = 10 (71%) Vertraging = 5,6 (78%) y z w F Kostprijs = 10 (71%) Vertraging = 5,6 (78%) Vervang 2 poorten buiten kritisch pad door een component uit de bibliotheek

AOI/OAI gebruiken (2e poging) Vak - hoofdstuk AOI/OAI gebruiken (2e poging) Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Vervang 2 poorten op kritisch pad door OAI y z w F Kostprijs = 10 (71%) Vertraging = 5,6 (78%) y z w F Kostprijs = 7 (50%) Vertraging = 3,6 (50%) Vervang 2 poorten buiten kritisch pad door een component uit de bibliotheek

AOI/OAI gebruiken (3e poging) Vak - hoofdstuk AOI/OAI gebruiken (3e poging) Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Vervang 2 poorten op kritisch pad door OAI y z w F Kostprijs = 10 (71%) Vertraging = 3,8 (53%) Analyseer het nieuwe kritische pad y z w F Kostprijs = 9 (64%) Vertraging = 3,8 (53%)

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL Minimalisering van Booleaanse functies Impact van technologie Gate array Componentenbibliotheek FPGA Tijdsgedrag Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Aanpassing aan FPGA CLB Vak - hoofdstuk Aanpassing aan FPGA Minimalisering Technologie Gate array Chip-ontwerp FPGA Tijdsgedrag Basisblokken RTL CLB 2 functies van 4 variabelen 1 functie van 5 variabelen Aanpassing analoog aan vorige methode, maar zoek naar subschakelingen van 4 of 5 variabelen i.p.v. AOI/OAI Voor FPGA’s (of ASIC’s) gebeurt de aanpassing voor prototype: software (automatisch) eindproduct: handmatige optimalisering kan voordelig zijn

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Hazard Basisblokken RTL Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Hazards vermijden Basisbouwblokken op RTL-niveau (ADD, ALU, MUX, …)

Hazard bijkomende niveauverstoring (‘glitch’) t.g.v. tijdsgedrag Vak - hoofdstuk Hazard Minimalisering Technologie Tijdsgedrag Hazard Basisblokken RTL bijkomende niveauverstoring (‘glitch’) t.g.v. tijdsgedrag Statische hazard: constant niveau vertoont verstoring statische 1-hazard: uitgang moet 1 blijven maar wordt even 0 statische 0-hazard: uitgang moet 0 blijven maar wordt even 1 Dynamische hazard: uitgang schakelt niet eenmaal (bijv. 1  0) maar meerdere malen (bijv. 1  0  1  0)

Voorbeeld statische hazard Vak - hoofdstuk Voorbeeld statische hazard z y Minimalisering Technologie Tijdsgedrag Hazard Basisblokken RTL x y z y’ a b F 1 x 1 1 1 1 2 3 4 5 6 x y y’ z a b F Statische 1-hazard

Voorbeeld dynamische hazard Vak - hoofdstuk Voorbeeld dynamische hazard Minimalisering Technologie Tijdsgedrag Hazard Basisblokken RTL x’ x’’ a F x x’’ 1 2 3 4 5 6 7 8 9 x x’ a F Statisch equivalent: x F

Hazards vermijden Oorzaak Oplossing Vak - hoofdstuk Hazards vermijden Minimalisering Technologie Tijdsgedrag Hazard Basisblokken RTL Oorzaak Verschil in vertraging van eenzelfde ingang naar eenzelfde uitgang langs verschillende paden Oplossing Voeg redundante termen toe om disjuncte gebieden in de Karnaugh-kaart te bedekken 1-hazards: mintermen voor disjuncte 1-gebieden 0-hazards: maxtermen voor disjuncte 0-gebieden

Hazards vermijden z y x y z y’ a b F c 1 x 1 1 1 x y y’ z a b F 1 2 3 Vak - hoofdstuk Hazards vermijden z y x y z y’ a b F c Minimalisering Technologie Tijdsgedrag Hazard Basisblokken RTL 1 x 1 1 1 x y y’ z a b F 1 2 3 4 5 6 c

Vak - hoofdstuk Hazard-problemen Minimalisering Technologie Tijdsgedrag Hazard Basisblokken RTL Hazards zijn moeilijk handmatig te detecteren  simulatie tijdsgedrag belangrijk De kans op hazards vergroot naarmate tPLH en tPHL meer verschillen Wanneer zijn hazards een probleem? Als signaalovergangen gebruikt worden (bijv. klok) Als signaalniveaus gebruikt worden en de hazard komt op een slecht ogenblik (cfr. sequentiële schakelingen) Samen met de klok van een synchrone schakeling Gelijk wanneer in een asynchrone schakeling

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau Optellen & aftrekken Vermenigvuldigen (A)LU (De)multiplexer Prioriteitsencoder Vergelijken Schuifoperaties

Interludium: XOR-poort Vak - hoofdstuk Interludium: XOR-poort Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Herkenbaar aan dambordpatroon Realiseerbaar als boom van 2-input XOR’s Bruikbaar als programmeerbare inverter 1 x y z w 1 x y z w x  y  z  w x  y  z x y z w x  y  z  w = (x  y)  (z  w) x x’ 1

Halve opteller (‘Half Adder’) Vak - hoofdstuk Halve opteller (‘Half Adder’) Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver 1 xi yi ci+1 si xi yi ci+1 si 1 xi yi xi yi ci+1 si HA ci+1 1 CLB si

Opteller (‘Full Adder’) Vak - hoofdstuk Opteller (‘Full Adder’) 1 ci xi yi ci+1 si Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver xi yi ci ci+1 si 1 xi yi ci ci+1 si xi yi ci+1 FA ci si 1 CLB

Alternatieve implementatie Vak - hoofdstuk Alternatieve implementatie yi 1 ci xi si ci+1 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver xi yi ci ci+1 si 1 xi yi ci ci+1 si xi yi ci+1 FA ci si 1 poort minder, grotere vertraging van xi & yi naar ci+1, dezelfde vertraging van ci naar ci+1

Ripple-carry opteller Vak - hoofdstuk Ripple-carry opteller Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver 4-bit ripple-carry opteller x3 y3 x2 y2 x1 y1 x0 y0 c4 FA c3 FA c2 FA c1 FA c0=0 s3 s2 s1 s0 Kritisch pad: x0 of y0  cn: 1 XOR + n AND + n OR Vertraging: 3,2 + n  2,4 + n  2,4

Carry-look-ahead opteller Vak - hoofdstuk Carry-look-ahead opteller Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Ripple-carry opteller is traag omdat het kritisch pad van x0 naar cn+1 lang is Versnelling mogelijk door cn+1 rechtstreeks (bijv. in 2 lagen) te berekenen uit c0, x0…xn en y0…yn = ‘carry-look-ahead’ Cascadeerbare oplossing met ‘carry-generate’ gi en ‘carry-propagate’ pi : ci+1 = gi + pi ci gi = xi yi pi = xi yi’ + xi’yi Opmerking: ci+1 hangt niet rechtstreeks af van xi of yi xi yi ci si ci+1 pi gi

Carry-look-ahead opteller Vak - hoofdstuk Carry-look-ahead opteller si+n−1 xi+n−1 yi+n−1 si+2 xi+2 yi+2 si+1 xi+1 yi+1 si xi yi Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver … x y x y x y x y s c s c s c s c g p g p g p g p gn−1 pn−1 g2 p2 g1 p1 g0 p0 CLA generator g(i,i+n−1) g(0,n−1) c0 ci p(i,i+n−1) p(0,n−1) cn … c3 c2 c1 ci+n ci+3 ci+2 ci+1 CLA generatorfuncties:

Carry-look-ahead opteller Vak - hoofdstuk Carry-look-ahead opteller Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Realisatie van CLA-functies in 2 lagen Kritisch pad: xi of yi  ci+n: 1 XOR + 1 n-input AND + 1 n-input OR Vertraging: 3,2 + 2(1,6 + n0,4) = 6,4 + 0,8n Cascade van k-bit CLA-generators in logk n niveaus: bijv. n = 24, k = 4 Vertraging = 3,2 + (2logk n − 1)(3,2 + 0,8k)  logaritmisch stijgend CLA

Opteller-aftrekker (‘adder-subtractor’) Vak - hoofdstuk Opteller-aftrekker (‘adder-subtractor’) Adder/ subtractor X Y F S Cout Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver S Functie Bewerking X + Y Optelling 1 X − Y = X + Y* = X + Y’ + 1 Aftrekking FA x0 y0 c0 c1 f0 x1 y1 c2 f1 x2 y2 c3 f2 x3 y3 c4 f3 S overflow Alleen voor 2-complement!

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau Optellen & aftrekken Vermenigvuldigen (A)LU (De)multiplexer Prioriteitsencoder Vergelijken Schuifoperaties

Parallelle vermenigvuldiger Vak - hoofdstuk Parallelle vermenigvuldiger Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver 1-bit × 1-bit vermenigvuldiger 2-bit × 2-bit vermenigvuldiger = AND-poort a0 b0 c0 b0 a0 c0 = a0 × b0 1 b0 a0 a0b0 b0 b1 a0 b0 a0 b1 a1 b0 b1 a1 HA c0 c1 c2 c3 a0b1 a0b0 a1b1 a1b0 c0 c1 c2 c3 Elke term is 1×1-vermenigvuldiger

4-bit × 3-bit vermenigvuldiger Vak - hoofdstuk 4-bit × 3-bit vermenigvuldiger a0 b0 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver b3 b2 b1 b0 a1 b3 b2 b1 4-bit opteller cout s3 s2 s1 s0 b0 a2 b3 b2 b1 4-bit opteller cout s3 s2 s1 s0 c6 c5 c4 c3 c2 c1 c0 Kostprijs = O(n×m)

2-complement vermenigvuldiger Vak - hoofdstuk 2-complement vermenigvuldiger Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Hou rekening met de tekenbit Bijv. 11112 × 11112 = 000000012 ( 11112 = −110 = −8 + 4 + 2 + 1 ) Converteer naar ‘sign-magnitude’- voorstelling  dikwijls minder hardware 1 × −1  11111111 + 2 × −1 + 11111110 + 4 × −1 + 11111100 + −8 × −1 + 00001000 −1 × −1 00000001

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau Optellen & aftrekken Vermenigvuldigen (A)LU : (Aritmetische &) logische eenheid (De)multiplexer Prioriteitsencoder Vergelijken Schuifoperaties

Vak - hoofdstuk Logische eenheid Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver component die alle 16 Booleaanse functies van 2 bits kan realiseren Eenheid voor n bits = n eenheden voor 1 bit 4 bits S3S2S1S0 die de functie selecteren Codering van de selectiebits is identiek aan het functienummer in de tabel van de mogelijke Booleaanse functies

Functies logische eenheid Vak - hoofdstuk Functies logische eenheid Functiewaarden voor x,y 1-mintermen 00 01 10 11 Uitdrukking — F0 = 0 m3 1 F1 = xy m2 F2 = xy’ m2 + m3 F3 = x m1 F4 = x’y m1 + m3 F5 = y m1 + m2 F6 = xy’ + x’y m1 + m2 + m3 F7 = x + y m0 F8 = (x + y)’ m0 + m3 F9 = xy + x’y’ m0 + m2 F10 = y’ m0 + m2 + m3 F11 = x + y’ m0 + m1 F12 = x’ m0 + m1 + m3 F13 = x’ + y m0 + m1 + m2 F14 = (xy)’ m0 + m1 + m2 + m3 F15 = 1 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver

Implementatie logische eenheid Vak - hoofdstuk Implementatie logische eenheid Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver xi yi S0 S1 S2 xi yi S3 LU S0..3 fi fi

Arithmetic-Logic Unit Vak - hoofdstuk Arithmetic-Logic Unit Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver component die de volgende functies realiseert: 4 aritmetische bewerkingen: optelling, aftrekking, ‘increment’ (+1), ‘decrement’ (−1) 4 logische bewerkingen: AND, OR, INV, identiteit (doorgeven, nul-operatie) Realisatie: Opteller voor aritmetische operaties Arithmetic-Logic Extender ervoor conditionering ingangen opteller (cfr. XOR bij aftrekking) logische operaties

Implementatie ALU a4 b4 a3 b3 a2 b2 a1 b1 a0 b0 S01 M ALE ALE ALE ALE Vak - hoofdstuk Implementatie ALU a4 b4 a3 b3 a2 b2 a1 b1 a0 b0 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver S01 M ALE ALE ALE ALE ALE X Y cout FA FA FA FA FA f4 f3 f2 f1 f0 overflow M kiest het type bewerking: 0 = logisch, 1 = aritmetisch S0 en S1 kiezen de bewerking

ALU-functies M S1 S0 Functie F X Y C0 1 Complement A’ AND A AND B Vak - hoofdstuk ALU-functies Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver M S1 S0 Functie F X Y C0 1 Complement A’ AND A AND B Identity A OR A OR B Decrement A−1 A all 1 Add A+B A B Subtract A−B A B’ 1 Increment A+1 A all 0 1

Generatie carry-in M S1 S0 Functie F X Y C0 Complement A’ 1 AND Vak - hoofdstuk Generatie carry-in M S1 S0 Functie F X Y C0 Complement A’ 1 AND A AND B Identity A OR A OR B Decrement A−1 all 1 Add A+B B Subtract A−B B’ Increment A+1 all 0 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver 1 M S1 S0 c0 M S1 c0

ALE-implementatie: X M S1 S0 Functie F X Y C0 Complement A’ 1 AND Vak - hoofdstuk ALE-implementatie: X M S1 S0 Functie F X Y C0 Complement A’ 1 AND A AND B Identity A OR A OR B Decrement A−1 all 1 Add A+B B Subtract A−B B’ Increment A+1 all 0 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver b a S0 S1 M M S0 S0 X S1 S1 1 1 1 bi 1 1 1 1 1 1 1 X ai 1 1 1 1 1 1

ALE-implementatie: Y M S1 S0 Function F X Y C0 Complement A’ 1 AND Vak - hoofdstuk ALE-implementatie: Y M S1 S0 Function F X Y C0 Complement A’ 1 AND A AND B Identity A OR A OR B Decrement A−1 all 1 Add A+B B Subtract A−B B’ Increment A+1 all 0 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver b a S0 S1 M M S0 S0 Y S1 S1 1 1 1 1 bi 1 1 Y ai 1 1

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau Optellen & aftrekken Vermenigvuldigen (A)LU : (Aritmetische &) logische eenheid (De)multiplexer Prioriteitsencoder Vergelijken Schuifoperaties

Decoder of DeMultiplexer Vak - hoofdstuk Decoder of DeMultiplexer Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver E A1 A0 C3 C2 C1 C0 1 2-naar-4 decoder Decoder C3..0 A1..0 E E A1 A0 C3 C2 C1 C0 2 CLB

nm-naar-2nm = n niveaus van m-naar-2m Vak - hoofdstuk Decoders cascaderen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver nm-naar-2nm = n niveaus van m-naar-2m (2nm − 1)/(2m − 1) elementen A3..2 E Decoder A1..0 A1..0 A1..0 A1..0 E Decoder E Decoder E Decoder E Decoder C15..12 C11..8 C7..4 C3..0

Selector of Multiplexer Vak - hoofdstuk Selector of Multiplexer Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver 4-naar-1 MUX D3..0 S1..0 Y S1 S0 Y D0 1 D1 D2 D3 D3 D2 D1 D0 S1 S0 Y In principe: 2-naar-1 MUX is ½ CLB Wegens extra voorzieningen: 4-naar-1 MUX is 1 CLB

Alternatieve implementatie MUX Vak - hoofdstuk Alternatieve implementatie MUX D3 D2 D1 D0 Y Decoder S1 S0 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver S1 S0 Y D0 1 D1 D2 D3 Met 3-state buffers D3 D2 D1 D0 Y Decoder S1 S0 D Y E E Y Z 1 D

Alternatieve implementatie MUX Vak - hoofdstuk Alternatieve implementatie MUX D3 D2 D1 D0 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Decoder S1 S0 Bus Bus = gedistribueerde versie van MUX Gemakkelijk uit te breiden Nadeel MUX met hoge fan-in fan-in OR-poort wordt te groot alle ingangen moeten naar 1 centrale plaats 3-state buffer meestal gratis in een FPGA elke CLB heeft er een die aan een horizontale lange lijn verbonden kan worden

Multiplexers cascaderen Vak - hoofdstuk Multiplexers cascaderen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver D15..12 D11..8 D7..4 D3..0 S1..0 S1..0 S1..0 S1..0 4-naar-1 MUX 4-naar-1 MUX 4-naar-1 MUX 4-naar-1 MUX S3..2 4-naar-1 MUX Y

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau Optellen & aftrekken Vermenigvuldigen (A)LU : (Aritmetische &) logische eenheid (De)multiplexer Prioriteitsencoder Vergelijken Schuifoperaties

Prioriteitsencoder D2 D3 D1 D0 Any A1 1 A0 D3 D2 D1 D0 A1 A0 Any 1 1 1 Vak - hoofdstuk Prioriteitsencoder D2 D3 D1 D0 Any A1 1 A0 D3 D2 D1 D0 A1 A0 Any 1 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver 1 1 1 1

Implementatie prioriteitsencoder Vak - hoofdstuk Implementatie prioriteitsencoder D2 D3 D1 D0 Any Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Priority encoder D3..0 A1..0 Any 1,5 CLB D2 D3 D1 D0 A1 D3 D0 Any A1 A0 1 D2 D3 D1 D0 A0

Prioriteitsencoders cascaderen Vak - hoofdstuk Prioriteitsencoders cascaderen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver D15..12 D11..8 D7..4 D3..0 Priority encoder Priority encoder Priority encoder Priority encoder Priority encoder A3..2 Any 4-to-1 MUX A1 4-to-1 MUX A0

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau Optellen & aftrekken Vermenigvuldigen (A)LU : (Aritmetische &) logische eenheid (De)multiplexer Prioriteitsencoder Vergelijken Schuifoperaties

Comparator Gin Lin x1 y1 x0 y0 G (X>Y) L (X<Y) 1 1 y1 x1 x0 y0 G Vak - hoofdstuk Comparator Gin Lin Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver x1 y1 x0 y0 G (X>Y) L (X<Y) 1 1 y1 x1 x0 y0 G L 1 1 1

Implementatie comparator Vak - hoofdstuk Implementatie comparator x1 y1 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver 1 y1 x1 x0 y0 G G Comp x0 (Gin) 1 CLB L y0 (Lin) x1 x0 y1 y0 1 y1 x1 x0 y0 L G L

Comparators cascaderen Vak - hoofdstuk Comparators cascaderen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver x7 y7 x6 y6 x5 y5 x4 y4 x3 y3 x2 y2 x1 y1 x0 y0 G Comp Comp Comp Comp Comp Comp Comp L Comp x1 y1 x2 y2 x3 y3 x4 y4 x5 y5 x6 y6 x7 y7 x0 y0 G L

Vergelijken met constanten Vak - hoofdstuk Vergelijken met constanten Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Eenvoudigere schakelingen, bijv. x is 8 bits breed x = 0 x = 255 x ≥ 64 x x x7 x6 x < 192 x7 x6 x is even x is oneven x0

Ontwerp combinatorische schakelingen Vak - hoofdstuk Ontwerp combinatorische schakelingen Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver Minimalisering van Booleaanse functies Impact van technologie Tijdsgedrag Basisbouwblokken op RTL-niveau Optellen & aftrekken Vermenigvuldigen (A)LU : (Aritmetische &) logische eenheid (De)multiplexer Prioriteitsencoder Vergelijken Schuifoperaties

Vak - hoofdstuk Schuifoperaties Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver m posities schuiven: links ‘<<’, rechts ‘>>’ Nieuwe bits Logisch schuiven Een bit van een bijkomende ingang Aritmetisch schuiven Links schuiven: m nullen rechts erbij Rechts schuiven: m tekenbits links erbij (MSB voor 2-complement, 0 anders) i << m  i × 2m i >> m  i ÷ 2m m posities roteren, links of rechts De bits die aan de ene kant afvallen worden er aan de andere kant bijgezet

Implementatie schuifoperaties Vak - hoofdstuk Implementatie schuifoperaties S2 S1 S0 functie X 1 Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver no shift shift left rotate left shift right rotate right d0 d1 d2 d3 S2 S1 S0 L-in R-in 4-to-1 MUX M y3 y2 y1 y0

‘8-bit barrel left rotator’ Vak - hoofdstuk ‘8-bit barrel left rotator’ Minimalisering Technologie Tijdsgedrag Basisblokken RTL Opteller Vermenig-vuldiger ALU (De)Mux Prioriteits-encoder Comparator Schuiver S0 M M M M M M M M S1 M M M M M M M M S2 M M M M M M M M