Unit 7 Mixed Language Descriptions SYLLABUS Highlights of Mixed-Language Description, How to invoke One language from the Other Mixed-language Description.

Slides:



Advertisements
Similar presentations
HDL Programming Fundamentals
Advertisements

Verilog Intro: Part 1.
HDL Programming Fundamentals UNIT 3: Behavioral Descriptions OBJECTIVES  Understand the concept of sequential statements in VHDL and how they are different.
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #12) The slides included herein were taken from the materials.
ECE 331 – Digital System Design
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
Lecture #6 Page 1 Lecture #6 Agenda 1.VHDL - Architecture 2.VHDL - Packages Announcements 1.HW #3 assigned ECE 4110– Sequential Logic Design.
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
1 H ardware D escription L anguages Basic Language Concepts.
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
ECE 2372 Modern Digital System Design
1 Part I: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Introducing the Nexys 2 Board CS 332 – Operating Systems 12/04/2011 by Otto Castell-R.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
1 component OR_3 port (A,B,C: in bit; Z: out bit); end component ; Reserved Words  Declarations of Components and Entities are similar  Components are.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #11) The slides included herein were taken from the materials.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Hardware Description Languages Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
Digital System Projects
Introduction to ASIC flow and Verilog HDL
9/9/2006DSD,USIT,GGSIPU1 Concurrent vs Sequential Combinational vs Sequential logic –Combinational logic is that in which the output of the circuit depends.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
VHDL ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
Unit 4 Structural Descriptions SYLLABUS Highlights of Structural descriptions Organization of the Structural descriptions Binding State Machines Generate(HDL),Generic(VHDL),
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
An Introduction to V.H.D.L.. Need of a Compiler… main( ) { int x=10,y=20,z; z = x + y ; printf ( “ %d “, z ); getch( ) ; } What’s That ? Give me only.
Combinational logic circuit
Elements of Structural Models
Structural style Modular design and hierarchy Part 1
Basic Language Concepts
Systems Architecture Lab: Introduction to VHDL
Subject Name: FUNDAMENTALS OF HDL Subject Code: 10EC45
UNIT 8: Synthesis Basics
Module Goals Introduce structural VHDL constructs Use of components
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Structural style Modular design and hierarchy Part 1
HDL Programming Fundamentals
ENG6530 Reconfigurable Computing Systems
ECE 4110–5110 Digital System Design
UNIT 3: Behavioral Descriptions
UNIT 2: Data Flow description
HDL Programming Fundamentals
CHAPTER 10 Introduction to VHDL
VHDL VHSIC Hardware Description Language VHSIC
Structural style Modular design and hierarchy Part 1
Hardware Descriptive Languages these notes are taken from Mano’s book
VHDL Discussion Subprograms
Concurrent vs Sequential
VHDL Introduction.
VHDL Discussion Subprograms
Figure 8.1. The general form of a sequential circuit.
UNIT 6: Mixed-Type Description
Sequntial-Circuit Building Blocks
4-Input Gates VHDL for Loops
Digital Logic with VHDL
(Sequential-Circuit Building Blocks)
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Unit 7 Mixed Language Descriptions SYLLABUS Highlights of Mixed-Language Description, How to invoke One language from the Other Mixed-language Description Examples Limitations of Mixed-Language Description.

Highlights of Mixed-Language Description  Simulator that we use with the HDL package should be able to handle mixed- language environment  Both VHDL and Verilog module files are made visible to the simulator.  In mixed-language environment both VHDL and Verilog Libraries are made visible to the simulator.  At present time, mixed language environment has many limitations. VHDL module can only invoke the entire Verilog module; and a Verilog module can only invoke a VHDL entity. We can not invoke a VHDL procedure from a Verilog module.  Mixed-Language description can combine advantages of both languages in one module.

How to Invoke a Verilog Module from VHDL Module Invoking a Verilog Module from VHDL Module -- This is the VHDL Project library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity Ver_VHD is port ( a, b : in std_logic; c: out std_logic); end Ver_VHD; architecture Ver_VHD of Ver_VHD is component V_modl port (x,y: in std_logic; z : out std_logic); -- The name of the Component V_modl should be identical to the name of the --Verilog module; also the ports should identical in name and mode --with the inputs and outputs of the Verilog module end component; end Ver_VHDl //This is the Verilog module module V_modl (x, y, z); input x,y; output z; Declare a VHDL component with the Same name as the Verilog Module.

Invoking VHDL entity from Verilog Module- Examples Example 1:Mixed-Language Description of a Full Adder A VHDL half-adder is written.A Verilog module uses the VHDL half adder to describe a full adder.

Example 2 Mixed-Language Description of a 9-bit Adder A VHDL description of a 3-bit Carry-lookahead adder is used to write a Verilog description of 9-bit adder

Mixed-Language Description of 3-bit Adder with zero Flag 1-bit full adder description is written in VHDL. A Verilog module uses the VHDL description to describe a 3-bit full adder with zero flag.

Mixed-Language Description of a Master-Slave D Flip-Flop A VHDL description of a D-latch is written. A Verilog module implements the VHDL description to describe a Master-Slave D Flip- Flop.

Mixed-Language Description of a 4x4 Comparator A 1-bit full adder is written in VHDL. A Verilog module implements the VHDL code to describe a 4x4 comparator.

HDL Programming Fundamentals Invoking Verilog module from VHDL Module Example: Instantiating an AND gate From VHDL Module VHDL component and2 is declared in the VHDL module. A Verilog module with the same name and2 describes and2. The Verilog description is implemented in the VHDL module..

Mixed-Language Description of 3-bit Synchronous Counter with Clear Several VHDL components JK_FF, inv, and2, or2 have been declared in the VHDL module. Verilog is implemented to describe these components. VHDL uses the escription to describe the counter.

Mixed-Language Description of N-bit Asynchronous Counter Two Verilog modules (jkff and andgate) are implemented in a VHDL module to describe N-bit Asynchronous counter

HDL Programming Fundamentals Example Instantiating CASEX in VHDL. Table 9.2 Truth Table for 4-bit Encoder InputOutput ab xxx11 xx102 x Others0 CaseX is a Verilog built-in function. By writing mixed language, the VHDL appears as if it has this built-in function.

HDL Programming Fundamentals Mixed-Language Description of a Low Pass RC Filter Verilog can easily handle real (floating) arithmetic operations; VHDL can easily handle File operations. By writing mixed language, we utilize the advantages of both languages.

Limitations of Mixed-Language Description Mixed language description is limited at present time. The limitations can be summarized as follows Not all VHDL data types are supported in mixed language description. Only bit, bit_vector, std_logic, std_ulogic, std_logic_vector, and std_ulogic_vector are supported. VHDL Port type Buffer is not supported in many of the current simulators. Only VHDL component construct can invoke a Verilog module. We can not invoke Verilog module from any other construct in the VHDL module. Verilog module can only invoke a VHDL entity. It can not invoke any other construct in the VHDL module such as procedures or functions.

Summary To invoke a VHDL entity from a Verilog module, we write a module statement in Verilog. The name of the module should be identical to the name of the entity; the type of the parameters of the module should match the type of the ports of the entity. For example the module statement: HA H1 (y, cin, s0,c0); written in a Verilog module invokes a VHDL entity by the name of HA. In the Verilog module, no other module should have the same name HA. Invoking a Verilog module from VHDL module is done by declaring a component in the VHDL module with the same name as the Verilog module. The ports of the component should be the same name and match in type with the ports of the Verilog module.