Part II A workshop by Dr. Junaid Ahmed Zubairi

Slides:



Advertisements
Similar presentations
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
Advertisements

Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Logic Design Fundamentals - 3 Discussion D3.2. Logic Design Fundamentals - 3 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
Simple Sequential Circuits in VHDL. Contents Sequential circuit examples: - SR latch in dataflow style - D flip-flop in behavioral style - shift register.
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.
Introduction to VHDL Multiplexers. Introduction to VHDL VHDL is an acronym for VHSIC (Very High Speed Integrated Circuit) Hardware Description Language.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
Introduction to VHDL (part 2)
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #17 – Introduction.
ELEC / Computer Architecture and Design Fall 2009 ELEC / Computer Architecture and Design Fall 2009 Modeling for Synthesis.
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.
VHDL for Combinational Circuits. VHDL We Know Simple assignment statements –f
ECE 331 – Digital System Design Multiplexers and Demultiplexers (Lecture #13)
15-Dec-15EE5141 Chapter 4 Sequential Statements ä Variable assignment statement ä Signal assignment statement ä If statement ä Case statement ä Loop statement.
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
CS/EE 3700 : Fundamentals of Digital System Design
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
VHDL 7: use of signals v.5a1 VHDL 7 Use of signals In processes and concurrent statements.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Data Flow and Behavioral Modeling in VHDL 1 MS EMBEDDED SYSTEMS.
Registers and Counters Discussion D8.1. Logic Design Fundamentals - 3 Registers Counters Shift Registers.
Algorithmic State Machine (ASM) Charts: VHDL Code & Timing Diagrams
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
Overview Logistics Last lecture Today HW5 due today
Sequential statements (1) process
Combinational logic circuit
LAB #6 Sequential Logic Design (Flip Flops, Shift Registers)
Describing Combinational Logic Using Processes
Registers and Counters
Figure 7.1 Control of an alarm system
B e h a v i o r a l to R T L Coding
Hardware Description Languages
Dataflow Style Combinational Design with VHDL
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Part IV: VHDL CODING.
Part III A workshop by Dr. Junaid Ahmed Zubairi
Combinational Circuits Using VHDL
In processes and concurrent statements
Sequential-Circuit Building Blocks
UNIT 2: Data Flow description
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Modeling of Combinational Logic
VHDL (VHSIC Hardware Description Language)
VHDL Structural Architecture
ECE 448 Lecture 13 Multipliers Timing Parameters
Concurrent vs Sequential
CPE 528: Lecture #5 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
Behavioral Modeling of Sequential-Circuit Building Blocks
Sequntial-Circuit Building Blocks
Modeling of Circuits with a Regular Structure
Figure 8.1. The general form of a sequential circuit.
Modeling of Circuits with a Regular Structure
Modeling of Circuits with Regular Structure
CprE / ComS 583 Reconfigurable Computing
Sequntial-Circuit Building Blocks
Digital Logic with VHDL
(Sequential-Circuit Building Blocks)
Presentation transcript:

Part II A workshop by Dr. Junaid Ahmed Zubairi VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi

Workshop References VHDL by Amos Zaslavsky (http://www.pet.ac.il ) Fundamentals of Digital Design by Brown and Vranesic, McGraw Hill Altera Training Modules

Outline Some Example Designs Generate Statements Example Project Shift Operations

Some Example Designs A multiplexer is a circuit that has several inputs and only one output line One of the inputs is selected using selection lines for onward connection with the output In VHDL, multiplexers can be achieved using conditional assignment statements

A 4-to-1 Multiplexer library ieee; use ieee.std_logic_1164.all; entity mux4to1 is port (Sel:in std_logic_vector(0 to 1); A:in std_logic_vector(0 to 3); Y:out std_logic); end mux4to1; architecture mux1 of mux4to1 is begin Y <= A(0) when Sel = ’00’ else A(1) when Sel = ’01’ else A(2) when Sel = ’10’ else A(3) when others; end mux1;

An 8-Bit Register With Asynchronous Reset library ieee; use ieee.std_logic_1164.all; entity reg8 is port (D:in std_logic_vector(7 downto 0); reset,clk:in std_logic; Q:out std_logic_vector(7 downto 0)); end reg8; architecture myreg of reg8 is begin process(reset,clk) if reset= '0' then Q<= "00000000"; elsif clk'event and clk='1' then Q<=D; end if; end process; end myreg;

Generate Statements You can generate several components using for..generate statements in VHDL For example, derive a 16-to-1 Multiplexer from the given 4-to-1 Multiplexer The source code is given

Generate Statements library ieee; use ieee.std_logic_1164.all; entity mux16to1 is port (Sel:in std_logic_vector(0 to 3); A:in std_logic_vector(0 to 15); Y:out std_logic); end mux16to1; architecture mux2 of mux16to1 is Begin Signal m:std_logic_vector(0 to 3); Component mux4to1 is Port (Sel:in std_logic_vector(0 to 1); A:in std_logic_vector(0 to 3); Y:out std_logic); end component;

Generate Statement Begin G1: for I in 0 to 3 generate Muxes: mux4to1 port map (Sel(0 to 1), A(4*i to 4*i+3), m(i)); End generate; Mux5: mux4to1 port map (Sel(2 to 3), m(0 to 3), Y); End structure;

Example Design Project Using the 4-bit comparator designed earlier, develop a circuit that contains a comparator and a 4-bit register. The register will be loaded with a 4-bit number with the rising edge of the clock. Another four bit number will be applied directly to the other input of the comparator. Show the results

Shift Operations Do not use built in shift operations. It is preferable to slice and catenate For example Reg(15 downto 0) can be shifted as: Reg(14 downto 0) & Reg(15)

3 Types of Circuits

Switch~Case VHDL Style Expression 1 when bool-cond1 else Expression 2 when bool-cond2 else Expression 3 when bool-cond3 else Default-expression;

Inferred Logic

Another Style With Expression select A <= Expression1 when value0; Expression2 when value1 to value2; Expression3 when value3|value4; Expression4 when others;

Inferred Logic

Assignment Types

Process Rules Conditional and selected assignments are NOT allowed You may use case, if statements and nested if’s Do not use Wait statements Use only static for loops

Be Careful

Sensitivity List Include all RHS side signals of assignment statements Include all signals in conditions (if and case) Otherwise you produce sick hardware with wrong feedback paths Do not include EXTRA redundant inputs to the list

Unintended Latches

Results

How to avoid Parasites Assign a value to all outputs in ALL cases There is a long way to do it and a short way to do it

Long Way

Short Way

Warning In Data flow architecture, multiple assignments result in contention Begin with default assignments when writing code for case statements