FSM Implementations: TIE-50206 Logic Synthesis Arto Perttula Tampere University of Technology Fall 2017
FSM Implementations: TIE-50206 Logic Synthesis Arto Perttula Tampere University of Technology Fall 2017
FSM Implementations
TIE-50206 Logic Synthesis
Arto Perttula
Tampere University of Technology
Fall 2017
Moore
Acknowledgements
• Prof. Pong P. Chu provided ”official” slides for the book which is
gratefully acknowledged
– See also: http://academic.csuohio.edu/chu_p/
• Most slides were originally made by Ari Kulmala
– and other previous lecturers (Teemu Pitkänen, Konsta Punkka, Mikko
Alho, Erno Salminen…)
• M. Perkows, ECE 590. DIGITAL SYSTEM DESIGN USING
HARDARE DESCRIPTION LANGUAGES, Portland State University,
June 2008,
http://web.cecs.pdx.edu/~mperkows/CLASS_VHDL_99/June2008/
Arto Perttula 14.11.2017 2
in=x2
in=others
Next_track in=next in=pl in=others
Play x 2
y=z5 y=z3
in=x2
always Stop Play
y=z1 y=z2 in=-x2
in=st
in=others
Rewplay x 2
y=z4
Prev_track in=others
y=z6 in=prev
in=-x2
All the previous teachings are still valid and just the description style
changes
Moore 4
Mealy
FSM Implementation in VHDL
• General form:
– We define an own type for the state machine states
– ALWAYS use enumeration type for state machine states
• Synthesis software, e.g., Quartus II, does not recognize it otherwise
• Sometimes next state (NS) is separate VHDL signal but not always
Moore
Mealy 6
Coding Style: 1seg-Moore/Reg-Mealy
end if;
end process sync_all;
Registers for
output bits
1..0
# Info: [45144]: Extracted FSM in module work.traffic_light(rtl){generic map (n_colors_g => 3 yellow_length_g => 10)}, with
state variable = ctrl_r[1:0], async set/reset state(s) = 00 , number of states = 3.
# Info: [45144]: Preserving the original encoding in 3 state FSM# Info: [45144]: FSM: State encoding table.
# Info: [40000]: FSM: Index Literal Encoding
# Info: [40000]: FSM: 0 00 00 Note the different state
# Info: [40000]: FSM: 1 01 01
# Info: [40000]: FSM: 2 10 10 encoding
Multi-bit
registers
14.11.2017 19
Quite much unused resources...
Implementation Area And Frequency