Slide 1 3.VHDL/Verilog Description Elements. Slide 2 To create a digital component, we start with…? The component’s interface signals Defined in MODULE.

Slides:



Advertisements
Similar presentations
1/8/ VerilogCopyright Joanne DeGroat, ECE, OSU1 Verilog Overview An overview of the Verilog HDL.
Advertisements

VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
COE 405 VHDL Basics Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh Computer Engineering.
Simulation executable (simv)
The Verilog Hardware Description Language
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
Slide 1 7. Verilog: Combinational always statements. VHDL: Combinational Processes: To avoid (I.E. DO NOT What in your HDL code?) Cases that generate Synthesis.
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.
History TTL-logic PAL (Programmable Array Logic)
ELEN 468 Lecture 151 ELEN 468 Advanced Logic Design Lecture 15 Synthesis of Language Construct I.
02/02/20091 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
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.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
Introduction to VHDL CSCE 496/896: Embedded Systems Witawas Srisa-an.
1/31/20081 Logic devices can be classified into two broad categories Fixed Programmable Programmable Logic Device Introduction Lecture Notes – Lab 2.
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.
331 W05.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 5: VHDL Programming [Adapted from Dave Patterson’s UCB CS152.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 2 Khurram Kazi Some of the slides were taken from K Gaj ’ s lecture slides from GMU ’ s VHDL.
ECE 331 – Digital System Design Course Introduction and VHDL Fundamentals (Lecture #1)
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
Overview Logistics Last lecture Today HW5 due today
1 H ardware D escription L anguages Basic Language Concepts.
Slide 1 5. VHDL/Verilog Operators, Arrays and Indexes.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches.
ECE 2372 Modern Digital System Design
An Introduction to VHDL Using Altera’s Quartus II IDE Dr. William M. Jones Coastal Carolina University Numbers and Bytes Meeting 20 OCT 2008.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
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,
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
Verilog Language Concepts
CSET 4650 Field Programmable Logic Devices Dan Solarek Introduction to VHDL An Overview / Review.
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
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.
Module 2.1 Gate-Level/Structural Modeling UNIT 2: Modeling in Verilog.
Slide 1 6. VHDL/Verilog Behavioral Description. Slide 2 Verilog for Synthesis: Behavioral description Instead of instantiating components, describe them.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHDL – Basic Language Elements  Identifiers: –basic identifier: composed of a sequence of one or more.
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
Introduction to VHDL Spring EENG 2920 Digital Systems Design Introduction VHDL – VHSIC (Very high speed integrated circuit) Hardware Description.
Fall 08, Oct 29ELEC Lecture 7 (updated) 1 Lecture 7: VHDL - Introduction ELEC 2200: Digital Logic Circuits Nitin Yogi
Introduction to VLSI Design – Lec01. Chapter 1 Introduction to VLSI Design Lecture # 11 High Desecration Language- Based Design.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
ECE 332 Digital Electronics and Logic Design Lab Lab 6 Concurrent Statements & Adders.
Generate Statement A generate statement provides a mechanism for iterative or conditional elaboration of a portion of description. The iterative elaboration.
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
Chapter 5 Introduction to VHDL. 2 Hardware Description Language A computer language used to design circuits with text-based descriptions of the circuits.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
VHDL Discussion Subprograms IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
ECE 332 Digital Electronics and Logic Design Lab Lab 5 VHDL Design Styles Testbenches Concurrent Statements & Adders.
L20 – Register Set. The 430 Register Set  Not exactly a dual ported register set, but a dual drive register set.  Ref: text Unit 10, 17, 20 9/2/2012.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Case Study: Xilinx Synthesis Tool (XST). Arrays & Records 2.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Overview Logistics Last lecture Today HW5 due today
Basic Language Concepts
4.VHDL/Verilog Hierarchical Description
Reg and Wire:.
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
Dataflow Style Combinational Design with VHDL
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
UNIT 2: Data Flow description
VHDL Discussion Subprograms
Founded in Silicon Valley in 1984
VHDL Discussion Subprograms
The Verilog Hardware Description Language
Sequntial-Circuit Building Blocks
(Sequential-Circuit Building Blocks)
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

Slide 1 3.VHDL/Verilog Description Elements

Slide 2 To create a digital component, we start with…? The component’s interface signals Defined in MODULE Module contains the WHOLE code of the component, including the definitions for Ports – input, output and inout signals Parameters – can be overwritten from the upper hierarchical level Verilog Description Elements

Slide 3 General Form Definition Naming Conventions - MUST be there [name] - Optional (does not have to be present) - Either name1 or name 2 [name1 | name2] – Optional name1 or name2 Example: port definition: [type] [size] ; OR: [wire | reg] [size] ;

Slide 4 Symbol Drawing Elements My_module A[7:0] B[7:0] CLK DATA[7:0] CE Input and Output Ports: Arrowheads will be usually missing Usually, inputs are at the left side, outputs at the right side. If not, arrows indicating direction should be present Inout ports: arrowheads should be present Arrowhead indicating that is a clock signal (convention!) These are only helpers, indicating the signal width. Recommended to be present

Slide 5 Symbol Drawing Elements My_module A[7:0] B[7:0] CLK DATA[7:0] CE Bus label designators are not part of the signal name!!! Do not write input A[7:0]! Syntactically is correct, but it will create an array of 8 signals, each signal of one bit wide Do not use arrays for input/output ports! The signal name is A The bus designator is [7:0] Correct form: input [7:0] A

Slide 6 Verilog Module Definition General Form Prior Verilog 2001: module [#(paramater_list)] ( ); //for each port in the list: [size] name; Example: My_module module My_module (A, B, CLK, DATA, CE); input [7:0] A; input [7:0] B; input CLK; inout [7:0] DATA; output CE; … endmodule My_module A[7:0] B[7:0] CLK DATA[7:0] CE This is a LIST of ports, end each element with, except the last one This is NOT a list of ports but port declaration statements, end each statement with ;

Slide 7 Verilog Module Definition General Form Newer form – more compact module [#(parameter_list)] ( ); Example: My_module module My_module (input [7:0] A, input [7:0] B, input CLK, inout [7:0] DATA, output CE); … endmodule My_module A[7:0] B[7:0] CLK DATA[7:0] CE This is a LIST of ports, end each element with, except the last one

Slide 8 Port directions input – Signal values can be ONLY READ, not written output – Signal values can be both read and written (assigned), with the restriction: A SIGNAL CAN BE ASSIGNED IN ONLY ONE PLACE, i.e. One assign statement (if the signal is wire type), or One always statement (if the signal is reg type) inout - Bidirectional signal (tri-state) - Although newer FPGA devices can have tristate buffers on-chip, it is recommended to be used only for connections outside the chip - Recommendations: - Use two different signals for reading and assigning input values - Use a separate control signal to control the direction of the inout signal

Slide 9 VHDL ENTITY Definition General Form entity is generic ( : := ;... ); port ( : ; …); end [entity] ; Example: My_module entity My_module is port (A: in std_logic_vector (7 downto 0); B: in std_logic_vector (7 downto 0); CLK: in std_logic; DATA: inout std_logic_vector (7 downto 0); CE: out std_logic ); end My_module; My_module A[7:0] B[7:0] CLK DATA[7:0] CE This is a LIST of port statements, end each element with ; except the last one VHDL: out ports can be written in only one place, but CAN NOT BE READ! An internal signal has to be declared and used to read the output port

Slide 10 Signal and port modes wire – Can be assigned only in a concurrent statement (assign) – Cannot have initial value! Example: wire s = 0; … assign s = … //NOT ALLOWED! s is already constant (0) Otherwise, the synthesizer would be forced to create a circuit like: reg – Can be assigned only in a sequential statement (always) – Can have initial value Example: reg q = 0; //Allowed

Slide 11 Port directions linked to modes input – By default, considered as wire, cannot be assigned anyway output, inout – If their type is not specified, by default are considered as wire – If needed to assign output ports in always statements, specify reg in port declaration – Example: output reg [7:0] Dout, output reg CE,... From upper level hierarchy, output or inout ports are always seen by default as wire Recommended design practice: declare output ports as wire Use an internal signal with _reg suffix and assign the output port to it In this way, port declarations does not have to change, only internal code