Phase 2 -- Logic Implementation & Simulation Switching & Logic Design Project.

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

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Lecture #24 Page 1 EE 367 – Logic Design Lecture #24 Agenda 1.State Machines Review Announcements 1.n/a.
Simulation executable (simv)
Synchronous Sequential Logic
Combinational Logic.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Give qualifications of instructors: DAP
L18 – VHDL for other counters and controllers. Other counters  More examples Gray Code counter Controlled counters  Up down counter  Ref: text Unit.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Digital System Design by Verilog University of Maryland ENEE408C.
Dr. Turki F. Al-Somani VHDL synthesis and simulation – Part 3 Microcomputer Systems Design (Embedded Systems)
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
Package with 4-valued logic Signal Attributes Assertion Data Flow description.
Overview Logistics Last lecture Today HW5 due today
Introduction to Counter in VHDL
Introduction to VHDL (part 2)
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
Logic Synthesis assign z=a&b a b z What is Synthesis synthesis /sinth siss/ noun ( pl. syntheses /sinth seez/) 1 the combination of components to form.
VHDL Introduction. V- VHSIC Very High Speed Integrated Circuit H- Hardware D- Description L- Language.
VHDL IE- CSE. What do you understand by VHDL??  VHDL stands for VHSIC (Very High Speed Integrated Circuits) Hardware Description Language.
Copyright © 1997 Altera Corporation & 提供 What is VHDL Very high speed integrated Hardware Description Language (VHDL) –is.
ENG241 Digital Design Week #8 Registers and Counters.
Logic Synthesis assign z=a&b a b z What is Synthesis synthesis /sinth siss/ noun ( pl. syntheses /sinth seez/) 1 the combination of components to form.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
Lecture 7 Chap 9: Registers Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
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.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Introduction to ASIC flow and Verilog HDL
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.
03/31/031 ECE 551: Digital System Design & Synthesis Lecture Set 8 8.1: Miscellaneous Synthesis (In separate file) 8.2: Sequential Synthesis.
Logic Synthesis assign z=a&b a b z What is Synthesis synthesis /sinth siss/ noun ( pl. syntheses /sinth seez/) 1 the combination of components to form.
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.
Lecture #12 Page 1 ECE 4110– Digital Logic Design Lecture #12 Agenda 1.VHDL : Behavioral Design (Processes) Announcements 1.n/a.
Overview Logistics Last lecture Today HW5 due today
Sequential statements (1) process
ECE 4110–5110 Digital System Design
Introduction To VHDL 홍 원 의.
Supplement on Verilog FF circuit examples
Class Exercise 1B.
Week #7 Sequential Circuits (Part B)
Registers and Counters
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
Part II A workshop by Dr. Junaid Ahmed Zubairi
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Part III A workshop by Dr. Junaid Ahmed Zubairi
In processes and concurrent statements
ECE 434 Advanced Digital System L08
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
Hardware Description Languages
Synthesis مرتضي صاحب الزماني.
332:437 Lecture 8 Verilog and Finite State Machines
14 Digital Systems.
ECE 551: Digital System Design & Synthesis
332:437 Lecture 8 Verilog and Finite State Machines
Sequntial-Circuit Building Blocks
System Controller Approach
(Sequential-Circuit Building Blocks)
Presentation transcript:

Phase 2 -- Logic Implementation & Simulation Switching & Logic Design Project

Overview Logic Implementation Translation of Controller to VHDL Translation of Dataflow to BDF Simulation Controller Dataflow Controller/Dataflow together

Rule 3 of Design All designs must have a controller! And it must be a non-trivial controller (3 or more states). No excepts permitted.

Translation of Controller to VHDL State Assignments Compact NFLIP-FLOP=Log 10 NumState/Log 10 2 One-Hot NFLIP-FLOP= NumStates Add comments w/ Title, Group, Date, & Description Use enumerated and state names (see handout) Use CASE statement with embedded IF statements Use Moore Outputs

Translation of Controller to VHDL Use a single process design Place Wait-UNTIL or IF statement with clock at top of process WAIT UNTIL (clkevent AND clk = 1); IF(clkevent AND clk = 1) THEN …. END IF;

Warning! Every IF statement must have an ELSE statement even if there are ELSIF statements. It is better to specify controller outputs using the conditional assignment statement, then a CASE statement in a process. Do not write statements that lead to implied latches. That is, make sure that values for all outputs are specified at all times so VHDL does not assume that the present output is the previous output.

