34
1 Ben Bruidegom 1 Reconstruction: NLT-module Digitale techniek Context: Disco

Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

1Ben Bruidegom

1

Reconstruction: NLT-module Digitale techniek

Context: Disco

Page 2: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

2Ben Bruidegom

2

Context

• If humidity is > 80% or the temperature > 26 °C a fan is blowing;

• If there are ≥ 31 persons inside the disco a red light switches on;

• If the noise level > ..dB the volume knob of the sound amplifier turn to the left.

• A disco light must be designed and build;

Page 3: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

3Ben Bruidegom

3

A pseudo random generator to steer the disco lights

(linear feed back shift register)

Page 4: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

4Ben Bruidegom

4

Required sensors:

• Humidity sensor, • Temperature sensor, • Photogate• Sound sensor• Position of a volume regulator

Page 5: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

5Ben Bruidegom

5

Required actuators:

• Disco light • Fan• Volume regulator to prevent ear-damage

Page 6: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

6Ben Bruidegom

6

Ontwerpen van een eindige toestandsautomaat

� Flankgetriggerde D-flipflop

� Toestandsdiagram

� Toestandstabel/waarheidstabel

� Som van mintermen

� Vereenvoudigen van deze som

� Implementatie

� Demonstratie

Page 7: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

7Ben Bruidegom

7

Wat is een eindige toestandsautomaat?

� Een eindige toestandsautomaat of Finite-state machine is een model voor het gedrag voor een

systeem, bestaande uit een eindig aantal toestanden, overgangen tussen die toestanden en acties.

Page 8: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

8Ben Bruidegom

8

State diagram

State (cirkel)

Transition (pijl)D = 0 (close door)D = 1 (open door)Q = 0 (door is closed)Q = 1 (door is open)

Transition

condition

Q = {0,1} verzameling toestanden

D = {0,1} invoeralfabet

0 є Q is de initiële toestand

δ = is de overgangsfunctie

Page 9: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

9Ben Bruidegom

9

Finite state machines

Moore Machine

Page 10: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

10Ben Bruidegom

10

Current state: D-flipflop

edge

Page 11: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

11Ben Bruidegom

11

Level triggerered & Edge triggered

0

1 � 0 -overgang

neergaande klokflank ↓

0 � 1 -overgang

opgaande klokflank ↑

1

Page 12: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

12Ben Bruidegom

12

Truth table D-flipflop

Load 1 Set11↑1

Load 1 Set10↑1

Load 0 Reset01↑0

Load 0 Reset00↑0

FunctieQnextQcurrentklokD

Page 13: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

13Ben Bruidegom

13

State diagram & Truth table

D-flipflop

Tabel1

Load 1 Set11↑1

Load 1 Set10↑1

Load 0 Reset01↑0

Load 0 Reset00↑0

FunctieQn+1QnklokDn

Page 14: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

14Ben Bruidegom

14

State diagram D-flipflop

Load 1 Set11↑1

Load 1 Set10↑1

Load 0

Reset

01↑0

Load 0

Reset

00↑0

FunctieQn+1QnklokDn

Page 15: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

15Ben Bruidegom

15

Voorbeeld: Verkeerslicht

Noord-Zuid

Oost-West

Stoplichten zijn gekoppeld

Twee toestanden:

1. OW rood & NZ groen

2. OW groen & NZ rood

Page 16: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

16Ben Bruidegom

16

Verkeerslicht

Next State function voor een stoplicht

2 auto’s, licht wordt rood0111

2 auto’s, licht wordt groen1011

NZauto, licht wordt rood0101

NZauto, licht blijft rood0001

OWauto, licht blijft groen1110

OWauto, licht wordt groen1010

Geen auto, licht blijft groen1100

Geen auto, licht blijft rood0000

Toestand licht oost-west route 1 = groenQnextQcurrentOWautoNZauto

Page 17: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

