DSD,USIT,GGSIPU1 Entity declaration –describes the input/output ports of a module entity reg4 is port ( d0, d1, d2, d3, en, clk : in std_logic; q0, q1,

Slides:



Advertisements
Similar presentations
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Advertisements

© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
LECTURE 4: The VHDL N-bit Adder
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.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Adder Discussion D6.2 Example 17. s i = c i ^ (a i ^ b i ) c i+1 = a i * b i + c i * (a i ^ b i ) Full Adder (Appendix I)
Mridula Allani Fall 2010 (Refer to the comments if required) ELEC Fall 2010, Nov 21(Adopted from Profs. Nelson and Stroud)
Introduction to VHDL Dr. Adnan Shaout The University of Michigan-Dearborn.
Lab Lecture 3 VHDL Architecture styles and Test Bench -Aahlad.
N Structural Modeling: n Entities n Ports n Architectures n Packages.
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.
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
Introduction to VHDL By Mr. Fazrul Faiz Zakaria School of Computer and Communication Engineering UniMAP.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
Modeling styles: 1. Structural Modeling: As a set of interconnected components (to represent structure), 2. Dataflow Modeling: As a set of concurrent assignment.
1 Digital System Design Subject Name : Digital System Design Course Code : IT- 308 Instructor : Amit Prakash Singh Home page :
A.7 Concurrent Assignment Statements Used to assign a value to a signal in an architecture body. Four types of concurrent assignment statements –Simple.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 6: Configurations.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
1 Part I: SYSTEM DESIGN. 2 Packages and Components Functions and Procedures Problem (Design & Implementation) Additional System Designs.
ENG6090 RCS1 ENG6090 Reconfigurable Computing Systems Hardware Description Languages Part 5: Modeling Structure.
Language Concepts Ver 1.1, Copyright 1997 TS, Inc. VHDL L a n g u a g e C o n c e p t s Page 1.
1/26 VHDL VHDL Structural Modeling Digital Logic.
Carry look ahead adder P (I) = a(I) xor b(I); G(I) = a(I) and b(I); S(I) = p(I) xor c(I); Carry(I+1) = c(I)p(I) + g(I)
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
ENG2410 Digital Design LAB #5 Modular Design and Hierarchy using VHDL.
1 Introduction to VHDL Spring What is VHDL? VHDL can be uses to model and synthesise digital systems. VHDL = VHSIC Hardware Description Language.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
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.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
HARDWARE DESCRIPTION LANGUAGE (HDL). What is HDL? A type of programming language for sampling and modeling of electronic & logic circuit designs It can.
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 332 Digital Electronics and Logic Design Lab Lab 6 Concurrent Statements & Adders.
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.
1 Introduction to VHDL Part 2 Fall We will use Std_logic And, Or have same precedence See slide 8 of part 1.
4-to-1 Multiplexer: Module Instantiation Discussion D2.2 Example 5.
Structural modelling. Configurations Lecture 5. Outline 5.1. Structural modelling 5.2. Generics 5.3. Configurations.
2/10/07DSD,USIT,GGSIPU1 BCD adder KB3B2B1B0CD3D2D1D
Digital System Projects
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.
ECOM 4311—Digital System Design with VHDL
VHDL Project I: Serial Adder Matthew Murach Slides Available at:
(1) Modeling Structure © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
LAB #5 Modular Design and Hierarchy using VHDL
Combinational logic circuit
Structural style Modular design and hierarchy Part 1
Basic Language Concepts
Behavioral Style Combinational Design with VHDL
Structural style Modular design and hierarchy Part 1
HDL Programming Fundamentals
VHDL VHSIC Hardware Description Language VHSIC
Structural style Modular design and hierarchy Part 1
IAY 0600 Digital Systems Design
VHDL Discussion Subprograms
VHDL Structural Architecture
Concurrent vs Sequential
Chapter 5 – Number Representation and Arithmetic Circuits
VHDL Discussion Subprograms
Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.
4-Input Gates VHDL for Loops
Digital Logic with VHDL
Presentation transcript:

DSD,USIT,GGSIPU1 Entity declaration –describes the input/output ports of a module entity reg4 is port ( d0, d1, d2, d3, en, clk : in std_logic; q0, q1, q2, q3 : out std_logic ); end entity reg4; entity name port mode (direction) port type reserved words punctuation Port Name

DSD,USIT,GGSIPU2 Modeling Behavior Architecture body –describes an implementation of an entity –may be several per entity Behavioral architecture –describes the algorithm performed by the module –contains process statements, Function Statement1 Port interface

DSD,USIT,GGSIPU3 Modeling Structure Structural architecture –implements the module as a composition of subsystems –contains signal declarations, for internal interconnections –the entity ports are also treated as signals component declarations –instances of previously declared entity/architecture pairs port maps in component instances –connect signals to component ports

DSD,USIT,GGSIPU4 Component Declaration Component Component-name [is] [port (list-of-interface-port);] End component [component-name]; Component-name: may or may not refer to the name of an entity already existing in a library.

DSD,USIT,GGSIPU5 Component cont.. List-of-interface-port specifies the name,mode, and type for each port of the component in a manner similar to that specified in an entity declaration. The names of the ports may also be different from the names of the ports in the entity to which it may be bound.

DSD,USIT,GGSIPU6 Component declaration Component declaration appear in the declaration part of an architecture body. They may also appear in a package declaration

DSD,USIT,GGSIPU7 Signal declaration Are required to connect different types of ports.(mode of ports) Class of the object identifier Signal object should be same data type as it is in component and entity. Signal object can be also be declared as an array

DSD,USIT,GGSIPU8 Component Instantiation A Component instantiation statement defines a subcomponent of the entity in which it appears. It associates the signals in the entity with the ports of that subcomponent.

DSD,USIT,GGSIPU9 Format of a component Instantiation statement Component-label : component-name [port map (association-list)]; * Component-label: It can be any legal identifier and can be considered as the name of the instance.

DSD,USIT,GGSIPU10 Component instantiation The component-name must be the name of a component declared earlier using a component declaration. The association-list associates signals in the entity, called actuals, with the ports of a component, called formals.

DSD,USIT,GGSIPU11 Association technique There are two ways to perform the association of formals with actuals: 1. Positional association 2. Named association

DSD,USIT,GGSIPU12 Positional association An association-list is of the form: Actual 1,actual 2,actual 3………………………… actual n The first port in the component declaration corresponds to the first actual in the component declaration corresponds to the first actual in the component instantiation, the second with second, and so on.

DSD,USIT,GGSIPU13 Named association An association-list is of the form: Formal 1 =>actual 1,formal 2 =>actual 2 ……..formal n =>actual n In named association, the ordering of the association is not important since the mapping between the actuals and formals is explicitly specified. The scope of the formals is restricted to be within the port map part of the instantiation for that component.

DSD,USIT,GGSIPU14 Rules of the port map 1.The types of the formal and actual being associated must be the same. 2.The modes of the ports must conform to the rule that if the formal s readable, so must the actual be; and if the formal is considered to be both readable and writeable, such a signal may be associated with a formal of any mode.

DSD,USIT,GGSIPU15 1.If an actual is a port of mode in, it may not be associated with a formal of mode out or inout; 2.if the actuals is a port of mode out, it may not be associated with a formal of mode in or inout; 3.if the actual is a port of mode inout, it may be associated with a formal of mode in,out, or inout.

DSD,USIT,GGSIPU16 Circuit of Half adder

DSD,USIT,GGSIPU17 Circuit of Full adder

DSD,USIT,GGSIPU18 Design a 4-bit adder using FA

DSD,USIT,GGSIPU19 Example (Full adder using macro of Half adder) library ieee; use ieee.std_logic_1164.all; entity ha is port ( x, y : in std_logic; s, c: out std_logic ); end ha; architecture ha_behave of ha is begin s <= x xor y; c <= x and y; end ha_behave;

DSD,USIT,GGSIPU20 library ieee; use ieee.std_logic_1164.all; entity fa is port ( xin, yin, zin : in std_logic; cout, sum: out std_logic ); end fa; architecture fa_struct of fa is component ha is port ( x, y : in std_logic; s, c: out std_logic ); end component ha; signal temp0,temp1,temp2 : std_logic; begin ha1 : ha port map (x=>xin,y=>yin,s=>temp0,c=>temp1); ha2 : ha port map (x=>temp0,y=>zin,s=>sum,c=>temp2); cout <= temp1 or temp2; end fa_struct;

DSD,USIT,GGSIPU21 library ieee; use ieee.std_logic_1164.all; entity fa_4bit is port ( a,b : in std_logic_vector (3 downto 0); sum: out std_logic_vector (3 downto 0); carry : out std_logic ); end fa_4bit; architecture fa_4bit_behave of fa_4bit is component fa is port ( xin, yin, zin : in std_logic; cout, sum: out std_logic ); end component fa; signal c : std_logic_vector (3 downto 0); begin c(0) <= '1';

DSD,USIT,GGSIPU22 u1 : fa port map (xin=>a(0),yin=>b(0),zin=>c(0),sum=>sum(0),cout=>c(1)); u2 : fa port map (xin=>a(1),yin=>b(1),zin=>c(1),sum=>sum(1),cout=>c(2)); u3 : fa port map (xin=>a(2),yin=>b(2),zin=>c(2),sum=>sum(2),cout=>c(3)); u4 : fa port map (xin=>a(3),yin=>b(3),zin=>c(3),sum=>sum(3),cout=>carry); end fa_4bit_behave;

DSD,USIT,GGSIPU23

DSD,USIT,GGSIPU24 Adder-Subtractor using Mode control