The document describes building a finite state machine (FSM) combination lock with a reset button, two number buttons (0 and 1), and an unlock output, where the combination is 01011. It provides steps to design the lock FSM by creating a block diagram and state transition diagram, and then writing Verilog modules for the FSM. The document also provides examples of level-to-pulse converters and discusses Moore and Mealy FSMs.
The following presentation is a part of the level 4 module -- Digital Logic and Signal Principles. This resources is a part of the 2009/2010 Engineering (foundation degree, BEng and HN) courses from University of Wales Newport (course codes H101, H691, H620, HH37 and 001H). This resource is a part of the core modules for the full time 1st year undergraduate programme.
The BEng & Foundation Degrees and HNC/D in Engineering are designed to meet the needs of employers by placing the emphasis on the theoretical, practical and vocational aspects of engineering within the workplace and beyond. Engineering is becoming more high profile, and therefore more in demand as a skill set, in today’s high-tech world. This course has been designed to provide you with knowledge, skills and practical experience encountered in everyday engineering environments.
The following presentation is a part of the level 4 module -- Digital Logic and Signal Principles. This resources is a part of the 2009/2010 Engineering (foundation degree, BEng and HN) courses from University of Wales Newport (course codes H101, H691, H620, HH37 and 001H). This resource is a part of the core modules for the full time 1st year undergraduate programme.
The BEng & Foundation Degrees and HNC/D in Engineering are designed to meet the needs of employers by placing the emphasis on the theoretical, practical and vocational aspects of engineering within the workplace and beyond. Engineering is becoming more high profile, and therefore more in demand as a skill set, in today’s high-tech world. This course has been designed to provide you with knowledge, skills and practical experience encountered in everyday engineering environments.
These slides contain the basic of sequential logic, and includes a detailed and animated description of Flip-Flop and latches, it includes shift registers and counters also. It covers the fourth unit of Digital Logic Design
These slides contain the basic of sequential logic, and includes a detailed and animated description of Flip-Flop and latches, it includes shift registers and counters also. It covers the fourth unit of Digital Logic Design
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Lecture 12.pptx
1. FSM Example
GOAL:
Build an electronic combination lock with a reset button, two
number buttons (0 and 1), and an unlock output. The
combination should be 01011.
RESET
“0”
“1”
9/26/2018 6.111 Fall 2018 1
UNLOCK
STEPS:
1. Design lock FSM (block diagram, state transitions)
2. Write Verilog module(s) for FSM
2. Step 1A: Block Diagram
fsm_clock
reset
b0_in
b1_in
lock
button
button
button
Clock
generator
Button
Reset
Button
0
Button
1
fsm
state
unlock
reset
b0
b1
LED
DISPLAY
Unlock
9/26/2018 6.111 Fall 2018 2
LED
4. Design Example: Level‐to‐Pulse
• A level‐to‐pulse converter produces a single‐
cycle pulse each time its input goes high.
• It’s a synchronous rising‐edge detector.
• Sample uses:
• Buttons and switches pressed by humans for
arbitrary periods of time
• Single‐cycle enable signals for counters
L
Level to
Pulse P
Converter
CLK
Whenever input L goes from
low to high...
9/26/2018 6.111 Fall 2018 4
...output P produces a single
pulse, one clock period wide.
5. Finite State Machines
• Finite State Machines (FSMs) are a useful abstraction for
sequential circuits with centralized “states” of operation
• At each clock edge, combinational logic computes outputs
and next state as a function of inputs and present state
Combinational
Logic
Registers
Q D
CLK
inputs
+
present
state
outputs
+
next
state
n n
9/26/2018 6.111 Fall 2018 5
6. Two Types of FSMs
outputs
yk =fk(S)
inputs
x0...xn
Comb.
Logic
CLK
Registers
Comb.
Logic
D Q
n
present state S
n
Moore and Mealy FSMs : different output generation
•Moore FSM:
next
state
S+
inputs
x0...xn
•Mealy FSM:
S
Comb.
Logic
CLK
Comb.
Logic
D Q
Registers
S+
n
n
outputs
yk = fk(S,x0...xn)
9/26/2018 6.111 Fall 2018 6
direct combinational path!
7. Design Example: Level‐to‐Pulse
• A level‐to‐pulse converter produces a single‐
cycle pulse each time its input goes high.
• It’s a synchronous rising‐edge detector.
• Sample uses:
• Buttons and switches pressed by humans for
arbitrary periods of time
• Single‐cycle enable signals for counters
L
Level to
Pulse P
Converter
CLK
Whenever input L goes from
low to high...
9/26/2018 6.111 Fall 2018 7
...output P produces a single
pulse, one clock period wide.
8. 9/26/2018 6.111 Fall 2018 8
Reminder on the Synchronizer
• Stringing several (often two or three is sufficient)
registers in series is enough to isolate an
asynchronous input from sensitive downstream
logic and registers
9. Handling Metastability
• Preventing metastability turns out to be an impossible problem
• High gain of digital devices makes it likely that metastable
conditions will resolve themselves quickly
• Solution to metastability: allow time for signals to stabilize
D Q
Complicated
Sequential Logic
System
Clock
How many registers are necessary?
• Depends on many design parameters (clock speed, device speeds, …)
• In 6.111, a pair of synchronization registers is sufficient
D Q D Q
Can be
metastable right
after sampling
Very unlikely to be
metastable for >1
clock cycle
Extremely unlikely to be
metastable for >2 clock
cycles
9/26/2018 6.111 Lecture 4 9
10. Handling Metastability
• FF2 (D‐reg2) might go a clock cycle late, but it will
almost never* go metastable
“Metastability and Synchronizers: A Tutorial”
Ran Ginosar, Technion Israel Institute of Technology
9/26/2018 6.111 Lecture 4 1
0
*almost never generally means actually
almost never (once in ten years or something)
11. L=0
00
Low input,
Waiting for rise
P = 0
01
Edge Detected!
P = 1
L=1
L=0
L=0
L=1
•State transition diagram is a useful FSM representation and
design aid:
Step 1: State Transition Diagram
• Block diagram of desired system:
D Q
Level to
Pulse
FSM
L P
unsynchronized
user input
Synchronizer Edge Detector
This is the output that results from
this state. (Moore or Mealy?)
11
High input,
Waiting for fall
PP==00
Binary values of states
“if L=0 at the clock edge,
then stay in state 00.”
L=1
“if L=1 at the clock edge,
then jump to state 01.”
D Q
CLK
9/26/2018 6.111 Fall 2018 11
12. Valid State Transition Diagrams
11
High input,
Waiting for fall
P = 0
9/26/2018 6.111 Fall 2018 12
L=1
L=0
00
Low input,
Waiting for rise
P = 0
01
Edge Detected!
P = 1
L=1
L=0
L=0
L=1
• Arcs leaving a state are mutually exclusive, i.e., for any combination input
values there’s at most one applicable arc
• Arcs leaving a state are collectively exhaustive, i.e., for any combination of
input values there’s at least one applicable arc
• So for each state: for any combination of input values there’s exactly one
applicable arc
• Often a starting state is specified
• Each state specifies values for all outputs (Moore)
13. 9/26/2018 6.111 Fall 2018 13
Choosing State Representation
Choice #1: binary encoding
For N states, use ceil(log2N) bits to encode the state with each state
represented by a unique combination of the bits. Tradeoffs: most efficient
use of state registers, but requires more complicated combinational logic
to detect when in a particular state.
Choice #2: “one‐hot” encoding
For N states, use N bits to encode the state where the bit corresponding to
the current state is 1, all the others 0. Tradeoffs: more state registers, but
often much less combinational logic since state decoding is trivial.
14. Step 2: Logic Derivation
00
Low input,
Waiting for rise
P = 0
01
Edge Detected!
P = 1
L=0
11
High input,
Waiting for fall
P = 0
L=0
L=0 L=1
Current
State
In
Next
State
Out
S1 S0 L S +
1 S +
0
P
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 0 0 1
0 1 1 1 1 1
1 1 0 0 0 0
1 1 1 1 1 0
Transition diagram is readily converted to a state
transition table (just a truth table)
L=1 L=1
• Combinational logic may be derived using Karnaugh maps
0
1
0 0 0 X
0 1 1 X
0
1
0 0 0 X
1 1 1 X
S1S0
L 00 01 11 10
S1S0
L 00 01 11 10
1
for S +:
0
for S +:
0
1
0 X
1 0
S1
for P:
0 1
S0
Comb.
Logic
n
Registers
Comb.
Logic
D Q
S
n
CLK
S+
L P
1
S + =LS 0
0
S + =L
P = S1S0
9/26/2018 6.111 Fall 2018 14
15. Moore Level‐to‐Pulse Converter
Moore FSM circuit implementation of level‐to‐pulse converter:
outputs
yk =fk(S)
inputs
x0...xn
Comb.
Logic
CLK
Registers
Comb.
Logic
D Q
n
present state S
n
next
state
S+
D Q
1
S + =LS 0
0
S + =L
P = S1S0
P = S1S0
S0
1
CLK
0
S +
1
S +
L P
Q
D Q
S
Q
9/26/2018 6.111 Fall 2018 15
16. 1. When L=1 and S=0, this output is
asserted immediately and until the state
transition occurs (or L changes).
2. While in state S=1 and as long as L remains at 1, this
output is asserted until next clock.
L=1 | P=0
L=1 | P=1
0
Input is low
1
Input is high
L=0 | P=0
L=0 | P=0
Design of a Mealy Level‐to‐Pulse
S
• Since outputs are determined by state and inputs, Mealy FSMs
may need fewer states than Moore FSM implementations
Comb.
Logic Registers
Comb.
Logic
D Q
S+
n
CLK
n
direct combinational path!
L
State
P
Clock
Output transitions immediately.
State transitions at the clock edge.
1
2
9/26/2018 6.111 Fall 2018 16
17. Mealy Level‐to‐Pulse Converter
Pres.
State
In
Next
State
Out
S L S+ P
0
0
0
1
0
1
0
1
1
1
1
0
1
0
0
0
D Q
S
CLK
S+
Mealy FSM circuit implementation of level‐to‐pulse converter:
P
L
Q
S
• FSM’s state simply remembers the previous value of L
• Circuit benefits from the Mealy FSM’s implicit single‐cycle assertion
of outputs during state transitions
0
Input is low
9/26/2018 6.111 Fall 2018 17
1
Input is high
L=1 | P=1
L=0 | P=0
L=1 | P=0
L=0 | P=0
18. Moore/Mealy Trade‐Offs
• How are they different?
• Moore: outputs = f( state ) only
• Mealy outputs = f( state and input )
• Mealy outputs generally occur one cycle earlier than a Moore:
Moore: delayed assertion of P Mealy: immediate assertion of P
L L
P P
Clock Clock
State[0] State
• Compared to a Moore FSM, a Mealy FSM might...
– Be more difficult to conceptualize and design
– Have fewer states
9/26/2018 6.111 Fall 2018 18
19. • Moore:
• Usually more states
• Each state has a particular output
• Mealy:
• Fewer states, outputs are specified on edges of diagram
• Potential Dangers:
Moore/Mealy Trade‐Offs
Really‐long combinatorial paths!
Possible cyclic logic paths
Combinatorial logic driving itself
asynchronously through really
hard‐to‐debug pathways!
9/26/2018 6.111 Fall 2018 19
20. 9/26/2018 45
Where should CLK come from?
• Option 1: external crystal
• Stable, known frequency, typically 50% duty cycle
• Option 2: internal signals
• Option 2A: output of combinational logic
• No! If inputs to logic change, output may make several transitions
before settling to final value several rising edges, not just one!
Hard to design away output glitches…
• Option 2B: output of a register
• Okay, but timing of CLK2 won’t line up with CLK1
D Q
CLK1
CLK2
CLK1
21. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 21
Building Logic with ROMs
Use ROM as lookup table containing truth table
– n inputs, k outputs requires 2n words x k bits
– Changing function is easy – reprogram ROM
Finite State Machine
– n inputs, k outputs, s bits of state
– Build with 2n+s x (k+s) bit ROM and (k+s) bit reg
n
inputs
2
n
wordlines
ROM Array
k outputs
DEC
ROM
inputs outputs
state
n k
s
k
s
22. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 22
Example: RoboAnt
Let’s build an Ant
Sensors: Antennae
(L,R) – 1 when in contact
Actuators: Legs
Forward step F
Ten degree turns TL, TR
Goal: make our ant smart enough to
get out of a maze
Strategy: keep right antenna on wall
(RoboAnt adapted from MIT 6.004 2002 OpenCourseWare by Ward and Terman)
L R
23. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 23
Lost in space
Action: go forward until we hit something
– Initial state
24. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 24
Bonk!!!
Action: turn left (rotate counterclockwise)
– Until we don’t touch anymore
25. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 25
A little to the right
Action: step forward and turn right a little
– Looking for wall
26. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 26
Then a little to the left
Action: step and turn left a little, until not touching
27. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 27
Whoops – a corner!
Action: step and turn right until hitting next wall
28. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 28
Simplification
Merge equivalent states where possible
29. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 29
State Transition Table
S1:0 L R S1:0’ TR TL F
00 0 0 00 0 0 1
00 1 X 01 0 0 1
00 0 1 01 0 0 1
01 1 X 01 0 1 0
01 0 1 01 0 1 0
01 0 0 10 0 1 0
10 X 0 10 1 0 1
10 X 1 11 1 0 1
11 1 X 01 0 1 1
11 0 0 10 0 1 1
11 0 1 11 0 1 1
Lost
RCCW
Wall1
Wall2
30. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 30
ROM Implementation
16-word x 5 bit ROM
ROM
L, R
S1:0
TL, TR, F
S'1:0
S1
' S0
' TR'TL' F'
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
4:16
DEC
S1 S0 L R
31. CMOS VLSI Design
CMOS VLSI Design 4th Ed.
20: CAMs, ROMs, and PLAs 31
ROM Implementation
16-word x 5 bit ROM
ROM
L, R
S1:0
TL, TR, F
S'1:0
S1
' S0
' TR'TL' F'
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
4:16
DEC
S1 S0 L R