17Ben Bruidegom

17

State Diagram

Page 18: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

18Ben Bruidegom

18

Van State diagram � tabel

Next State function voor een stoplicht

2 auto’s, licht wordt rood111

2 auto’s, licht wordt groen011

NZauto, licht wordt rood101

NZauto, licht blijft rood001

OWauto, licht blijft groen110

OWauto, licht wordt groen010

Geen auto, licht blijft groen1100

Geen auto, licht blijft rood0000

Toestand licht oost-west route 1 = groenQnextQcurrentOWautoNZauto

Page 19: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

19Ben Bruidegom

19

Tabel� som van mintermen

Next State function voor een stoplicht

2 auto’s, licht wordt rood0111

2 auto’s, licht wordt groen1011

NZauto, licht wordt rood0101

NZauto, licht blijft rood0001

OWauto, licht blijft groen1110

OWauto, licht wordt groen1010

Geen auto, licht blijft groen1100

Geen auto, licht blijft rood0000

Toestand licht oost-west route 1 = groenQnextQcurrentOWautoNZauto

.QOW . NZQnext +++=

Page 20: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

20Ben Bruidegom

20

Som van mintermen

.QOW. . NZ.OW.Q NZQ OW. . NZQ .OW . NZQ

)QOW,f(NZ,Q

next

currentnext

+++=

=

Page 21: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

21Ben Bruidegom

21

Vereenvoudigen van deze som

.Q. NZ1.Q.NZOW)OW.Q.( NZ .OW.Q NZ.Q OW . NZ ==+=+

.QOW. . NZQ .OW . NZQ.OW. NZQ . OW . NZQnext +++=

Distributieve wet A OR NOT(A) = 1

Q AND 1 = Q

Page 22: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

22Ben Bruidegom

22

Vereenvoudigen van deze som

.Q . OW.Q NZQnext +=

.QNZ.OW..OW.QNZQ.OW.NZ.QOW.NZQnext +++=

Page 23: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

23Ben Bruidegom

23

Van expressie naar schakeling

).Q .OW (.Q) NZ(Qnext +=

Inverter

2-input AND-gate2-input OR-gate

Page 24: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

24Ben Bruidegom

24

.Q . OW.Q NZQnext +=

Implementatie “Next State”met poorten

Page 25: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

25Ben Bruidegom

25

Eindige toestandsautomaat

Page 26: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

26Ben Bruidegom

26

Eindige toestandsautomaat

Sensoren en actuatoren via CoachLbII+

Page 27: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

27Ben Bruidegom

27

Tweede voorbeeld:

Steering a servo-system

Page 28: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

28Ben Bruidegom

28

Synchrone seriële datatransmissie

Page 29: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

29Ben Bruidegom

29

Gewenste ontwikkeling:

Nieuw systeembord

Sensors Processing Actuators

Page 30: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

30Ben Bruidegom

30

USB

System Board II

Sensors (New)Actuators

A new System Board

Design & test on the PC-screen

Design & test on

the PC-screen

Page 31: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

31Ben Bruidegom

31

USB

System Board II

A new System Board

Compile & Load to a FPGASensors (New) Actuators

Processing

in a FPGA

Page 32: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

32Ben Bruidegom

32

SIM-PL is gemaakt door Wouter Koolen-Wijkstra

Wouter heeft vorige week zijn Master of Logic behaald en promoveert

In februari 2011 bij het Centrum voor Wiskunde en Informatica.

Page 33: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

33Ben Bruidegom

33

Website:www.science.uva.nl/amstel/SIM-PL/

� Software

� Componenten

� Tutorial

� Onderwijsmateriaal

Mail to: [email protected]

Page 34: Reconstruction: NLT-module Digitale techniek Context: Disco · • A disco light must be designed and build; Ben Bruidegom 3 3 A pseudo random generator to steer the disco lights

34Ben Bruidegom

34

Vragen?