SM Charts and Microprogramming

Slides:



Advertisements
Similar presentations
Sequential Design ELEC 311 Digital Logic and Circuits Dr. Ron Hayne
Advertisements

Floating-Point Arithmetic ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
History TTL-logic PAL (Programmable Array Logic)
Arbitrary Waveform Discussion 5.5 Example 34.
Generic Multiplexers: Parameters Discussion D2.5 Example 8.
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Integer Square Root.
6/27/20061 Sequence Detectors Lecture Notes – Lab 5 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
FPGAs and VHDL Lecture L12.1. FPGAs and VHDL Field Programmable Gate Arrays (FPGAs) VHDL –2 x 1 MUX –4 x 1 MUX –An Adder –Binary-to-BCD Converter –A Register.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Sequencing and Control Mano and Kime Sections 8-1 – 8-7.
Finite State Machines Discussion D8.1 Example 36.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Random-Access Memory Distributed and Block RAM Discussion D10.3 Example 41.
ECE 448: Lab 4 FIR Filters.
Designing with FPGAs ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
System Arch 2008 (Fire Tom Wada) /10/9 Field Programmable Gate Array.
UART ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
Sequential Arithmetic ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
Finite State Machines VHDL ET062G & ET063G Lecture 6 Najeem Lawal 2012.
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
CprE / ComS 583 Reconfigurable Computing
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
George Mason University Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts ECE 545 Lecture 14.
1 ECE 545—Digital System Design with VHDL Lecture 6 Behavioral VHDL Coding (for Synthesis): Finite State Machines and ASMs 9/30/08.
EE3A1 Computer Hardware and Digital Design Lecture 5 Testbenches and Memories in VHDL.
George Mason University Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code ECE 448 Lecture 6.
Design Examples ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
CS/EE 3700 : Fundamentals of Digital System Design
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
George Mason University Controllers for Keccak_F and AES ECE 545 Lecture 11 Addendum.
Controllers ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr. Filip Cuckov.
VHDL for Sequential Logic
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
Introduction ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Sept. 2005EE37E Adv. Digital Electronics Lesson 4 Synchronous Design Architectures: Control Unit Design (part three)
ECE DIGITAL LOGIC LECTURE 21: FINITE STATE MACHINE Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/24/2015.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Digital Design with SM Charts
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
Controllers for Keccak_F and AES Advanced Coding Style for Datapaths
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Combinational Circuits Using VHDL
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
Field Programmable Gate Array
Field Programmable Gate Array
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
ENG2410 Digital Design “Sequencing and Control Examples”
VHDL (VHSIC Hardware Description Language)
ECE 545 Lecture 12 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
Behavioral Modeling of Sequential-Circuit Building Blocks
Data Flow Description of Combinational-Circuit Building Blocks
ECE 448: Lab 4 FIR Filters.
Figure 8.1. The general form of a sequential circuit.
Data Flow Description of Combinational-Circuit Building Blocks
Modeling of Circuits with a Regular Structure
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Design of Networks for Arithmetic Operation
4-Input Gates VHDL for Loops
Presentation transcript:

SM Charts and Microprogramming ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering ELEC 418

State Machine Charts Equivalent State Graph SM Block Exactly One Transition True at Any Time Next State Uniquely Defined SM Block One Entrance Path One or More Exit Paths No Internal Feedback 418_05 ELEC 418

Example SM Block 418_05 ELEC 418

State Graph to SM Chart 418_05 ELEC 418

Add-and-Shift Multiplier 418_05 ELEC 418

Multiplier Control 418_05 ELEC 418

Multiplier Control entity Mult is port(CLK, St, K, M: in std_logic; Load, Sh, Ad, Done: out std_logic); end Mult; architecture SMbehave of Mult is signal State, Nextstate: integer range 0 to 3; begin process(St, K, M, State) Load <= '0'; Sh <= '0'; Ad <= '0'; Done <= '0'; 418_05 ELEC 418

Multiplier Control case State is when 0 => if St = '1' then Load <= '1'; Nextstate <= 1; else Nextstate <= 0; end if; 418_05 ELEC 418

Multiplier Control when 1 => if M = '1' then Ad <= '1'; Nextstate <= 2; else Sh <= '1'; if K = '1' then Nextstate <= 3; Nextstate <= 1; end if; 418_05 ELEC 418

Multiplier Control when 2 => Sh <= '1'; if K = '1' then Nextstate <= 3; else Nextstate <= 1; end if; when 3 => Done <= '1'; Nextstate <= 0; end case; end process; 418_05 ELEC 418

Multiplier Control process(CLK) begin if rising_edge(CLK) then State <= Nextstate; end if; end process; end SMbehave; 418_05 ELEC 418

Sequential Machine Mealy Moore Z = f (X, Q) Z = f (Q) (Q) 418_05 ELEC 418

