HDL Programming Fundamentals

Slides:



Advertisements
Similar presentations
UNIT 2: Data Flow description
Advertisements

HDL Programming Fundamentals
HDL Programming Fundamentals
The Verilog Hardware Description Language
Verilog Intro: Part 1.
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
HDL Programming Fundamentals UNIT 3: Behavioral Descriptions OBJECTIVES  Understand the concept of sequential statements in VHDL and how they are different.
التصميم المنطقي Second Course
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.
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
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.
B. RAMAMURTHY Hardware Description Language 8/2/
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’.
ECE 2372 Modern Digital System Design
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
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.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
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.
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.
CS/EE 3700 : Fundamentals of Digital System Design
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
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),
Unit 7 Mixed Language Descriptions SYLLABUS Highlights of Mixed-Language Description, How to invoke One language from the Other Mixed-language Description.
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.
An Introduction to Verilog: Transitioning from VHDL
Combinational logic circuit
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
Figure 7.1 Control of an alarm system
Module Goals Introduce structural VHDL constructs Use of components
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
ENG6530 Reconfigurable Computing Systems
ECE 4110–5110 Digital System Design
Hardware Descriptive Languages these notes are taken from Mano’s book
UNIT 3: Behavioral Descriptions
UNIT 2: Data Flow description
Field Programmable Gate Array
Field Programmable Gate Array
Field Programmable Gate Array
HDL Programming Fundamentals
CHAPTER 10 Introduction to VHDL
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
RTL Style در RTL مدار ترتيبي به دو بخش (تركيبي و عناصر حافظه) تقسيم مي شود. مي توان براي هر بخش يك پروسس نوشت يا براي هر دو فقط يك پروسس نوشت. مرتضي صاحب.
FIGURE 4.1 Block diagram of combinational circuit
Structural style Modular design and hierarchy Part 1
VHDL (VHSIC Hardware Description Language)
Hardware Descriptive Languages these notes are taken from Mano’s book
Concurrent vs Sequential
VHDL Introduction.
Figure 8.1. The general form of a sequential circuit.
UNIT 6: Mixed-Type Description
An overview of the Verilog HDL.
Sequntial-Circuit Building Blocks
4-Input Gates VHDL for Loops
(Sequential-Circuit Building Blocks)
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

HDL Programming Fundamentals UNIT 7: Mixed-Language Description 9.1 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. HDL Programming Fundamentals

HDL Programming Fundamentals 9.2.1 How to Invoke a VHDL entity from Verilog Module Listing 9.1 Invoking VHDL entity from Verilog Module //This is the Verilog module module mixed (a, b, c, d); input a,b; output c,d; ........... VHD_enty V1 ( a,b,c,d); /*The above module VHD_enty is the VHDL entity to be invoked in this module*/ endmodule --This is the VHDL entity library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity VHD_enty is port (x, y : in std_logic; O1, O2: out std_logic); end VHD_enty ; architecture VHD_enty of VHD_enty is begin Only VHDL entities can Be invoked from Verilog module HDL Programming Fundamentals

HDL Programming Fundamentals 9.2.2 How to Invoke a Verilog Module from VHDL Module Listing 9.2 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; ....... //This is the Verilog module module V_modl (x, y, z); input x,y; output z; .......... endmodule Declare a VHDL component with the Same name as the Verilog Module. HDL Programming Fundamentals

HDL Programming Fundamentals 9.3.1 Invoking VHDL entity from Verilog Module-Examples Example 9.1 Mixed-Language Description of a Full Adder Listing 9.3 A VHDL half-adder is written. A Verilog module uses the VHDL half adder to describe A full adder HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.2 Mixed-Language Description of a 9-bit Adder Listing 9.4 A VHDL description of a 3-bit Carry-lookahead adder is used To write a Verilog description of 9-bit adder HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.3 Mixed-Language Description of 3-bit Adder with zero Flag Listing 9.5 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. HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.4 Mixed-Language Description of a Master-Slave D Flip-Flop Listing 9.6 A VHDL description of a D-latch is written. A Verilog module implements the VHDL description to describe a Master-Slave D Flip-Flop. HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.5 Mixed-Language Description of a 4x4 Comparator Listing 9.7 A 1-bit full adder is written in VHDL. A Verilog module implements the VHDL code to describe a 4x4 comparator. Only three bits are shown HDL Programming Fundamentals

HDL Programming Fundamentals 9.3.2 Invoking Verilog module from VHDL Module Example 9.6 Instantiating an AND gate From VHDL Module Listing 9.8 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.. HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.7 Mixed-Language Description of a JK Flip Flop with a Clear Listing 9.9 A VHDL component jk_verilog is declared in a VHDL module. A Verilog module jk_verilog describes the flip-flop. The VHDL implements the Verilog description. HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.8 Mixed-Language Description of 3-bit Synchronous Counter with Clear Listing 9.10 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. HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.9 Mixed-Language Description of N-bit Asynchronous Counter Listing 9.11 Two Verilog modules (jkff and andgate) are implemented in a VHDL module to describe N-bit Asynchronous counter HDL Programming Fundamentals

HDL Programming Fundamentals Example 9.10 Mixed-Language Description of a Switch-Level Multiplexer Listing 9.12 A VHDL description appears to have primitives nmos and pmos by linking it to a Verilog module where these primitives are built-in. HDL Programming Fundamentals

HDL Programming Fundamentals Example Instantiating CASEX in VHDL. Listing9.11 Table 9.2 Truth Table for 4-bit Encoder Input Output a b xxx1 1 xx10 2 x100 4 1000 8 Others 0 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

HDL Programming Fundamentals Example 9.12 Mixed-Language Description of a Low Pass RC Filter Listing 9.14 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. HDL Programming Fundamentals

HDL Programming Fundamentals 9.4 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. HDL Programming Fundamentals

HDL Programming Fundamentals 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. For example, the VHDL component: component V_modl port (x,y: in std_logic; z : out std_logic); end component; invokes a Verilog module V_modl. HDL Programming Fundamentals