Warning! Remember that the VHDL programs the logic gates in the MAX part that is running in parallel or concurrent. All signals that are read in a process have to be listed in the sensitivity list, except for the "clock"-process, that is used for implementing registers. In this case, the inputs for the registers should be omitted. Use parentheses in complex expressions in order to avoid ambiguities.

Warning! Use one processes for a state machine. Put outputs in conditional assignment statements. All synchronous components must use the same global clock. No ripple clocks allowed. Every VHDL module must have a header specifying title, designers, date, and short description.

Warning! Dont assign initial values to signals and variables. All warnings are bad and good designs have no warnings present.

Add comments --Title: Blackjack Controller --Designer: Dr. James Grover --Date: April Description: Controller for Blackjack game. This design --example was based on C.R. Clare's design in Designing Logic --Systems Using State Machines (McGraw Hill, 1972). The blackjack --machine plays the dealer's hand, using typical dealer strategies --to decide whether to draw another card (hit) or stand after --each round The example contains the following logic designs: A State Machine that controls the game logic which include: -- (a) checking the status of the card reader. -- (c) making the decision of what action to take for a hit, -- stand or bust. An example is to draw a card if the -- hit signal is true. -- (b) making the decision of when to use the value 1 or for an ace card adds the value of the drawn card A Binary-to-BCD converter for converting the 5-bit -- binary score and converts it to 2-digit BCD for the -- digital display.

State as Enumerated Types ARCHITECTURE Behavioral OF Controller IS TYPE STATE_TYPE IS (sClear,sShowHit,…) SIGNAL State : STATE_TYPE; SIGNAL Ace, NextAce : BIT; BEGIN

Use Case statements with If Statements FSMLOGIC: PROCESS (Reset,CardIn,IsAce,Ace,CardOut,Hit,Bust,State) BEGIN WAIT UNTIL (CLKEVENT AND CLK = 1); CASE State IS WHEN sClear =>--Reset State NextAce <= '0'; IF Reset = '1' THEN State <= sClear; ELSE State <= sShowHit; END IF;..... END CASE; END PROCESS FSMLOGIC;

Moore Outputs OUTPUT02: WITH State SELECT Sel<="11"WHENAddCard, "10"WHENAdd10, "01"WHENSub10, "00"WHENOTHERS;

Dataflow With Title

Random Logic ENTITY Bin2BCD IS PORT ( Tally: ININTEGER Range 0 to 31; MSD,LSD: OUTBIT_VECTOR(3 DOWNTO 0)); END Bin2BCD;

Random Logic ARCHITECTURE behavioral OF Bin2BCD IS BEGIN Combo01: WITH Tally SELECT LSD<="0000" WHEN0, "0001" WHEN1, "0010" WHEN2, "0011" WHEN3,..... "0001"WHEN31;... END Behavioral;

Registers and Adder Tally

Combinational Logic & Display Tally

Dataflow/Controller

Cascade Counters Use Cnt Enable nor Clk Enable Use common clock Use SCLR (synchronous clear)

Cooking Timer Consider LPM_COUNTER LPM_DECODE LPM_MUX Hex7Seg Random Logic

UART (Rx) LPM_SHIFTREG LPM_COUNTER LPM_XOR (for parity if included) Random Logic

RC Servo and Stepper Motor LPM_COUNTER LPM_COMPARE LPM_CONSTANT LPM_FF for register Random Logic LPM_ADD_SUB for RC Servo

3-Man Rush LPM_COUNTER (binary or modulo counter) LPM_SHIFTREG for PRSG (shift register) LPM_CLSHIFT (barrel shifter) Random Logic Hex7Seg

Thermometer LPM_REG to hold data between Reads Configure counter as decade or BCD counters BCD

Simulation Simulate scenario that leads to success Simulate scenario that leads to fault condition (non success) Simulate scenario suggested by laboratory assistant or instructor Simulate and verify simulation

Problems in the past Timer without state diagram Digit select on timer display stopped in some states Did not use three folder/project design One folder & project for controller One folder & project for dataflow One folder & project for dataflow & controller combination

Problems in the past Did not include LPMs in project Each counter with different modulo requires new LPM_COUNTER not just new instance of LPM_COUNTER. Not using common clock causes ripple counter glitches in logic

Implementation Weeks