Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.

Slides:



Advertisements
Similar presentations
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
Advertisements

ENEL111 Digital Electronics
Simulation executable (simv)
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Verilog Intro: Part 1.
Hardware Description Language (HDL)
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
16/04/20151 Hardware Descriptive Languages these notes are taken from Mano’s book It can represent: Truth Table Boolean Expression Diagrams of gates and.
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.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Verilog - 1 Writing Hardware Programs in Abstract Verilog  Abstract Verilog is a language with special semantics  Allows fine-grained parallelism to.
Verilog-HDL Reference: Verilog HDL: a guide to digital design and synthesis, Palnitkar, Samir Some of slides in this lecture are supported by Prof. An-Yeu.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
CSE241 R1 Verilog.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits Winter 2003 Recitation 1: Verilog Introduction.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Spring 2002EECS150 - Lec0-intro Page 1 EECS150 - Digital Design Lecture 8 - Hardware Description Languages February 14, 2002 John Wawrzynek.
Hardware Description Language(HDL). Verilog simulator was first used beginning in 1985 and was extended substantially through The implementation.
ECE 551 Digital System Design & Synthesis Lecture 11 Verilog Design for Synthesis.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
ECE 2372 Modern Digital System Design
Chap. 1 Overview of Digital Design with Verilog. 2 Overview of Digital Design with Verilog HDL Evolution of computer aided digital circuit design Emergence.
Synthesis Presented by: Ms. Sangeeta L. Mahaddalkar ME(Microelectronics) Sem II Subject: Subject:ASIC Design and FPGA.
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
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Logic Synthesis assign z=a&b a b z What is Synthesis synthesis /sinth siss/ noun ( pl. syntheses /sinth seez/) 1 the combination of components to form.
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
Slide 1 6. VHDL/Verilog Behavioral Description. Slide 2 Verilog for Synthesis: Behavioral description Instead of instantiating components, describe them.
Logic Synthesis assign z=a&b a b z What is Synthesis synthesis /sinth siss/ noun ( pl. syntheses /sinth seez/) 1 the combination of components to form.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
VHDL – Behavioral Modeling and Registered Elements ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Introduction to ASIC flow and Verilog HDL
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Logic Synthesis assign z=a&b a b z What is Synthesis synthesis /sinth siss/ noun ( pl. syntheses /sinth seez/) 1 the combination of components to form.
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.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Verilog-HDL Reference: Verilog HDL: a guide to digital design and synthesis, Palnitkar, Samir Some of slides in this lecture are supported by Prof. An-Yeu.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Hardware Description Languages: Verilog
Verilog-HDL Reference: Verilog HDL: a guide to digital design and synthesis, Palnitkar, Samir Some of slides in this lecture are supported by Prof. An-Yeu.
Discussion 2: More to discuss
Topics Modeling with hardware description languages (HDLs).
KARTHIK.S Lecturer/ECE S.N.G.C.E
Hardware Description Languages: Verilog
Topics Modeling with hardware description languages (HDLs).
Introduction to Verilog
Computer Architecture
VHDL Introduction.
Verilog-HDL Reference: Verilog HDL: a guide to digital design and synthesis, Palnitkar, Samir Some of slides in this lecture are supported by Prof. An-Yeu.
The Verilog Hardware Description Language
The Verilog Hardware Description Language
Digital Designs – What does it take
COE 202 Introduction to Verilog
Presentation transcript:

Slide 1 2. Verilog Elements

Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx Coorporation, June 2003, module Mult ( input [15:0] A, input [15:0] B, output [31:0] Y ); assign Y = A * B; endmodule

Slide 3 Advantages of HDL languages: –Easy to describe combinational circuits –High-level language – easy to be understand by both human and machine –Projects can be easily PARTITIONED and HIERARCHIZED – supports teamwork! –Allows for Design Reuse –Platform independent –Allows different levels of abstractization (what is this?) Abstractization: Hiding details of a project, insignifiant at a specific level. Abstractization level example Behaviour RTL Logic Layout Algorithmic level. Modelling systems and stimulus Machine-independent description: registers, logic, clocking “Gate-Level” netlist Physical level – technology dependent. For ex: 15um HDL – useful for the upper three levels

Slide 4 VERILOG – Generalities Verisign Logic (?) by Verisign. Inc. Historically: 1984 Gateway Design Automation Inc, bought then by Cadence Design Systems, inc. First IEEE standard in 1995: IEEE Std , then in 2001 – IEEE std , then in IEEE Standard Newest language extention: Verilog – AMS (Analog and Mixed Signal, standardized in 2008) What VHDL/Verilog is used for? –To describe DIGITAL Systems and Circuits –To describe a TESTBENCH (used to test those above…) –Verilog is NOT a Programming language !!! –A Programming Language represents: (incomplete definition?) A set of instructions and data, that is passed through a compiler or interpreter The compiler transforms the set of instructions into machine code The machine code is loaded into a MEMORY and executed by a PROCESSING UNIT –VHDL/Verilog do NOT comply with the above description!!! –Exception: A Testbench can be considered as a multi-threading program

