VHDL Coding Exercise 4: FIR Filter. Where to start? AlgorithmArchitecture RTL- Block diagram VHDL-Code Designspace Exploration Feedback Optimization.

Slides:



Advertisements
Similar presentations
Programmable FIR Filter Design
Advertisements

Register Transfer Level
Architecture-dependent optimizations Functional units, delay slots and dependency analysis.
ECE Synthesis & Verification - Lecture 2 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits High-Level (Architectural)
High Level Languages: A Comparison By Joel Best. 2 Sources The Challenges of Synthesizing Hardware from C-Like Languages  by Stephen A. Edwards High-Level.
Give qualifications of instructors: DAP
Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
Logic Synthesis – 3 Optimization Ahmed Hemani Sources: Synopsys Documentation.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics High-level synthesis. Architectures for low power. GALS design.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
Kazi Spring 2008CSCI 6601 CSCI-660 Introduction to VLSI Design Khurram Kazi.
The Control Unit: Sequencing the Processor Control Unit: –provides control signals that activate the various microoperations in the datapath the select.
1 COMP541 Sequencing and Control Montek Singh Mar 29, 2007.
10/20/20081 Lab 6 – More State Machines. Multiple processes.
Mahapatra-Texas A&M-Fall'001 cosynthesis Introduction to cosynthesis Rabi Mahapatra CPSC498.
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.
Pipelining and Retiming 1 Pipelining  Adding registers along a path  split combinational logic into multiple cycles  increase clock rate  increase.
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.
1 EECS Components and Design Techniques for Digital Systems Lec 21 – RTL Design Optimization 11/16/2004 David Culler Electrical Engineering and Computer.
10/13/ Lab 6 - Algorithmic State Machines ECE238L 10/13/2009.
4/10/20081 Lab 9 RT methodology introduction Register operations Data Path Control Path ASM Example TA: Jorge Crichigno.
Lab 10 RT methodology (cont’d) Example 1 – a counter Example 2 – a repetitive-adder multiplier.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
9/15/09 - L25 Registers & Load Enable Copyright Joanne DeGroat, ECE, OSU1 Registers & Load Enable.
Maria-Cristina Marinescu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology A Synthesis Algorithm for Modular Design of.
FPGA-Based System Design: Chapter 4 Copyright  2004 Prentice Hall PTR HDL coding n Synthesis vs. simulation semantics n Syntax-directed translation n.
Registers CPE 49 RMUTI KOTAT.
Sub-expression elimination Logic expressions: –Performed by logic optimization. –Kernel-based methods. Arithmetic expressions: –Search isomorphic patterns.
Chap 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
George Mason University ECE 545 – Introduction to VHDL ECE 545 Lecture 5 Finite State Machines.
CprE / ComS 583 Reconfigurable Computing
Copyright © 1997 Altera Corporation & 提供 What is VHDL Very high speed integrated Hardware Description Language (VHDL) –is.
RTL Hardware Design by P. Chu Chapter Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics Basics of register-transfer design: –data paths and controllers; –ASM charts. Pipelining.
HYPER: An Interactive Synthesis Environment for Real Time Applications Introduction to High Level Synthesis EE690 Presentation Sanjeev Gunawardena March.
George Mason University Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code ECE 448 Lecture 6.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
11/17/2007DSD,USIT,GGSIPU1 RTL Systems References: 1.Introduction to Digital System by Milos Ercegovac,Tomas Lang, Jaime H. Moreno; wiley publisher 2.Digital.
ECE-C662 Lecture 2 Prawat Nagvajara
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
EKT 221 : Chapter 4 Computer Design Basics
VHDL Discussion Finite State Machines
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.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Basics of register-transfer design: –data paths and controllers; –ASM.
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
Reconfigurable Computing - Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound,
RTL Hardware Design by P. Chu Chapter 9 – ECE420 (CSUN) Mirzaei 1 Sequential Circuit Design: Practice Shahnam Mirzaei, PhD Spring 2016 California State.
1 강의노트 09 Logic Design with ASM Charts: Based on Digital Systems Design Using VHDL, Chapter 5, by Charles H. Roth, Jr.
Mohamed Younis CMCS 411, Computer Architecture 1 CMSC Computer Architecture Lecture 8 Hardware Design Languages February 21, 2001
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
HDL simulation and Synthesis (Marks16)
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
Lecture 27 Logistics Last lecture Today: HW8 due Friday
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Instructor: Alexander Stoytchev
Introduction to cosynthesis Rabi Mahapatra CSCE617
Lecture 27 Logistics Last lecture Today: HW8 due Friday
Lesson 4 Synchronous Design Architectures: Data Path and High-level Synthesis (part two) Sept EE37E Adv. Digital Electronics.
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
VHDL (VHSIC Hardware Description Language)
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.
Presentation transcript:

