VHDL Mealy and Moore model

Slides:



Advertisements
Similar presentations
VHDL 5 FINITE STATE MACHINES (FSM) Some pictures are obtained from FPGA Express VHDL Reference Manual, it is accessible from the machines in the lab at.
Advertisements

Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Synchronous Sequential Logic
Fundamentals of Digital Signal Processing יהודה אפק, נתן אינטרטור אוניברסיטת תל אביב.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Logic Design Fundamentals - 3 Discussion D3.2. Logic Design Fundamentals - 3 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Registers VHDL Tutorial R. E. Haskell and D. M. Hanna T2: Sequential Logic Circuits.
Integer Square Root.
Simple Sequential Circuits in VHDL. Contents Sequential circuit examples: - SR latch in dataflow style - D flip-flop in behavioral style - shift register.
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.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
Finite State Machines Discussion D8.1 Example 36.
Latches and Flip-Flops Discussion D4.1 Appendix J.
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,
IC-UNICAMP MC 603/ Finite State Machines Mixed Style RTL Modeling Extraído da George Mason Univ. ECE 545 Lecture 5.
Introduction to VHDL (part 2)
Dr. H.v.d.Biggelaar / Mar3-Ver2 / 1 Engineering Technology Dr. H.v.d.Biggelaar March 22, 2000 State Machines in VHDL.
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.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
VHDL in 1h Martin Schöberl. AK: JVMHWVHDL2 VHDL /= C, Java,… Think in hardware All constructs run concurrent Different from software programming Forget.
Copyright © 1997 Altera Corporation & 提供 What is VHDL Very high speed integrated Hardware Description Language (VHDL) –is.
Lecture 7 Chap 9: Registers Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
VHDL Discussion Finite State Machines
Finite state machines Modelling FSM in VHDL. Types of automata (FSM) A sequential automaton has: –Inputs –States (a finite number of states) –Outputs.
1 Sequential Logic Lecture #9. Sequential Logic 2 강의순서  FlipFlop  Active-high Clock & asynchronous Clear  Active-low Clock & asynchronous Clear  Active-high.
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
ACANEL VHDL 의 이해와 실습 2000 년 1 학기 Computer Architecture (classes links)
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
Controllers ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr. Filip Cuckov.
State Machine & Timing Design
CDA 4253 FPGA System Design Sequential Circuit Building Blocks Hao Zheng Dept of Comp Sci & Eng USF.
1 Sequential Logic Lecture #7. 모바일컴퓨팅특강 2 강의순서 Latch FlipFlop Active-high Clock & asynchronous Clear Active-low Clock & asynchronous Clear Active-high.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
VHDL 7: use of signals v.5a1 VHDL 7 Use of signals In processes and concurrent statements.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
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.
Registers and Counters Discussion D8.1. Logic Design Fundamentals - 3 Registers Counters Shift Registers.
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)
Week #7 Sequential Circuits (Part B)
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
B e h a v i o r a l to R T L Coding
Part II A workshop by Dr. Junaid Ahmed Zubairi
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Custom Designed Integrated Circuits
VHDL 5 FINITE STATE MACHINES (FSM)
In processes and concurrent statements
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Synthesis مرتضي صاحب الزماني.
VHDL (VHSIC Hardware Description Language)
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.
Finite state machines Modelling FSM in VHDL.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Sequntial-Circuit Building Blocks
(Sequential-Circuit Building Blocks)
EEL4712 Digital Design (Midterm 1 Review).
Presentation transcript:

VHDL Mealy and Moore model 순차논리회로 (FSM) 의 종류 - Mealy 순차회로 : 회로의 출력이 현재상태와 현재입력에 의해 결정 Next State Logic (combinational) Current state Register (sequential) Inputs Outputs Current State Output Asynchronous reset

VHDL Mealy and Moore model Y=(A+B)x′ , A(t+1)=Ax + Bx, B(t+1)=A′x

VHDL Mealy and Moore model 순차논리회로 (FSM) 의 종류 - Moore 순차회로 : 회로의 출력이 현재상태에 의해서만 결정 Current State Next State Logic (combinational) Current state Register (sequential) Next State Inputs Asynchronous reset Output Logic (combinational) Outputs

VHDL Mealy and Moore model Y=AB, TA=Bx, TB=x

VHDL Mealy and Moore model 다음의 회로는 Mealy 인가 Moore 인가? (1) Input Reg. Logic input output (3) Logic Output Reg. input clock output (2) clock