FPGA Synthesis 418_05 ELEC 418

Microprogramming Hardwired Control Microprogram Control Implemented using gates and flip-flops Faster, less flexible, limited complexity Microprogram Control Control Store Memory storing control signals and next state info Controller sequences through memory Slower, more flexible, greater complexity 418_05 ELEC 418

Microprogram Controllers 418_05 ELEC 418

Implementing SM Charts Transformations for Microprogramming Eliminate conditional outputs Transform to a Moore machine Test only one input in each state Eliminate redundant states Same output and same next states 418_05 ELEC 418

Multiplier Control 418_05 ELEC 418

Modified Multiplier Control 418_05 ELEC 418

Two-Address Microcode 418_05 ELEC 418

Two-Address Microprogram 418_05 ELEC 418

Single-Address Microcode 418_05 ELEC 418

Single-Address Microprogram 418_05 ELEC 418

Summary SM Charts Microprogramming Equivalent State Graph Two-Address Microcode Single-Address Microcode 418_05 ELEC 418

Putting It All Together Add-and-Shift Multiplier Multiplier Control Counter SM Chart Two-Address Microcode Microprogram ROM VHDL Simulation FPGA Implementation ChipScope Pro 418_05 ELEC 418

Add-and-Shift Multiplier 418_05 ELEC 418

Multiplier Control 418_05 ELEC 418

Two-Address Microcode 418_05 ELEC 418

Two-Address Microprogram 418_05 ELEC 418

Look-Up Tables (ROM) architecture Table of Parity_Gen is type OutTable is array(0 to 15) of std_logic; signal ParityBit: std_logic; constant OT: OutTable := ('1','0','0','1','0','1','1','0', '0','1','1','0','1','0','0','1'); begin ParityBit <= OT(conv_integer(X)); Y <= X & ParityBit; end Table; 418_02 ELEC 418

Multiplexers entity MUX4to1 is port(I: in std_logic_vector(3 downto 0); S: in std_logic_vector(1 downto 0); F: out std_logic); end MUX4to1; architecture Dataflow of MUX4to1 is begin with S select F <= I(0) when "00", I(1) when "01", I(2) when "10", I(3) when "11"; end Dataflow; 418_05 ELEC 418

Multiplier VHDL Model library IEEE; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity mult4X4_micro is port(Clk, St: in std_logic; Mplier, Mcand: in std_logic_vector(3 downto 0); Product: out std_logic_vector(7 downto 0); Done: out std_logic); end mult4X4_micro; 418_05 ELEC 418

VHDL Model architecture microprogram of mult4X4_micro is type ROM is array(0 to 5) of std_logic_vector(11 downto 0); constant control_store: ROM := (X"010", X"D28", X"630", X"E44", X"952", X"C01"); signal ACC: std_logic_vector(8 downto 0); alias M: std_logic is ACC(0); signal Load, Ad, Sh, K: std_logic; signal counter: std_logic_vector(1 downto 0) := "00"; 418_05 ELEC 418

VHDL Model signal TMUX: std_logic; signal uAR: std_logic_vector(2 downto 0) := "000"; signal uIR: std_logic_vector(11 downto 0) := X”000”; alias TEST: std_logic_vector(1 downto 0) is uIR(11 downto 10); alias NSF: std_logic_vector(2 downto 0) is uIR(9 downto 7); alias NST: std_logic_vector(2 downto 0) is uIR(6 downto 4); 418_05 ELEC 418

VHDL Model begin Load <= uIR(3); Ad <= uIR(2); Sh <= uIR(1); Done <= uIR(0); Product <= ACC(7 downto 0); K <= '1' when counter = "11" else '0'; with TEST select TMUX <= St when "00", M when "01", K when "10", '1' when others; 418_05 ELEC 418

VHDL Model controller: process(Clk) begin if falling_edge(Clk) then uIR <= control_store(to_integer(uAR)); end if; if rising_edge(Clk) then if TMUX = '0' then uAR <= NSF; else uAR <= NST; if Sh = '1' then counter <= counter + 1; end if; end process; 418_05 ELEC 418

VHDL Model datapath: process(Clk) begin if rising_edge(Clk) then if Load = '1' then ACC(8 downto 4) <= "00000"; ACC(3 downto 0) <= Mplier; end if; if Ad = '1' then ACC(8 downto 4) <= '0' & ACC(7 downto 4) + Mcand; if Sh = '1' then ACC <= '0' & ACC(8 downto 1); end if; end process; end microprogram; 418_05 ELEC 418

VHDL Simulation 418_05 ELEC 418

FPGA ChipScope Pro 418_05 ELEC 418

Summary Add-and-Shift Multiplier Multiplier Control Counter SM Chart Two-Address Microcode Microprogram ROM VHDL Simulation FPGA Implementation ChipScope Pro 418_05 ELEC 418