Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.

Slides:



Advertisements
Similar presentations
VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
Advertisements

CS 3850 Lecture 6 Tasks and Functions. 6.1 Tasks and Functions Tasks are like procedures in other programming languages. e. g., tasks may have zero or.
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
ENEL111 Digital Electronics
Simulation executable (simv)
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Supplement on Verilog adder examples
Synchronous Sequential Logic
Combinational Logic.
Verilog Intro: Part 1.
Hardware Description Language (HDL)
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Originally designed to model and verify a design.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Digital System Design by Verilog University of Maryland ENEE408C.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
The Multicycle Processor II CPSC 321 Andreas Klappenecker.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
ECE 4680 Computer Architecture Verilog Presentation I. Verilog HDL.
CS 61C L24 Verilog I (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
Verilog HDL (Behavioral Modeling) Bilal Saqib. Behavioral Modeling.
CSE241 R1 Verilog.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits Winter 2003 Recitation 1: Verilog Introduction.
ECEN ECEN475 Introduction to VLSI System Design Verilog HDL.
VHDL. What is VHDL? VHDL: VHSIC Hardware Description Language  VHSIC: Very High Speed Integrated Circuit 7/2/ R.H.Khade.
2/3/03ΗΥ220 - Μαυροειδής Ιάκωβος1 Delays in Behavioral Verilog - Interassignment Delay  Key idea: unlike blocking delay, RHS is evaluated before delay.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Timing control in verilog Module 3.1 Delays in Verilog.
Overview Logistics Last lecture Today HW5 due today
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
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
Synthesis Presented by: Ms. Sangeeta L. Mahaddalkar ME(Microelectronics) Sem II Subject: Subject:ASIC Design and FPGA.
Verilog HDL: A solution for Everybody By, Anil Kumar Ram Rakhyani
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
ECE/CS 352 Digital System Fundamentals© 2001 C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapters 3 and 4: Verilog – Part 2 Charles R.
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
Module 1.2 Introduction to Verilog
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,
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
ELEN 468 Lecture 131 ELEN 468 Advanced Logic Design Lecture 13 Synthesis of Combinational Logic II.
M.Mohajjel. Structured Procedures Two basic structured procedure statements always initial All behavioral statements appear only inside these blocks Each.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
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
M.Mohajjel. Objectives Learn How to write synthesizable Verilog code Common mistakes and how to avoid them What is synthesized for what we code Digital.
Verilog® HDL Behavioral Modeling (2)
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Verilog Intro: Part 1. Hardware Description Languages A Hardware Description Language (HDL) is a language used to describe a digital system, for example,
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part4: Verilog – Part 2.
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.
Overview Logistics Last lecture Today HW5 due today
Hardware Description Languages: Verilog
Verilog Introduction Fall
Hardware Description Languages: Verilog
Introduction to Verilog
Levels in computer design
332:437 Lecture 8 Verilog and Finite State Machines
332:437 Lecture 8 Verilog and Finite State Machines
COE 202 Introduction to Verilog
Presentation transcript:

Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral and structural views examples

Silicon Programming--Intro. to HDLs2

3

4

5 Two main HDLs: VHDL / Verilog VHDL--Very High Speed Integrated Circuit (VHSIC) Hardware Description Language Standards--IEEE ; ; Ada-like language Additions--VHDL-AMS--Analog & Mixed Signal Verilog—1985; proprietary to Cadence until 1990 (“open Verilog”) C-like language Additions—Verilog-AMS—Analog & Mixed Signal NOTE: this course is NOT designed to make you a VHDL or Verilog expert! The Altera tools (as well as other synthesis tools) work best with simpler HDL constructs (e.g., structural representations, modeest levels of nesting)

Silicon Programming--Intro. to HDLs6

7

8

9

10 Note: keywords, comment, “entity” syntax

Silicon Programming--Intro. to HDLs11

Silicon Programming--Intro. to HDLs12 ???

Silicon Programming--Intro. to HDLs13 ???

Silicon Programming--Intro. to HDLs14 Full adder example:

Silicon Programming--Intro. to HDLs15

Silicon Programming--Intro. to HDLs16

Silicon Programming--Intro. to HDLs17

Silicon Programming--Intro. to HDLs18

Silicon Programming--Intro. to HDLs19

Silicon Programming--Intro. to HDLs20

Silicon Programming--Intro. to HDLs21

Silicon Programming--Intro. to HDLs22

Silicon Programming--Intro. to HDLs23

Silicon Programming--Intro. to HDLs24

Silicon Programming--Intro. to HDLs25 Verilog: The following is taken from the introduction by Dan Hyde at: Other references can be found at: Architectural, behavioral, gate, and switch levels supported Gate level: logic elements (structural) Switch level: transistor level Verilog program can be used for design, simulation, synthesis Basic construct: module Verilog program consists of interconnected modules Usually a “top” module encapsulates all the others

Silicon Programming--Intro. to HDLs26 Some simple examples of combinational logic: // NAND gate (behavioral model) module NAND(in1, in2, out); input in1, in2; output out; assign out = ~(in1 & in2); endmodule //AND gate (structural module) module AND(in1, in2, out); input in1, in2; output out; wire w1; NAND NAND1(in1, in2, w1); NAND NAND2(w1, w1, out); endmodule

Silicon Programming--Intro. to HDLs27 A simple sequential logic example—what does it do? (Note “control statements” initial and always—these will run concurrently) module simple; reg [0:7] A, B; reg C; //stop execution after 20 time steps initial begin: stop_at // Will stop the execution after 20 simulation units. #20; $stop; end //so these statements at time 0 A = 0; $monitor(" %0d %b %b %b", $time, A, B, C); end //main_process will loop until simulation is over (#1 means do at each step) always begin: main_process #1 A = A + 1; #1 B[0:3] = ~A[4:7]; #1 C = &A[6:7]; end endmodule

Silicon Programming--Intro. to HDLs28 Assignment: Default is that new assignment is made whenever inputs change: assign out = ~( in1 & in2) Blocking and nonblocking statements: Blocking: =; works like a “regular” programming language; Nonblocking: <=; does all right-hand assignment simultaneously module blocking; reg [0:7] A, B; initial begin: init1 A = 3; #1 A = A + 1; B = A + 1; $display("Blocking: A= %b B= %b", A, B ); A = 3; #1 A <= A + 1; B <= A + 1; #1 $display("Non-blocking: A= %b B= %b", A, B ); end endmodule output: Blocking: A= B= Non-blocking: A= B=

Silicon Programming--Intro. to HDLs29 Tasks and functions Verilog has tasks, which are like procedures (do not return a value) Verilog also has functions, which must execute and return a value in 1 time step A task can invoke a function; a function cannot invoke a task Example: module tasks; task add; input a, b; output c; reg R; begin R = 1; if (a == b) c = 1 & R; else c = 0; end endtask initial begin: init1 reg p; add(1, 0, p); //invoke the task $display("p= %b", p); end endmodule (A similar function can also be defined)

Silicon Programming--Intro. to HDLs30 Timing: Like VHDL, Verilog uses discrete event simulation The following can advance timing (order of events may not be predictable): 1.gate or wire delay, if specified. 2. a delay control, introduced by the # symbol. 3. an event control, introduced by symbol. 4. the wait statement.

Silicon Programming--Intro. to HDLs31 Examples: Delay control: #10: A = A + 1; //delay 10 units before executing the assignment Event begin // controlled by any value change in reg r A = B&C; clock2) A = B&C; // controlled by positive edge of clock3) A = B&C; // controlled by negative edge of clock3 clock) begin A = B&C; end

Silicon Programming--Intro. to HDLs32 Control by a specific begin end To trigger the event: -> event6 Wait statement: wait until condition becomes true (level sensitive): wait (A == 3) begin A = B&C; end

Silicon Programming--Intro. to HDLs33 Fork / join: allow multiple threads Example: fork: three begin // code for thread 1 end begin // code for thread 2 end begin // code for thread 3 end join All 3 threads execute concurrently; when all are finished, jump to statement after “join”