Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi

Slides:



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

1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
VHDL Programming in CprE 381 Zhao Zhang CprE 381, Fall 2013 Iowa State University Last update: 9/15/2013.
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
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.
Sequential Statements Module F3.2. Sequential Statements Statements executed sequentially within a process If Statements Case Statements Loop Statements.
Topics of Lecture Configuration Test Bench Encapsulation Structural Decomposition.
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
ELEN 468 Lecture 191 ELEN 468 Advanced Logic Design Lecture 19 VHDL.
Topics of Lecture Structural Model Procedures Functions Overloading.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 3 Khurram Kazi Some of the slides were taken from K Gaj ’ s lecture slides from GMU ’ s VHDL.
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.
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.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
© Dr. Alaaeldin Amin 1 Behavioral Modeling in VHDL Dr. Alaaeldin Amin.
Introduction to VHDL (part 2)
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
VHDL Training ©1995 Cypress Semiconductor 1 Introduction  VHDL is used to:  document circuits  simulate circuits  synthesize design descriptions 
1 Part V: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Graduate Computer Architecture I VHDL Structure and Testing Michael Sorensen.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
CprE / ComS 583 Reconfigurable Computing
7/10/2007DSD,USIT,GGSIPU1 Basic concept of Sequential Design.
L16 – VHDL for State Machines with binary encoding.
2-Jun-16EE5141 Chapter 3 ä The concept of the signal ä Process concurrency ä Delta time ä Concurrent and sequential statements ä Process activation by.
Basic Concepts in VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
Copyright(c) 1996 W. B. Ligon III1 Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component.
VHDL Very High Speed Integrated Circuit Hardware Description Language Shiraz University of shiraz spring 2011.
Mixed Style RTL Modeling
Design Methodology Based on VHDL Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics VHDL register-transfer modeling: –basics using traffic light controller; –synthesis.
Discussed in class and on Fridays n FSMs (only synchronous, with asynchronous reset) –Moore –Mealy –Rabin-Scott n Generalized register: –With D FFs, –With.
Generate Statement A generate statement provides a mechanism for iterative or conditional elaboration of a portion of description. The iterative elaboration.
M. Balakrishnan Dept of Computer Science & Engg. I.I.T. Delhi
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.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
15-Dec-15EE5141 Chapter 4 Sequential Statements ä Variable assignment statement ä Signal assignment statement ä If statement ä Case statement ä Loop statement.
Advanced topics Lecture 7. Outline 7.1. Resolution functions 7.2. Guarded signals. Disconnection 7.3. GENERATE statement.
Finite state machines Modelling FSM in VHDL. Types of automata (FSM) A sequential automaton has: –Inputs –States (a finite number of states) –Outputs.
Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi
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.
Relational Operators Result is boolean: greater than (>) less than (=) less than or equal to (
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
EGRE 6311 LHO 04 - Subprograms, Packages, and Libraries EGRE 631 1/26/09.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #19 –VHDL.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
Sequential statements (1) process
Introduction To VHDL 홍 원 의.
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Some VHDL Details 10/8/08 ECE Lecture 8.
ECE 4110–5110 Digital System Design
Sequential Design.
Sequential Statements
VHDL (VHSIC Hardware Description Language)
Figure 8.1. The general form of a sequential circuit.
IAS 0600 Digital Systems Design
Design of Networks for Arithmetic Operation
Sequntial-Circuit Building Blocks
System Controller Approach
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
Digital Design with VHDL
Presentation transcript:

Digital Design with VHDL Presented by: Amir Masoud Gharehbaghi

Concurrent Statements Concurrent Signal Assignment Component Instantiation Statement Generate Statement Process Statement Block Statement Concurrent Procedure Call Statement Concurrent Assert Statement

Sequential Statements Signal Assignment Statement Variable Assignment Statement IF Statement Case Statement Loop Statement Wait Statement Procedure Call Statement

Sequential Statements (cont.) Next Statement Exit Statement Return Statement Assertion Statement Report Statement Null Statement

Serial to Parallel (Entity) ENTITY s2p IS GENERIC (bps: INTEGER); PORT (s_in, rec : IN BIT; d_ready: BUFFER BIT; overrun, f_error: OUT BIT; p_out: OUT BIT_VECTOR(7 DOWNTO 0)); END s2p;

Serial to Parallel ARCHITECTURE w OF s2p IS BEGIN collect: PROCESS VARIABLE buff: BIT_VECTOR(7 DOWNTO 0); CONSTANT half: TIME :=( /REAL(bps))/2.0*1 US; CONSTANT full: TIME :=( /REAL(bps))/2.0*1 US; BEGIN WAIT UNTIL serial = ‘ 0 ’ ; WAIT FOR half; FOR count IN 0 TO 7 LOOP WAIT FOR full; buff(count) := serail; END LOOP;

Serial to Parallel IF serial = ‘ 0 ’ THEN f_error <= ‘ 1 ’ ; WAIT UNTIL serial = ‘ 1 ’ ; ELSE f_errro <= ‘ 0 ’ ; d_ready <= ‘ 1 ’ ; p_out <= buff; WAIT UNTIL rec = ‘ 1 ’ ; WAIT UNTIL rec = ‘ 0 ’ ; d_ready <= ‘ 0 ’ ; END IF; END PROCESS;

Serial to Parallel too_fast: PROCESS BEGIN IF d_ready = ‘ 1 ’ THEN WAIT UNTIL serial = ‘ 0 ’ ; IF d_ready = ‘ 1 ’ THEN overrun <= ‘ 1 ’ ; END IF; ELSE overrun <= ‘ 0 ’ ; END IF; WAIT ON d_ready; END PROCESS; END w;

Enumeration Type Declaration TYPE identifier IS (enumeration_literal {, enumeration_literal } ); enumeration_literal ::= identifier | character_literal

Moore FSM ENTITY moore IS PORT (x, clk: IN BIT; z: OUT BIT); END moore; ARCHITECTURE behavioral OF moore IS TYPE state IS (reset,got1,got10,got101,got1011); SIGNAL current : state := reset; BEGIN

Moore FSM (cont.) PROCESS BEGIN WAIT UNTIL clk = ‘ 1 ’ ; CASE current IS WHEN reset => IF x = ‘ 0 ’ THEN current <= got1; ELSE current <= reset; END IF; … END CASE; END PROCESS; z <= ‘ 1 ’ WHEN current = got1011 ELSE ‘ 0 ’ ; END behavioral;

Mealy FSM ARCHITECTURE behavioral OF mealy IS TYPE state IS (a, b, c); SIGNAL nxt, present : state := a; BEGIN -- of architecture PROCESS (clk) BEGIN IF (clk ’ EVENT AND clk = ‘ 1 ’ ) THEN present <= nxt; END IF; END PROCESS;

Mealy FSM (cont.) PROCESS (present, x) BEGIN z <= ‘ 0 ’ ; CASE present IS WHEN a => IF x = ‘ 0 ’ THEN nxt <= a ELSE nxt <= b; END IF; … END CASE; IF present = c AND x = ‘ 1 ’ THEN z <= ‘ 1 ’ ; END IF; END PROCESS; END behavioral ; -- of architecture

Array Type Declaration TYPE identifier IS ARRAY ( index {, index} ) OF element_subtype; Index ::= range | NATURAL RANGE <>

Array Type Example TYPE BIT_VECTOR IS ARRAY (NATURAL RANGE <>) OF BIT; TYPE two_dim_bit IS ARRAY (0 TO 7, 15 DOWNTO 0) OF BIT; TYPE byte_memory IS ARRAY (NATURAL RANGE <>) OF BIT_VECTOR (7 DOWNTO 0);

Signal of Array Type Example SIGNAL a: BIT_VECTOR(1 TO 16); SIGNAL b: two_dim_bit; SIGNAL c: byte_memory(0 TO 1023); … c(0) <= a(1 TO 8); a(1 TO 8) <= b(1,15)&b(1,14)&b(1,13)&b(1,12)&b(1,11)&b(1,10) &b(1,9)&b(1,8); c(0) <= a(5 TO 12);

Specifying Radix SIGNAL a: BIT_VECTOR(7 DOWNTO 0); SIGNAL b: INTEGER;.. aa <= " ", B"0111_0101" AFTER 10 ns, x"F1" AFTER 50 ns; bb <= 100_789, 16#3F7# AFTER 30 NS, 4#103_2122# AFTER 100 ns;