VHDL Coding Exercise 4: FIR Filter

Where to start? AlgorithmArchitecture RTL- Block diagram VHDL-Code Designspace Exploration Feedback Optimization

Algorithm High-Level System Diagram  Context of the design  Inputs and Outputs  Throughput/rates  Algorithmic requirements Algorithm Description  Mathematical Description  Performance Criteria  Accuracy  Optimization constraints  Implementation constraints  Area  Speed FIR

Architecture (1) Isomorphic Architecture:  Straight forward implementation of the algorithm

Architecture (2) Pipelining/Retiming:  Improve timing  Insert register(s) at the inputs or outputs  Increases Latency

Architecture (2) Pipelining/Retiming:  Improve timing  Insert register(s) at the inputs or outputs  Increases Latency  Perform Retiming:  Move registers through the logic without changing functionality Forward: Backwards:

Architecture (2) Pipelining/Retiming:  Improve timing  Insert register(s) at the inputs or outputs  Increases Latency  Perform Retiming:  Move registers through the logic without changing functionality Forward: Backwards:

Architecture (2) Pipelining/Retiming:  Improve timing  Insert register(s) at the inputs or outputs  Increases Latency  Perform Retiming:  Move registers through the logic without changing functionality Forward: Backwards:

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (3) Retiming and simple transformation:  Optimization  Reverse the adder chain  Perform Retiming

Architecture (4) More pipelining:  Add one pipelining stage to the retimed circuit  The longest path is given by the multiplier  Unbalanced: The delay from input to the first pipeline stage is much longer than the delay from the first to the second stage

Architecture (5) More pipelining:  Add one pipelining stage to the retimed circuit  Move the pipeline registers into the multiplier:  Paths between pipeline stages are balanced  Improved timing  Tclock = (Tadd + Tmult)/2 + Treg

Architecture (6) Iterative Decomposition:  Reuse Hardware  Identify regularity and reusable hardware components  Add control  multiplexers  storage elements  Control  Increases Cycles/Sample

RTL-Design Choose an architecture under the following constraints:  It meets ALL timing specifications/constraints:  Throughput  Latency  It consumes the smallest possible area  It requires the least possible amount of power Decide which additional functions are needed and how they can be implemented efficiently:  Storage of samples x(k) => MEMORY  Storage of coefficients b i => LUT  Address generators for MEMORY and LUT => COUNTERS  Control => FSM Iterative Decomposition

RTL-Design RTL Block-diagram:  Datapath FSM:  Interface protocols datapath control:

RTL-Design How it works:  IDLE  Wait for new sample

RTL-Design How it works:  IDLE  Wait for new sample  Store to input register

RTL-Design How it works:  IDLE  Wait for new sample  Store to input register  NEW DATA:  Store new sample to memory

RTL-Design How it works:  IDLE  Wait for new sample  Store to input register  NEW DATA:  Store new sample to memory  RUN: 

RTL-Design How it works:  IDLE  Wait for new sample  Store to input register  NEW DATA:  Store new sample to memory  RUN:   Store result to output register

RTL-Design How it works:  IDLE  Wait for new sample  Store to input register  NEW DATA:  Store new sample to memory  RUN:   Store result to output register  DATA OUT:  Output result

RTL-Design How it works:  IDLE  Wait for new sample  Store to input register  NEW DATA:  Store new sample to memory  RUN:   Store result to output register  DATA OUT:  Output result / Wait for ACK

