Controllers ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr. Filip Cuckov.

Slides:



Advertisements
Similar presentations
Arbitrary Waveform Discussion 5.5 Example 34.
Advertisements

Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
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.
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.
Finite State Machines Discussion D7.1 Mealy and Moore Machines.
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.
Algorithmic State Machine (ASM) Charts
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
SM Charts and Microprogramming
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
Lecture #5 In this lecture we will introduce the sequential circuits.
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
Dr. H.v.d.Biggelaar / Mar3-Ver2 / 1 Engineering Technology Dr. H.v.d.Biggelaar March 22, 2000 State Machines in VHDL.
1 Part V: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
UART ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
VHDL – Dataflow and Structural Modeling and Testbenches ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering.
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
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.
1 ECE 545—Digital System Design with VHDL Lecture 6 Behavioral VHDL Coding (for Synthesis): Finite State Machines and ASMs 9/30/08.
ENG241 Digital Design Week #8 Registers and Counters.
Main Project : Simple Processor Mini-Project : 3-bit binary counter (using 7400 series) Memory By Oluwayomi B. Adamo.
VHDL Discussion Finite State Machines
VHDL for Finite State Machines. Sorry – no standard way One way –Use TYPE and SIGNAL ARCHITECTURE Behavior OF two_ones_fsm IS TYPE State_type IS ( A,
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
VHDL – Behavioral Modeling and Registered Elements ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
Data Storage VHDL ET062G & ET063G Lecture 4 Najeem Lawal 2012.
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.
Algorithmic State Machines Sorting Signed & Unsigned Data Types
Hao Zheng Comp Sci & Eng USF CDA 4253 FPGA System Design Chapter 5 Finite State Machines.
ECE DIGITAL LOGIC LECTURE 20: REGISTERS AND COUNTERS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/19/2015.
ECE DIGITAL LOGIC LECTURE 21: FINITE STATE MACHINE Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 11/24/2015.
Digital Design with SM Charts
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
Sequential statements (1) process
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
Finite State Machines (part 1)
Main Project : Simple Processor Mini-Project : Vending Machine Memory
Controllers for Keccak_F and AES Advanced Coding Style for Datapaths
Registers and Counters
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
Part III: SYSTEM DESIGN
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Part IV: VHDL CODING.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
VHDL (VHSIC Hardware Description Language)
ECE 448 Lecture 13 Multipliers Timing Parameters
A Greatest Common Divisor (GCD) Processor
Lecture #5 In this lecture we will introduce the sequential circuits.
Figure 8.1. The general form of a sequential circuit.
Finite State Machines (part 1)
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.
EEL4712 Digital Design (Midterm 1 Review).
Presentation transcript:

Controllers ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr. Filip Cuckov

Overview 1.Algorithmic State Machines 2.Microprogrammed Controllers

1. Algorithmic State Machines (ASM)

ASM – Parallel vs. Serial Form =

ASM Examples ==

Finite State Machine (FSM) to ASM

Shift and Add Multiplier Example (Algorithm)

Shift and Add Multiplier Example (FSM)

Shift and Add Multiplier Example (Counter)

Shift and Add Multiplier Example (ASM)

Shift and Add Multiplier Example (VHDL)

State Machine Factorization using Inter-Process Communication

State Machine VHDL Formalism VHDL implementation must include at least 3 processes: 1.State Register (CLK) 2.NS Calc. (PS, Inputs) 3.Outputs Calculation Moore Outputs (PS) Mealy Outputs (PS, Inputs) Fourth Process for Sync. Mealy 4. Output Register (CLK)

Moore-Type Machine VHDL Implementation library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity MooreSM is generic(N : integer := 3); port( clk, rst : in std_logic; inputs : in std_logic_vector(N downto 0); outputs : out std_logic_vector(N downto 0) ); end entity MooreSM; architecture Behavioral of MooreSM is type state_type is (Start, State1, State2); signal PS, NS : state_type; begin State_Reg : process(clk, rst) is begin if rst = '1' then PS <= Start; elsif clk'event and clk = '1' then PS <= NS; end if; end process State_Reg; NS_Calc : process(PS, inputs) is begin case PS is when Start => NS <= State1; when State1 => if inputs = "0110" then NS <= State2; else NS <= State1; end if; when State2 => NS <= Start; end case; end process NS_Calc; Moore_out : process(PS) is begin case PS is when Start => outputs <= "0000"; when State1 => outputs <= "0110"; when State2 => outputs <= "1001"; end case; end process Moore_out; end architecture Behavioral;

Mealy-Type Machine VHDL Implementation library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity MealySM is port( clk, rst : in std_logic; A_i, B_i : in std_logic; Y_o, Z_o : out std_logic ); end entity MealySM; architecture Behavioral of MealySM is signal PS, NS : integer range 0 to 2; begin State_Reg : process(rst, clk) is begin if rst = '1' then PS <= 0; elsif rising_edge(clk) then PS <= NS; end if; end process State_Reg; NS_calc : process(PS, A_i, B_i) is begin case PS is when 0 => NS <= 1; when 1 => if (A_i and B_i) = '1' then NS <= 1; else NS <= 2; end if; when 2 => NS <= 0; end case; end process NS_calc; Mealy_out : process(PS, A_i, B_i) is begin Y_o <= '0'; Z_o <= '0'; case PS is when 0 => null; when 1 => if (A_i and B_i) = '1' then Y_o <= '1'; else Z_o <= '1'; end if; when 2 => null; end case; end process Mealy_out; end architecture Behavioral;

2. Microprogrammed Controllers Single Qualifier – Dual Transition Meaning only one Boolean check per state is allowed. Still Single Qualifier – Dual Transition, but NSF assumed to be next in sequence in ROM

Microprogrammed Controllers ASM Adjust Mealy to Moore Simplification

Microprogrammed Controllers