Slide 5 VERILOG – Generalities For a (BEHAVIORAL) Simulator: –VHDL/Verilog for Digital Circuits: The Instructions (Statements) are EXECUTED in order to SIMULATE the functionality of the circuit –Testbenches are also EXECUTED to create the input signaling and output verification For a Synthesizer: –VHDL/Verilog for Digital Circuits: The statements are TRANSFORMED into digital elements (Logic gates, registers etc) –Testbenches are, by default, IGNORED by synthesizers Therefore we speak about two types of HDL code: VHDL/Verilog for Synthesis VHDL/Verilog for Tetbenches

Slide 6 2.a. VHDL/Verilog for Synthesis

Slide 7 VHDL/Verilog for Synthesis Generalities: EVERY DIGITAL CIRCUIT –Contains AT LEAST one input signal (port) (*), (**) –Contains AT LEAST one output signal (port) (**) –It may contain internal signals and lower-level components –(*) Assume the circuit contains an internal signal generator, the input can missing. NOT the case of FPGA designs! FPGA devices NEED EXTERNAL CLOCKING –(**) Circuits with no input and circuits with no output will be removed by the synthesizer in the optimization process. –(**) Same if the input ports are not read, or the output port is never written or constant

Slide 8 VHDL/Verilog for Synthesis Moreover: EVERY: –Port –Internal Signal –Internal Component –… is IDENTIFIED by a Name (IDENTIFIER) (*) –(*) The OR gate will be probably described as: assign Cout = C1 | C0; The synthesizer will generate an OR gate. Will the OR gate have no name? –Names i.e. IDENTIFIERA ARE IMPORTANT!

Slide 9 Verilog Syntax elements CASE SENSITIVE, keywords always written with small letters Comment: // until the end of line /* …Can extend on more than one line */ A statement (instruction) can extend to more than one line! More than one statements can be on the same line!!! Instruction delimiter: ; (Every instruction ends up with; ) Compound instructions: begin – end: neither begin, nor end are ended with ; Same for statements delimiting “the end of something”: endcase, endmodule etc.

Slide 10 Verilog Syntax elements List Delimiter :, The last element of a list does not have to be delimited! A list is not ended with, ! In a VHDL/Verilog code we assign signal and/or variable values. Verilog: Two type of assignments: Blocking: ‘=‘ Non-Blocking: for signals: ‘<=‘, for variables: ‘:=‘ Recommendation: In “always” statements use NON- BLOCKING assignments Inside of an “always” statements cannot mix non-blocking and blocking assignments So: use <= for assingmnets

Slide 11 Verilog Syntax elements How to give a numerical value to a signal? number_of_bits’[s]number_basevaloare Exemple: 1’b0; 2’b10, 16’hffef, 8’d123; Default numbering base: Decimal What is 0, or 1, or 121? i.e. represented on how many bits? s – signed value i.e. two’s complement Some synthesizers do not support signed value How to treat then a signed value?

Slide 12 Verilog Syntax elements USER IDENTIFIERS Can contain letters, numbers, underscore ‘_’, CANNOT contain special characters such as /, ‘, “ MUST start with letters Examples: Mysignal23-- correct rdy, RDY, Rdy-- these are DIFFERENT identifiers vector_/_vector-- NO: Special character, not allowed last line-- Spaces are not allowed next__state -- Two consecutive underscores are NOT allowed 10th_signal-- NO: Starts with a number open, reg -- NO: Are Verilog Keywords

Slide 13 Extended Identifiers: The Escape character \ allows for extended identifiers - Verilog ’93 +! \12name – can begin with a number: ALLOWED \last line\ -- ALLOWED \next__state\ -- ALLOWED \open\, \reg\ -- ALLOWED XST: may need extra synthesis options to support Verilog ‘93! Suggestion: try to avoid extended identifiers Verilog Syntax elements

Slide 14 Example for Naming convention (Xilinx) -- active low signals: "*_n" -- clock signals: "clk", "clk_div#", "clk_#x" -- reset signals: "rst", "rst_n" -- parameters: "C_*" -- state machine next state: "*_ns" -- state machine current state: "*_cs" -- combinatorial signals: "*_cmb" -- pipelined or register delay signals: "*_d#" -- counter signals: "*cnt*" -- clock enable signals: "*_ce" -- internal version of output port "*_i" -- device pins: "*_pin" -- ports: - Names begin with Uppercase Verilog Syntax elements