electronic technology design and workshop - dmcs pages for
TRANSCRIPT
![Page 1: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/1.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
Electronic Technology Design and WorkshopElectronic Technology Design and Workshop IFE, B&T, V IFE, B&T, V semestersemester
Electronic Technology Design and Workshop
Presented and updated by
Przemek SekalskiDMCS room 2
2007
![Page 2: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/2.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
Electronic Technology Design and WorkshopElectronic Technology Design and Workshop IFE, B&T, V IFE, B&T, V semestersemester
Electronic Technology Design and Workshop
Lecture 7
Electronic Circuit Synthesis
![Page 3: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/3.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 3
Behavioral representation
Structural representation
Physical representation
Black boxINPUTS OUTPUTS
INPUTS OUTPUTS
INPUTS OUTPUTS
Synthesis of electronic circuits
![Page 4: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/4.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 4
Transistor
Gate
Register
Processor
physicalbehavioral structural
Not supported (some support possible in specific cases - software-hardware codesign)
Partially supported (fully supported for certain types of digital designs)
Fully supported
Automatic translation of the circuit description to less abstract representations e.g. a) from behavioural to structuralb) from structural to physicalc) from behavioural to physical
Synthesis of digital electronic circuits
![Page 5: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/5.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 5
BAF ⋅=
Behavioural Structural(gate level)
Structural(transistor level)
Physical(transistor level
- IC layout)
Digital synthesis
![Page 6: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/6.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 6
Description
of the project
in HDL
SoftwareSchematic of
the projectProgrammer
Physical
Integrated
Circuit
Compiler of HardwareDescription Language(ABEL, Verilog, VHDL, …)
Device making the electrical connections inside Programmable Logic Circuits
Human activity Automated process
Digital synthesis with PLD
![Page 7: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/7.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 7
Digital circuits
Standard circuits ASIC
PLD FPGA Semi Custom Full Custom
ASIC - Application Specific Integrated CircuitPLD - Programmable Logic DeviceFPGA - Field Programmable Gate ArraySemi Custom - Integrated Circuits designed by users with library cellsFull Custom - Integrated Circuits dsigned from scratch, designed or orderd by users
Digital circuits classification
![Page 8: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/8.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 8
ABEL (Advanced Boolean Expression Language) -one of the oldest HDL, applicable for simple and less complex digital circuits, originally designed for programming certain types of PLDs,projects can be described by Boolean equations, truth tables or state-diagrams.
VHDL - Very High Speed Integrated Circuit (VHSIC) Hardware Description Languagelanguage for general description of complex digital circuits, acknowledged as IEEE standard (1987),designed for uniform documentation and simulation of digital projects, not targeted for any specific architecture, allows the description of parallel and sequential processing
Verilog -most popular industry standard,acknowledged as IEEE standard (1995)less complex than VHDL and easier to learn, based on C-language structure,best suited for complex FPGA circuits
Digital circuits description languages
![Page 9: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/9.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 9
Electronic Compass
Earth magnetic
field sensor
8-pointdisplay
NEN
NWW
SWS
SEE
Tra
nsco
der
(PLD
chi
p)
East
South
West
North
Inputs Outputs
Example of behavioral description
![Page 10: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/10.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 10
Electronic Compass - schematic
![Page 11: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/11.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 11
North West East South N NE E SE S SW W NW0 1 1 1 0 1 1 1 1 1 1 10 1 0 1 1 0 1 1 1 1 1 11 1 0 1 1 1 0 1 1 1 1 11 1 0 0 1 1 1 0 1 1 1 11 1 1 0 1 1 1 1 0 1 1 11 0 1 0 1 1 1 1 1 0 1 11 0 1 1 1 1 1 1 1 1 0 10 0 1 1 1 1 1 1 1 1 1 0
Inputs Outputs
Electronic Compass - transcoder truth-table
![Page 12: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/12.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 12
4 to 8 bittranscoder
north
west
east
south
nneesesswwnw
Input signals Output signals
Behavior described
by truth table.
Electronic Compass – transcoder chip
![Page 13: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/13.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 13
module transcoder;
title '4 to 8 bit transcoder for electronic comapss'
transcoder device 'P16H8';
north, west, east, south pin;
n, ne, e, se, s, sw, w, nw pin istype 'com';
on = 0;
off = 1;
yes = 0;
no = 1;
Beginning of the ABEL program
Declarations of input and outputsignals (similar to variablesin programming languages)
Definitions of constants(in order to improve clarityof the program)
The ABEL code (part I)
![Page 14: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/14.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 14
The ABEL code (part II)truth_table
([north,west,east,south]->[ n, ne, e, se, s, sw, w, nw])
[ yes, no, no, no]-> [ on, off, off, off, off, off, off, off];
[ yes, no, yes, no]-> [ off, on, off, off, off, off, off, off];
[ no, no, yes, no]-> [ off, off, on, off, off, off, off, off];
[ no, no, yes, yes]-> [ off, off, off, on, off, off, off, off];
[ no, no, no, yes]-> [ off, off, off, off, on, off, off, off];
[ no, yes, no, yes]-> [ off, off, off, off, off, on, off, off];
[ no, yes, no, no]-> [ off, off, off, off, off, off, on, off];
[ yes, yes, no, no]-> [ off, off, off, off, off, off, off, on];
test_vectors
([north,west,east,south]->[ n, ne, e, se, s, sw, w, nw])
[ yes, no, no, no]->[ on, off, off, off, off, off, off, off];
[ yes, no, yes, no]->[ off, on, off, off, off, off, off, off];
[ no, no, yes, no]->[ off, off, on, off, off, off, off, off];
[ no, no, yes, yes]->[ off, off, off, on, off, off, off, off];
[ no, no, no, yes]->[ off, off, off, off, on, off, off, off];
[ no, yes, no, yes]->[ off, off, off, off, off, on, off, off];
[ no, yes, no, no]->[ off, off, off, off, off, off, on, off];
[ yes, yes, no, no]->[ off, off, off, off, off, off, off, on];
end;
Behavioral description of the device functionality(here in form of truth-table)
Verification of correctness of generated equations
![Page 15: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/15.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 15
Automatically generated equations:
nw = (north & !west & east# !north & west & south# west & !east & south# north & west & !south);
w = (north & west & !east# !north & east & south# west & !east & south# north & east & !south);
……...
Automatically generated logical structure
The code implementation
![Page 16: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/16.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 16
+---------\ /---------+| \ / || ----- |
north | 1 20 | Vcc| |
west | 2 19 | n | |
east | 3 18 | e | |
south | 4 17 | se| || 5 16 | s | || 6 15 | sw| || 7 14 | w | || 8 13 | nw| || 9 12 | ne| |
GND | 10 11 | | || |`---------------------------'
P16H8 Chip Diagram
4 to 8 bit transcoder for electronic comapss
![Page 17: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/17.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 17
Input signals Output signals
Analog system
Digital system
continuous continuous
digital digital
Digital vs Analog Systems
![Page 18: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/18.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 18
Identity element a+0=a a*1=aCommutativity a+b=b+a a*b=b*aAssociativity a+(b+c)=(a+b)+c a*(b*c)=(a*b)*cDistributivity a+(b*c)=(a+b)*(a+c) a*(b+c)=(a*b)+(a*c)Complement a+a=1 a*a=0
Idempotency a+a=a a*a=aComplement a+1=1 a*0=0Absorption a+a*b=a a*(a+b)=aElement Elimination a+a*b=a+b a*(a+b)=a*bDe Morgan’s Laws a+b=a*b a*b=a+b
Boolean Algebra
![Page 19: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/19.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 19
BooleanFunction
x1, x2 … xn y
y = B (x1, x2 … xn)
a b c f(a, b, c)0 0 0 00 0 1 10 1 0 00 1 1 11 0 0 11 0 1 01 1 0 11 1 1 1
E.g.
f(a, b, c) = a*(b+c) + (a+b)*c
Minterm notation
Maxterm notation
f(a, b, c) = abc + abc + abc + abc + abc
f(a, b, c) = (a+b+c) (a+b+c) (a+b+c)
Truth Table notation
Boolean Functions
![Page 20: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/20.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 20
Logic Gates
![Page 21: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/21.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 21
Boolean Function Realization - examples
![Page 22: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/22.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 22
JK flip-flop
J(t) K(t) Q(t+1)0 0 Q(t)0 1 01 0 11 1 Q(t)
Q(t+1) = J(t) Q(t) + K(t) Q(t)
D Q
Qclk
Data flip-flop
J Q
Q
clk
K
J Q
Q
clk
K
DD(t) Q(t+1)
0 01 1
Q(t+1) = D(t)
Memory Elements (flip-flops)
![Page 23: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/23.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 23
D Q
Qclk
clk
D
Q
T Q
Qclk
D Q
Qclk
clk
Q
Q(t+1) = D(t)
Data flip-flop
Toggle flip-flop
Q(t+1) = Q(t)
Memory Elements (flip-flops)
![Page 24: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/24.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 24
Combinatorialsystem
X = x1, x2 … xn
Y = y1, y2 … ym
y1 = B1(x1, x2 … xn)y2 = B2(x1, x2 … xn)…ym = Bm(x1, x2 … xn)
Logical gates only
Any change of input signals causes the appropriate changeof output signals, as fast as it is possible, i.e after the propagation time of logical gates.
Output signals in combinatorial circuits depends onlyon the present input signals.
Bx - boolean function
Y = B(X)
Digital Systems
![Page 25: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/25.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 25
Sequentialsystem
X = x1, x2 … xnY = y1, y2 … ym
Logical gates& memory elements
Output signals are the outputs of memory elements a nd they may change only after a new write operation is performed.
Output signals are Boolean functions (S) of input s ignals, but they may change only at prescribed moments.
When there is no write (store) operation, the outpu t remains stable, regardless the state of the input signals.
The sufficient description of the sequential system is given by the set of signalsat the output of the memory elements, i.e. state of the system (Q)
Q - state of the system
Y = S(X)
clk
Digital Systems
![Page 26: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/26.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 26
Sequentialsystem
with feedback
X = x1, x2 … xnY = y1, y2 … ym
Logical gates& memory elements Q - state of the system (Y, F)
feedback signals
output signals
Y = S(X,F)
F = f1, f2 … fm
Output signals are boolean functions (S) of input signals a nd feedback signals, but they may change only at prescribed moments.
The sufficient description of the sequential system is giv en by the set of signalsat the output of the memory elements, i.e. state of the system (Q) - output & feedback
clk
Digital Systems
![Page 27: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/27.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 27
CurrentstateQ(t)
Nextstate
Q(t+1)writing to the memory elements
What the next state will be after the transition depends on
1) the current state (values of the memory element signals Y, F)
2) the values of input signals at the moment of the transiti on
Input conditions X(t)
0
State Diagrams - example
12
3
Boolean
functions
(gates only)
Memory
elements
(flip-flops only)
xQ1
Q2
x=0
x=1
x=0x=0
x=1
x=1
clk
Description of Sequential Digital Systems
![Page 28: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/28.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 28
JK flip-flop
J Q
clk
K
D Q
clk
Data flip-flop
T Q
clk
Toggle flip-flop
0 1
J=1 & K=0J=1 & K=1
J=0 & K=1J=1 & K=1
J=0 & K=1J=0 & K=0
J=1 & K=0J=0 & K=0
0 1
D=1
D=1
D=0
D=0
0 1
State Diagrams – memory elements
![Page 29: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/29.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 29
T Q1
clk
T Q2
T Q3
0000
0011
0102
1004
1106
0113
1015
1117
clk
Q1
Q2
Q3
State Diagram – counter
![Page 30: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/30.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 30
A B
A B
IR transmitters
IR receivers
Signal analysis
counter counter
Enter Exit
A
B
In
A
B
Out
A
B
In
Out
State Diagram example - bi-directional person counter
![Page 31: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/31.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 31
0
12
3A
A
C
P
P
C
C, P
B B
45
6
AA
C
P
C
C, P
B
BP
C,P
A
B
clk0 1 2 3 0 4 5 6 0 0 0 4 5 0 0 0
InOut
C
A = [1,0,0]B = [0,1,0]P = [0,0,0]C = [x,x,1]
A,B,C
State Diagram example - bi-directional person counter
![Page 32: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/32.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 32
Sequentialsystem
with feedback
ABC
In
q1,q0clk
Integrated circuit for person counting system
Realization - uni-directional person counter
![Page 33: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/33.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 33
module pcounter;title 'Bi-direction person counter'
clk pin; "clock signalA,B pin; "signals from IR sensorsC pin; "clear signal
In_ pin istype 'reg'; "output line
q1,q0 node istype 'reg'; "state counter
c = .c.;x = .x.;
Equations[q1..q0].clk=clk;In_.clk=clk;
State_Diagram [q1..q0]state 0:if ((A==1) & (B==0) & (C==0)) then 1 with In_:=0
else 0 with In_:=0;
state 1:if (C==1) then 0 else
if ((A==1) & (B==0)) then 1else
if ((A==0) & (B==0)) then 2;
state 2:if (C==1) then 0 else
if ((A==0) & (B==0)) then 2else
if ((A==0) & (B==1)) then 3;
state 3:if ((A==0) & (B==1)) then 3 else 0 with In_:=1;
end pcounter;
ABEL - bi-directional person counter
![Page 34: Electronic Technology Design and Workshop - DMCS Pages for](https://reader030.vdocument.in/reader030/viewer/2022021714/620bbdea8b78e61865530874/html5/thumbnails/34.jpg)
Technical University of LodzDepartment of Microelectronics and Computer Science s
ElectronicElectronic TechnologyTechnology Design Design andand WorkshopWorkshop IFE, B&T, V IFE, B&T, V semestersemester 34
test_vectors ([clk,A,B,C] -> [q1,q0,In_])[ c,0,0,0] -> [ 0, 0, 0];[ c,1,0,0] -> [ 0, 1, 0];[ c,0,0,0] -> [ 1, 0, 0];[ c,0,1,0] -> [ 1, 1, 0];[ c,0,0,0] -> [ 0, 0, 1];[ c,0,0,0] -> [ 0, 0, 0];[ c,1,0,0] -> [ 0, 1, 0];[ c,0,0,0] -> [ 1, 0, 0];[ c,x,x,1] -> [ 0, 0, 0];[ c,0,0,0] -> [ 0, 0, 0];[ 0,1,0,0] -> [ 0, 0, 0];[ c,1,0,0] -> [ 0, 1, 0];
Equations:
In_ := (!B & q1.FB & q0.FB# A & q1.FB & q0.FB);
In_.C = (clk);
q0 := (!A & B & q1.FB & q0.FB# !A & B & !C & q1.FB# A & !B & !C & !q1.FB);
q0.C = (clk);
q1 := (!A & B & q1.FB & q0.FB# !A & !C & q1.FB & !q0.FB# !A & !B & !C & !q1.FB & q0.FB);
q1.C = (clk);
ABEL - bi-directional person counter