RTL-Design How it works:  IDLE  Wait for new sample  Store to input register  NEW DATA:  Store new sample to memory  RUN:   Store result to output register  DATA OUT:  Output result / Wait for ACK  IDLE: …

Translation into VHDL Some basic VHDL building blocks:  Signal Assignments:  Outside a process:  Within a process (sequential execution): AxD YxD AxD YxD BxD Sequential execution The last assignment is kept when the process terminates AxD YxD BxD This is NOT allowed !!!

Translation into VHDL Some basic VHDL building blocks:  Multiplexer:  Conditional Statements: AxD BxDYxD SELxS CxD Default Assignment AxD BxD SelAxS CxD DxD OUTxD SelBxS STATExDP

Translation into VHDL Common mistakes with conditional statements:  Example: AxD ?? SelAxS BxD ?? OUTxD SelBxS STATExDP NO default assignment NO else statement ASSIGNING NOTHING TO A SIGNAL IS NOT A WAY TO KEEP ITS VALUE !!!!! => Use FlipFlops !!!

Translation into VHDL Some basic VHDL building blocks:  Register:  Register with ENABLE: DataREGxDNDataREGxDP DataREGxDNDataREGxDP DataREGxDN DataREGxDP

Translation into VHDL Common mistakes with sequential processes: DataREGxDNDataREGxDP CLKxCI DataRegENxS DataREGxDNDataREGxDP CLKxCI DataRegENxS DataREGxDNDataREGxDP 0 1 Can not be translated into hardware and is NOT allowed Clocks are NEVER generated within any logic Gated clocks are more complicated then this Avoid them !!!

Translation into VHDL Some basic rules:  Sequential processes (FlipFlops)  Only CLOCK and RESET in the sensitivity list  Logic signals are NEVER used as clock signals  Combinatorial processes  Multiple assignments to the same signal are ONLY possible within the same process => ONLY the last assignment is valid  Something must be assigned to each signal in any case OR There MUST be an ELSE for every IF statement More rules that help to avoid problems and surprises:  Use separate signals for the PRESENT state and the NEXT state of every FlipFlop in your design.  Use variables ONLY to store intermediate results or even avoid them whenever possible in an RTL design.

Translation into VHDL Write the ENTITY definition of your design to specify:  Inputs, Outputs and Generics

Translation into VHDL Describe the functional units in your block diagram one after another in the architecture section:

Translation into VHDL Describe the functional units in your block diagram one after another in the architecture section:

Translation into VHDL Describe the functional units in your block diagram one after another in the architecture section: Register with ENABLE

Translation into VHDL Describe the functional units in your block diagram one after another in the architecture section: Register with CLEAR

Translation into VHDL Describe the functional units in your block diagram one after another in the architecture section: Counter

Translation into VHDL Describe the functional units in your block diagram one after another in the architecture section:

Translation into VHDL The FSM is described with one sequential process and one combinatorial process

Translation into VHDL The FSM is described with one sequential process and one combinatorial process

Translation into VHDL The FSM is described with one sequential process and one combinatorial process

Translation into VHDL The FSM is described with one sequential process and one combinatorial process MEALY

Translation into VHDL The FSM is described with one sequential process and one combinatorial process

Translation into VHDL The FSM is described with one sequential process and one combinatorial process MEALY

Translation into VHDL The FSM is described with one sequential process and one combinatorial process MEALY

Translation into VHDL Complete and check the code:  Declare the signals and components  Check and complete the sensitivity lists of ALL combinatorial processes with ALL signals that are:  used as condition in any IF or CASE statement  being assigned to any other signal  used in any operation with any other signal  Check the sensitivity lists of ALL sequential processes that they  contain ONLY one global clock and one global async. reset signal  no other signals

Other Good Ideas Keep things simple Partition the design (Divide et Impera):  Example: Start processing the next sample, while the previous result is waiting in the output register:  Just add a FIFO to at the output of you filter Do NOT try to optimize each Gate or FlipFlop Do not try to save cycles if not necessary VHDL code  Is usually long and that is good !!  Is just a representation of your block diagram  Does not mind hierarchy