VHDL Mealy and Moore model FSM 을 위한 VHDL 기술은 두 부분으로 나누어 진다. 1. A Combinatorial part – input signal이 바뀔 때 마다 동작한다. (Sensitivity list - input signals, state) comb : process (input_signals, state) ... if (input = ”01”) then a.output:= ..... a.next_state:= .... 2. A sequential part – Clock 이 바뀔 때 마다 동작한다. (Sensityivity list - only clock or clock, reset) seq : process(clk) If (clk’event) and (clk = ’1’) then... VHDL 구문

Current state Register (sequential) VHDL Mealy and Moore model Next State Logic (combinational) Current state Register (sequential) Inputs Outputs Current State Output 2개 (blue and red) 혹은 3개의 Process (red) 문으로 회로를 표현 가능

VHDL Mealy and Moore model FSM 을 위한 VHDL 기술 방법. - Process 문을 이용하여 Logic 및 Register의 동작을 표시 - State의 데이터 type는 열거형 (enumeration type) 사용 - 초기상태를 반드시 규정: reset conditions - next state로 의 전이(transition)은 case 문사용 - 입력 조건은 if~else 을 사용 모든 조건에 대하여 상태 출력을 할당 feedback 엔 signal 과 변수 모두 사용 가능

VHDL Mealy and Moore model Sequential description ARCHITECTURE behave OF d_register IS BEGIN PROCESS(clk) IF clk’EVENT AND (clk=‘1’) THEN q<=D; END IF; END PROCESS; END behave;

VHDL Mealy and Moore model CLK 의 표현 방법 1. IF 문을 이용한 CLK 의 표현 if SIGNAL’event and SIGNAL = ’1’ -- rising edge if NOT SIGNAL’stable and SIGNAL = ’1’ -- rising edge if SIGNAL’event and SIGNAL = ’0’ -- falling edge if NOT SIGNAL’stable and SIGNAL = ’0’ -- falling edge 2. Wait 문을 이용한 CLK 의 표현 wait until CLK = ’1’; -- rising edge triggered wait until CLK = ’0’;--falling edge triggered

VHDL Mealy and Moore model In general, the following guidelines apply when we describe the clock : Synchronous processes (processes that compute values only on clock edges) must be sensitive to the clock signal. Use wait-until or if. Asynchronous processes (processes that compute values on clock edges and when asynchronous conditions are TRUE) must be sensitive to the clock signal (if any), and to inputs that affect asynchronous behavior. Use “if” only.

VHDL Mealy and Moore model Mealy Machine Example 0/00 S0 S1 입력 : I 출력 : Y1, Y2 2 개의 process 문을 이용하여 표현 0/01 1/10 1/00

VHDL Mealy and Moore model Library ieee; Use ieee.std_logic_1164.all; ENTITY Meal IS PORT(clk : IN STD_LOGIC; reset : IN STD_LOGIC; I : IN STD_LOGIC; Y1, Y2 : OUT STD_LOGIC); END Meal; ARCHITECTURE a OF Meal IS TYPE STATE_TYPE IS (s0, s1); SIGNAL state: STATE_TYPE; BEGIN PROCESS (clk, reset) IF reset = '0' THEN state <= s0; ELSIF clk'EVENT AND clk = '1' THEN CASE state IS WHEN s0 => IF I='1' THEN state <= s1; ELSE state <= s0; END IF; WHEN others => IF I='0' THEN state <= s0; ELSE state <= s1; END CASE;

VHDL Mealy and Moore model END IF; END PROCESS; PROCESS(state, I) BEGIN if( state= s0 and I='1') then Y1 <='1'; else Y1 <='0'; end if; if( state= s1 and I='0') then Y2 <='1'; Y2 <='0'; END a;

VHDL Mealy and Moore model Moore Machine Example 입력 : I 출력 : Y(2:0) 2 개의 process 문을 이용하여 표현 S0 000 1 S1 010 1 1 S2 101

VHDL Mealy and Moore model Library ieee; Use ieee.std_logic_1164.all; ENTITY Moor IS PORT(clk : IN STD_LOGIC; reset : IN STD_LOGIC; I : IN STD_LOGIC; y : OUT STD_LOGIC_vector(2 downto 0)); END Moor; ARCHITECTURE a OF Moor IS TYPE STATE_TYPE IS (s0, s1,s2); SIGNAL state: STATE_TYPE; BEGIN PROCESS (clk, reset) IF reset = '0' THEN state <= s0; ELSIF clk'EVENT AND clk = '1' THEN CASE state IS WHEN s0 => IF I='1' THEN state <= s1; ELSE END IF;

VHDL Mealy and Moore model WHEN s1 => IF I='1' THEN state <= s2; ELSE state <= s1; END IF; WHEN others => state <= s0; END CASE; END PROCESS; PROCESS (state) BEGIN CASE state IS WHEN s0 => y <= "000"; WHEN s1 => y <= "010"; WHEN others => y <= "101"; END CASE; END PROCESS; END a;