Verilog Overview. Verilog Overview. Simple Example. Simple Example. Simple Example. Simple Example
|
|
- Christine Thomas
- 6 years ago
- Views:
Transcription
1 Verilog Overview Prof. MacDonald Verilog Overview C-Like Language used to describe hardware VHDL is main competitor VHDL is more rigorous and typed VHDL takes longer to write VHDL is used by 5% of USA Verilog was originally owned by Cadence Now an open language with standards Used for ASIC design and FPGA programming Verilog HDL : A Guide to Digital Design and Synthesis by Samir Palnitkar [3:] count; if (reset) count <= 4 b; module [3:] count; if (reset) count <= 4 b; module [3:] count; if (reset) count <= 4 b; module [3:] count; if (reset) count <= 4 b; module 1
2 [3:] count; if (reset) count <= 4 b; module [3:] count; if (reset) count <= 4 b; module [3:] count; top = (count == 4 b1111); if (reset) count <= 4 b; module [3:] count; if (reset) count <= 4 b; module Testbench Testbench any other s reset gen clock gen circuit under test (CUT) counter.v synthesizable code monitors `timescale 1ns/1ps module tb (); reg [3:] clk, reset; count; counter counter1 (.clk(clk),.reset(reset),.count(count),.top( )); initial clk = ; //clock generator initial forever #1 clk = ~clk; //clock generator initial //main stimulus block reset <= 1 b1; #5 reset <= 1 b; #1 $finish; unsynthesizable code artificial and for verification only waveform gen tb.v testbench $display("counter value is now %x at time %t",count, $time); initial $dumpfile("verilog.dmp"); $dumpvars; module 2
3 Output log (verilog.log) Output Waves Compiling source file "tb.v" Compiling source file "counter.v" Highest level modules: tb counter value is now at time 5 counter value is now 1 at time 15 counter value is now 2 at time 115 counter value is now 3 at time 125 counter value is now 4 at time 135 counter value is now 5 at time counter value is now 6 at time counter value is now 7 at time counter value is now 8 at time counter value is now 9 at time counter value is now a at time counter value is now b at time counter value is now c at time counter value is now d at time counter value is now e at time counter value is now f at time counter value is now at time counter value is now 1 at time VERILOG interrupt at time C1 > simulation events (use +profile or +listcounts option to count) CPU time:.2 secs to compile +.1 secs to link secs in simulation End of VERILOG-XL 3.4.p1 Nov 16, 24 9:58:9 Design Abstraction Simple Design Flow (ASIC/FPGA) High Level Behavioral C or Matlab Register Transfer Level (RTL) describes logic design with C like constructs modern definition is that RTL is synthesizable Gate level (netlist) describes design as a collection of logic gates connected together product of synthesizing RTL code Transistor level (circuit design) gates (primitives) used in synthesis details are hidden under the hood from logic designers standard cell library Specification Architecture RTL Coding Simulation Synthesis Place, Route, and Timing Verilog Data Types Combinatorial logic is represented by data type must be driven by an or continuous assignment can be connected to any number of s reg can represent either combinatorial or sequential regs in verilog are not necessarily flip-flops are defined by procedural blocks (initial or always) always blocks with posedge are sequential always blocks without posedge are combinatorial Initial blocks are for verification only (testbenches) Other less common data types include time, real, integer Verilog Data Types - busses Wires and Regs can be defined as vectors reg [7:] counter; // 8 bit register of flip-flops [1:2] data_bus; // 9 bit bus Can be individually addressed assign = data_bus[9]; or as a group assign data_bus_out = data_bus; 3
4 Verilog Data Types - Numbers Specification by <size> <base><number> Examples: [7:] data_bus = 8 hff; // 8 bit hex number [7:] data_bus = -1; // unsized eight ones [7:] data_bus = ; // unsized eight zeros [7:] data_bus = 8 d1; // 8-bit decimal number [7:] data_bus = 8 b11_11; // 8-bit binary Arithmetic Operators - +, -, /, *, % Arithmetic operators imply ALU in synthesis Plus operator for addition + Minus operator for subtraction Multiply operator for multiplication * Division operator / (rarely used except in TBs) Modulus operator % Ensure and precision is appropriate Underscore can be used for clarity Logical Operators Logical operators take two or more boolean vars and provide a single boolean answer. If is a vector, then false if all zeros, otherwise true AND is && OR is [3:] A = 4 d3; B = 1 b; C = A && B; // C = false or zero Bitwise Operators Bitwise operators work on each bit of vector AND & OR NOT ~ Exclusive OR ^ Exclusive NOR ~^ (compare) [3:] busa; // 11 [3:] busb; // 11 [3:] busaandb = busa & busb; // 1 Relational Operators In synthesis, relational operators imply comparison logic Compare two values and provide a boolean answer Equality == Greater than or Equal >= Greater than > Not equal!= Less than < Less than or equal to <= [7:] E = 8 d1111_111; [7:] F = 8 h1_11; assign A = (E == F); // A = assign B = (E!= F); // B = 1 Unary Operators Unary operators act on one variable Not inverts boolean AND provides the logical AND of entire bus OR provides the logical OR of entire bus XOR provides the exclusive OR of entire bus A; B; C; [7:] D = 8 b_1; [7:] E = 8 d1111_111; [7:] F = 8 h1_11; assign A = D; // A checks for 1s in D assign B = &E; // B checks for s in E assign C = ^F; // C is the parity of F 4
5 Shift Operators Shift <<, >> shifts the index of a bus <vector> >> <number of bits> [3:] bus = 4 ha; [3:] shifted_bus = bus >> 1; // result is 4 b11 or 4 h5 Alternative approach is using concatenation [3:] bus = 4 ha; [3:] shifted_bus = {1 b, bus[3:1]}; // result is 4 b11 Concatenation Operator Concatenation Operator {} Used to splice busses together [3:] A = 4 ha; [3:] B = 4 h5; [7:] C; assign C = {A, B}; // 8 ha5 OR assign C = {1 b, A, B[3:1]} // for shift with zero insert Codition Operator (Mux) Condition operator used to imply muxes assign <variable>= <select>? <option1> : <option>; Continuous Assignment Statements Assignment statements assign values to s and can be used to describe combinatorial circuits only. Any change on the right side, effects left side immediately if no delay is specified. Delay if specified is un-synthesizable and is for tb only. A = B? C : D; // A = C if B=1 else A = D This construct is dense and can be confusing if over-used. Ex. C; assign #2 C = (A &!B) (!A & B); Procedural Blocks Procedural blocks are used to define reg data types and can be used to describe combinatorial or sequential circuits. Procedural blocks can use C-like constructs and with always or initial key words. Each procedural block is an like an indepent thread all running in parallel. reg Q; CLK) if (reset) Q <= ; else Q <= D; CLK D Q Blocking vs. Non-blocking assignment Regs is procedural blocks can be defined with blocking or nonblocking assignment. Use non-blocking for flops and blocking for combinatorial. CLK) if (reset) Q <= ; else Q <= D; or B or Sel) if (Sel) Z = A; else Z = B; Very common interview question 5
6 Blocking vs. Non-blocking assignment Problem is that a race condition can exist when defining more than one flip-flop with one always block using blocking assignments. CLK) B = A; C = B; Other solution is to only define one reg in one always procedural block. Less confusing also. 1-> -> 1-> ->1 A B C Verilog Procedural Constructs If-then-else statement case statement for loop (not used often in synthesizable code) while loop (not used often in synthesizable code) System Calls $display dumps variable or string to standard $time tells current simulation time $stop finishes the simulation $dumpvar creates a waveform file for subsequent viewing clk1 State Machine Design Example Alternative Style (moore) x z s s2 X = Z = s1 1 Module detector (clk, reset, in, detect) clk, reset, in; detect; reg [1:] state; detect = (state == 3); if (reset) state <=; case(in or state) 2 b : if (X) state <= 1; else state <= ; 2 b1 : if (X) state <= 1; else state <= 2; 2 b1 : if (X) state <= 3; else state <= ; 2 b11 : if (X) state <= 1; else state <= 2; case module // Alternative Style (mealy) Test bench Module detector (clk, reset, in, detect) clk, reset, in; detect; reg [1:] state; detect = (state == 2) & in; if (reset) state <=; case(in or state) 2 b : if (X) state <= 1; else state <= ; 2 b1 : if (X) state <= 1; else state <= 2; 2 b1 : if (X) state <= 1; else state <= ; case module // stimulus test_bench sequence generator clock generator reset generator state_machine x clk z circuit under test checker optional Only state_machine is synthesizable. All else is for verification purposes only. 6
7 Testbench example - psuedocode module test_bench ( ); reg x, clk, reset; // reg declarations initial clk = ; always forever #1 clk = ~clk; // clk generation initial // sequence generation reset = 1; x = ; #(8) reset = clk) x = clk) x = clk) x = ; state_machine U (.in(x),.clk(clk),.detect( ),.reset(reset)); module Testbench Tasks Task adc_transaction ( ); [7:] convert) serial_data <= sclk) serial_data <= sclk) serial_data <= sclk) serial_data <= sclk) serial_data <= sclk) serial_data <= sclk) serial_data <= sclk) serial_data <= sclk) serial_data <= sample[]; $display( just transferred %x from ADC,); task Testbench monitors for the log file tb.dut.data_signal) $display( %d, %x, %x, %t, tb.dut.count, tb.dut.var1, tb.dut.var2, tb.dut.var3, $time); These statements provide crucial information about the sim without having to check the waveforms. Hierarchy Example (contrived) module top (clk, reset, in1, out1, out2) // should be name of file top.v clk, reset, in1; // all ports as s defined out1, out2; // all ports as s defined reg out1; // s can redefine as reg reg [1:] count; // this is an internal reg out2; // s can redefined as [1:] new_count = 2 b1; // this in an internal if(reset) out1 <= ; else if (new_count == 2 b1) out1 <= in1 && out2; else out1 <= out1; count <= count + 1; assign out2 = in1 && out1; bottom bottom1 (.ina(new_count),.outb(count)); //instantiation module Hierarchy Example (contrived page 2) module bottom (ina, outb) // should be name of file bottom.v [1:] ina; // all ports as s defined [1:] outb; // all ports as s defined [1:] outb; // s can be defined as assign outb = ina + 2 b1; // could be combined with above module Continuous statements always result in combinatorial logic - no flops or latches. start; assign start = ready && request; 7
8 Continuous statements always result in combinatorial logic. Here is a 32 bit comparator. Note that the size of the netlist doesn t necessarily correspond to the number of lines of RTL Wire [31:] a ; Wire [31:] b ; Wire the_same ; Always block without posedge statement is combinatorial. or S or E) else A = E; // verilog 2 else A = E; Assign the_same = (a == b); Always block without posedge statement is combinatorial. This example will result in an ALU function (potentially very large). Wire [31:] ina; Wire [31:] inb; Reg [31:] out; or inb or subract) if (subtract) out = ina + (!inb + 32 h1); else out = ina + inb; Always block without posedge statement is combinatorial. This example will result in decoder (8 3- AND gates). case (index) : decoder_out = 8 h1; 1: decoder_out = 8 h2; 2: decoder_out = 8 h4; 3: decoder_out = 8 h8; 4: decoder_out = 8 h1; 5: decoder_out = 8 h2; 6: decoder_out = 8 h4; 7: decoder_out = 8 h8; case Always block without posedge statement is combinatorial. This example will has a problem. All cases must be specified. Here if enable is high, Q=D. What happens if enable is low? Synthesis will add a latch to remember the old value of Q when it is undefined by the if statement. Latches are rarely meant to be used in logic and are a good sign of a problem. Always block with posedge clk statement is sequential. This example will result in a simple non-resetable flip-flop. Flip flops that define state or control should be reset, however flip flops in the datapath can be left un-reset if data naturally flows through to initialize. if (enable) Q = D; Very common interview question A <= E; 8
9 Always block with posedge clk statement is sequential. This example will result in a synchronous resetable flip-flop. The reset requires the clock edge to take effect. Always block with posedge clk statement is sequential. This example will result in a asynchronously resettable flip-flop. The reset will take effect immediately without requiring a clock. if (!resetn) A <= ; else A <= E; resetn A clk The decision between asynch and synch reseting is controversial. Potential interview question. clk or negedge reset) if (!resetn) A <= ; else A <= E; A clk resetn Asynch vs Synch Reset Advantages and disadvantages to both styles: Asynch flip-flops do not require the clock and thus avoid problems at power up where Vdd is available but not yet a clock. Logic and IO are therefore forced into a known state immediately avoiding shorts with tristatable logic and other problems. The problem with asynch flip-flops is that any glitch from noise on the signal will result in an inadvertent reset of the state as they are edge-triggered. Synch flip-flops are only sampled on the clock edge and with proper timing will never see a glitch and are therefore considered more robust. Potential interview question. resetn A clk clk A resetn Always block with posedge clk statement is sequential but can include some combinatorial logic as shown. if (reset) A <= ; else A <= E && C; E C clk Hold Time Violation Review Shift register for parallel to serial conversion susceptible to hold time violations module p2s (in, out, load, clk, reset) load, clk, reset; [7:] in; out; reg [7:] parallel_data; out = parallel_data[7]; if (reset) parallel_data <= ; else if (load) parallel_data <= in; else parallel_data <= {parallel[6:], 1 b}; module d1 = 1 clk1 clock tree d2 clk2 d3 Caused by clock skew Sinister problem Cannot fix with frequency Clock synthesis and balancing very important Good case: No clock skew d2 1 -> d3 -> 1 Bad case: 12ns clock skew d2 1 -> d3 -> 9
10 - Latches Examples rolling average Always block with posedge clk statement is sequential. This example will result in a transparent latch. Very unusual in RTL. Typically, latches in the synthesized netlist are the sign of mistakes. or in) //unusual but intentional latch if (clk) A = in; else A = A; // typical unintentional latch if (enable) A = in; average <= average[15:] + {{8{data_[15]}}, data_[15:8]} {{8{average[15]}}, average[15:8]}; average = average + (1/256) * data_ (1/256) * average Handles signed s // intentional combinatorial mux if (enable) A = in1; else A = in2 Examples parallel to serial Examples signed multiplier [7:] reg [7:] parallel_; serial_; parallel_reg; if(reset) parallel_reg <= ; else if (shift_left_enable) parallel_reg <= {parallel [6:], serial_}; else if (shift_right_enable) parallel_reg <= {serial_, parallel [7:1]}; else if (load_enable) parallel_reg <= parallel_; else parallel_reg <= parallel_reg; reg [15:] product; [7:] an = a[7]? (~a + 1) : a; [7:] bn = b[7]? (~b + 1) : b; or b or an or bn) if(~b[7] && ~a[7]) product = a * b; else if (a[7] && ~b[7]) product = an * b; else if (~a[7] && b[7]) product = a * bn; else product = an * bn; Resets to zero. Shifts to the left on every clock edge with shift_left_enable high. Shifts to the right on every clock edge with shift_right_enable high. Broad side loads with load_enable Hold value otherwise. Verilog Design Guidelines Most common student mistakes Use meaningful names for signals and variables Use I_ and O_ for port names I for / O for Modify regs in only one always block Constants and Parameters should be all caps Never use tabs but do line up text with spaces Avoid mixing positive and negative edge-triggered flip-flops Use parentheses to optimize logic structure Use continuous assign statements for simple combo logic. Use non-blocking for sequential and blocking for combo logic Define if-else/case statements explicitly all vars for all cases Always instantiate modules with explicit port listing. Synthesizable code should not have delays included (#) only have always blocks and no initial blocks Define a reg in only one always block (otherwise ambiguity) for loops are for spatial repeating - not temporal Fully specify variables within an always block for readability i.e. if (X) Y = A, else Y = B. Define Y in all possible cases. this may result in unwanted latches (as opposed to flip-flops) Fully specify sensitivity list in combinatorial always blocks Blocking vs. Non-blocking assignments rule of thumb if it has a posedge, use the <= because it is sequential otherwise use the = because it is combinational Really doesn t matter if you only define a single variable in a block 1
11 Examples of bad code In any always block, define all variables for all cases. Not doing so can cause latches and in general is hard to follow. Furthermore, should have one always block per reg for clarity. or D or S or E) if (S) A = D; B = C; else A = E; BAD or D or S or E or F) if (S) A = D; B = C; else A = E; B = F; BETTER or S or E) else A = E; or S or E) if (S) B = C; else B = F; BEST Examples of bad code Define any variable in only one always block. Otherwise, simulation and synthesis will mismatch. or S) or E) if (G) A = E; or E or G or S) else if (G) A = E; else A = K; Examples of bad code Reference Define only one if-else statement per always block. Define only one reg per always block. Better to have one block for each variable and one variable per block. or S or K or J or E or C or G ) else if A = J; else A = K; if (G) B <= E; else B <= C; or E or G or S) else if A = J; else A = K; or E or C) if (G) B = E; else B = C; Verilog 21 Standard new features added port list and / declarations combined sensitivity lists in always blocks need not be listed Good reference web pages for Verilog opencores.com original company most used synthesis tool commonly used simulator new synthesis tool FPGA company FPGA company 11
Synthesizable Verilog
Synthesizable Verilog Courtesy of Dr. Edwards@Columbia, and Dr. Franzon@NCSU http://csce.uark.edu +1 (479) 575-6043 yrpeng@uark.edu Design Methodology Structure and Function (Behavior) of a Design HDL
More informationECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog
ECE 2300 Digital Logic & Computer Organization Spring 2018 More Sequential Logic Verilog Lecture 7: 1 Announcements HW3 will be posted tonight Prelim 1 Thursday March 1, in class Coverage: Lectures 1~7
More informationVerilog for High Performance
Verilog for High Performance Course Description This course provides all necessary theoretical and practical know-how to write synthesizable HDL code through Verilog standard language. The course goes
More informationVerilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design
Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two major languages Verilog (IEEE 1364), latest version is
More informationA Brief Introduction to Verilog Hardware Definition Language (HDL)
www.realdigital.org A Brief Introduction to Verilog Hardware Definition Language (HDL) Forward Verilog is a Hardware Description language (HDL) that is used to define the structure and/or behavior of digital
More informationFPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1
FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital
More informationLecture 15: System Modeling and Verilog
Lecture 15: System Modeling and Verilog Slides courtesy of Deming Chen Intro. VLSI System Design Outline Outline Modeling Digital Systems Introduction to Verilog HDL Use of Verilog HDL in Synthesis Reading
More informationSpiral 1 / Unit 4 Verilog HDL. Digital Circuit Design Steps. Digital Circuit Design OVERVIEW. Mark Redekopp. Description. Verification.
1-4.1 1-4.2 Spiral 1 / Unit 4 Verilog HDL Mark Redekopp OVERVIEW 1-4.3 1-4.4 Digital Circuit Design Steps Digital Circuit Design Description Design and computer-entry of circuit Verification Input Stimulus
More informationIntroduction To Verilog Design. Chun-Hung Chou
Introduction To Verilog Design Chun-Hung Chou 1 Outline Typical Design Flow Design Method Lexical Convention Data Type Data Assignment Event Control Conditional Description Register Description Synthesizable
More informationDigital Design with SystemVerilog
Digital Design with SystemVerilog Prof. Stephen A. Edwards Columbia University Spring 25 Synchronous Digital Design Combinational Logic Sequential Logic Summary of Modeling Styles Testbenches Why HDLs?
More informationSchematic design. Gate level design. 0 EDA (Electronic Design Assistance) 0 Classical design. 0 Computer based language
1 / 15 2014/11/20 0 EDA (Electronic Design Assistance) 0 Computer based language 0 HDL (Hardware Description Language) 0 Verilog HDL 0 Created by Gateway Design Automation Corp. in 1983 First modern hardware
More informationLecture 32: SystemVerilog
Lecture 32: SystemVerilog Outline SystemVerilog module adder(input logic [31:0] a, input logic [31:0] b, output logic [31:0] y); assign y = a + b; Note that the inputs and outputs are 32-bit busses. 17:
More informationVerilog introduction. Embedded and Ambient Systems Lab
Verilog introduction Embedded and Ambient Systems Lab Purpose of HDL languages Modeling hardware behavior Large part of these languages can only be used for simulation, not for hardware generation (synthesis)
More informationThe Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science
The Verilog Language COMS W4995-02 Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science The Verilog Language Originally a modeling language for a very efficient event-driven
More informationECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016
ECE 353 Lab 4 Verilog Review Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016 Recall What You Will Do Design and implement a serial MIDI receiver Hardware in
More informationN-input EX-NOR gate. N-output inverter. N-input NOR gate
Hardware Description Language HDL Introduction HDL is a hardware description language used to design and document electronic systems. HDL allows designers to design at various levels of abstraction. It
More informationEECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis
EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis Jan 31, 2012 John Wawrzynek Spring 2012 EECS150 - Lec05-verilog_synth Page 1 Outline Quick review of essentials of state elements Finite State
More informationLab 7 (All Sections) Prelab: Introduction to Verilog
Lab 7 (All Sections) Prelab: Introduction to Verilog Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work 1 Objective The
More informationIntroduction To HDL. Verilog HDL. Debdeep Mukhopadhyay Dept of CSE, IIT Madras 1
Introduction To HDL Verilog HDL Debdeep Mukhopadhyay debdeep@cse.iitm.ernet.in Dept of CSE, IIT Madras 1 How it started! Gateway Design Automation Cadence purchased Gateway in 1989. Verilog was placed
More informationDigital Design with FPGAs. By Neeraj Kulkarni
Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic
More informationINSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING
INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad - 00 0 ELECTRONICS AND COMMUNICATIONS ENGINEERING QUESTION BANK Course Name : DIGITAL DESIGN USING VERILOG HDL Course Code : A00 Class : II - B.
More informationVerilog. Verilog for Synthesis
Verilog Verilog for Synthesis 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog enhanced version Verilog-XL 1987: Verilog-XL becoming more popular
More informationChapter 4 :: Topics. Introduction. SystemVerilog. Hardware description language (HDL): allows designer to specify logic function only.
Chapter 4 :: Hardware Description Languages Digital Design and Computer Architecture David Money Harris and Sarah L. Harris Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
More informationECE 353 Lab 3 (Verilog Design Approach)
ECE 353 Lab 3 (Verilog Design Approach) Prof Daniel Holcomb Recall What You Will Do Design and implement a serial MIDI receiver Hardware in an Altera Complex Programmable Logic Device (CPLD) MAX 7000S
More informationVHDL: RTL Synthesis Basics. 1 of 59
VHDL: RTL Synthesis Basics 1 of 59 Goals To learn the basics of RTL synthesis. To be able to synthesize a digital system, given its VHDL model. To be able to relate VHDL code to its synthesized output.
More informationIntroduction to Verilog HDL
Introduction to Verilog HDL Ben Abdallah Abderazek National University of Electro-communications, Tokyo, Graduate School of information Systems May 2004 04/09/08 1 What you will understand after having
More informationECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb UMass Amherst Fall 2017
ECE 353 Lab 4 Verilog Review Professor Daniel Holcomb UMass Amherst Fall 2017 What You Will Do In Lab 4 Design and implement a serial MIDI receiver Hardware in an Altera Complex Programmable Logic Device
More informationSynthesis of Combinational and Sequential Circuits with Verilog
Synthesis of Combinational and Sequential Circuits with Verilog What is Verilog? Hardware description language: Are used to describe digital system in text form Used for modeling, simulation, design Two
More informationComputer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog
Verilog Radek Pelánek and Šimon Řeřucha Contents 1 Computer Aided Design 2 Basic Syntax 3 Gate Level Modeling 4 Behavioral Modeling Computer Aided Design Hardware Description Languages (HDL) Verilog C
More informationSpeaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23
98-1 Under-Graduate Project Synthesis of Combinational Logic Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23 What is synthesis? Outline Behavior Description for Synthesis Write Efficient HDL
More informationDepartment of Computer Science and Electrical Engineering. Intro to Verilog II
Department of Computer Science and Electrical Engineering Intro to Verilog II http://6004.csail.mit.edu/6.371/handouts/l0{2,3,4}.pdf http://www.asic-world.com/verilog/ http://www.verilogtutorial.info/
More informationVerilog for Synthesis Ing. Pullini Antonio
Verilog for Synthesis Ing. Pullini Antonio antonio.pullini@epfl.ch Outline Introduction to Verilog HDL Describing combinational logic Inference of basic combinational blocks Describing sequential circuits
More informationLab 7 (All Sections) Prelab: Verilog Review and ALU Datapath and Control
Lab 7 (All Sections) Prelab: Verilog Review and ALU Datapath and Control Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic
More informationMLR Institute of Technology
MLR Institute of Technology Laxma Reddy Avenue, Dundigal, Quthbullapur (M), Hyderabad 500 043 Course Name Course Code Class Branch ELECTRONICS AND COMMUNICATIONS ENGINEERING QUESTION BANK : DIGITAL DESIGN
More informationLecture 12 VHDL Synthesis
CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?
More informationSunburst Design - Verilog-2001 Design & Best Coding Practices by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc.
World Class Verilog & SystemVerilog Training Sunburst Design - Verilog-2001 Design & Best Coding Practices by Recognized Verilog & SystemVerilog Guru, Cliff Cummings of Sunburst Design, Inc. Cliff Cummings
More informationContents. Appendix D Verilog Summary Page 1 of 16
Appix D Verilog Summary Page 1 of 16 Contents Appix D Verilog Summary... 2 D.1 Basic Language Elements... 2 D.1.1 Keywords... 2 D.1.2 Comments... 2 D.1.3 Identifiers... 2 D.1.4 Numbers and Strings... 3
More informationstructure syntax different levels of abstraction
This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital
More informationHere is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this
This and the next lectures are about Verilog HDL, which, together with another language VHDL, are the most popular hardware languages used in industry. Verilog is only a tool; this course is about digital
More informationVHDL for Synthesis. Course Description. Course Duration. Goals
VHDL for Synthesis Course Description This course provides all necessary theoretical and practical know how to write an efficient synthesizable HDL code through VHDL standard language. The course goes
More informationA Verilog Primer. An Overview of Verilog for Digital Design and Simulation
A Verilog Primer An Overview of Verilog for Digital Design and Simulation John Wright Vighnesh Iyer Department of Electrical Engineering and Computer Sciences College of Engineering, University of California,
More informationHardware Design Environments. Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University
Hardware Design Environments Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University Outline Welcome to COE 405 Digital System Design Design Domains and Levels of Abstractions Synthesis
More informationThis Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)
Last Lecture The basic component of a digital circuit is the MOS transistor Transistor have instrinsic resistance and capacitance, so voltage values in the circuit take some time to change ( delay ) There
More informationEN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages
EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2014 1 Introduction to Verilog
More informationCAD for VLSI Design - I. Lecture 21 V. Kamakoti and Shankar Balachandran
CAD for VLSI Design - I Lecture 21 V. Kamakoti and Shankar Balachandran Overview of this Lecture Understanding the process of Logic synthesis Logic Synthesis of HDL constructs Logic Synthesis What is this?
More informationChapter 2 Using Hardware Description Language Verilog. Overview
Chapter 2 Using Hardware Description Language Verilog CSE4210 Winter 2012 Mokhtar Aboelaze based on slides by Dr. Shoab A. Khan Overview Algorithm development isa usually done in MATLAB, C, or C++ Code
More informationWhat is Verilog HDL? Lecture 1: Verilog HDL Introduction. Basic Design Methodology. What is VHDL? Requirements
What is Verilog HDL? Lecture 1: Verilog HDL Introduction Verilog Hardware Description Language(HDL)? A high-level computer language can model, represent and simulate digital design Hardware concurrency
More informationVerilog Nonblocking Assignments with Delays - Myths & Mysteries
Verilog Nonblocking Assignments with Delays - Myths & Mysteries Clifford E. Cummings, Inc. cliffc@sunburst-design.com www.sunburst-design.com 2 of 67 Agenda IEEE 1364 reference model & event queue Review
More informationSt.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad
St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad-500 014 Subject: Digital Design Using Verilog Hdl Class : ECE-II Group A (Short Answer Questions) UNIT-I 1 Define verilog HDL? 2 List levels of
More informationCSE140L: Components and Design Techniques for Digital Systems Lab. Verilog HDL. Instructor: Mohsen Imani UC San Diego. Source: Eric Crabill, Xilinx
CSE140L: Components and Design Techniques for Digital Systems Lab Verilog HDL Instructor: Mohsen Imani UC San Diego Source: Eric Crabill, Xilinx 1 Hardware description languages Used to describe & model
More informationGraduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:
Synthesizable Coding of Verilog Lecturer: Date: 2009.03.18 ACCESS IC LAB Outline Basic concepts of logic synthesis Synthesizable Verilog coding subset Verilog coding practices Coding for readability Coding
More informationWriting Circuit Descriptions 8
8 Writing Circuit Descriptions 8 You can write many logically equivalent descriptions in Verilog to describe a circuit design. However, some descriptions are more efficient than others in terms of the
More informationVerilog Coding Guideline
Verilog Coding Guideline Digital Circuit Lab TA: Po-Chen Wu Outline Introduction to Verilog HDL Verilog Syntax Combinational and Sequential Logics Module Hierarchy Write Your Design Finite State Machine
More informationRecommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto
Recommed Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto DISCLAIMER: The information contained in this document does NOT contain
More informationModeling Sequential Circuits in Verilog
Modeling Sequential Circuits in Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Presentation Outline Modeling Latches and Flip-Flops Blocking versus
More informationLecture #2: Verilog HDL
Lecture #2: Verilog HDL Paul Hartke Phartke@stanford.edu Stanford EE183 April 8, 2002 EE183 Design Process Understand problem and generate block diagram of solution Code block diagram in verilog HDL Synthesize
More informationVHDL. VHDL History. Why VHDL? Introduction to Structured VLSI Design. Very High Speed Integrated Circuit (VHSIC) Hardware Description Language
VHDL Introduction to Structured VLSI Design VHDL I Very High Speed Integrated Circuit (VHSIC) Hardware Description Language Joachim Rodrigues A Technology Independent, Standard Hardware description Language
More informationARM 64-bit Register File
ARM 64-bit Register File Introduction: In this class we will develop and simulate a simple, pipelined ARM microprocessor. Labs #1 & #2 build some basic components of the processor, then labs #3 and #4
More informationVerilog Module 1 Introduction and Combinational Logic
Verilog Module 1 Introduction and Combinational Logic Jim Duckworth ECE Department, WPI 1 Module 1 Verilog background 1983: Gateway Design Automation released Verilog HDL Verilog and simulator 1985: Verilog
More informationVerilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering VERILOG FUNDAMENTALS HDLs HISTORY HOW FPGA & VERILOG ARE RELATED CODING IN VERILOG HDLs HISTORY HDL HARDWARE DESCRIPTION LANGUAGE
More informationLab #1. Topics. 3. Introduction to Verilog 2/8/ Programmable logic. 2. Design Flow. 3. Verilog --- A Hardware Description Language
Lab #1 Lecture 8, 9, &10: FPGA Dataflow and Verilog Modeling February 9, 11, 13, 2015 Prof R Iris Bahar Lab #1 is posted on the webpage wwwbrownedu/departments/engineering/courses/engn1640 Note for problem
More informationVerilog HDL. A Guide to Digital Design and Synthesis. Samir Palnitkar. SunSoft Press A Prentice Hall Title
Verilog HDL A Guide to Digital Design and Synthesis Samir Palnitkar SunSoft Press A Prentice Hall Title Table of Contents About the Author Foreword Preface Acknowledgments v xxxi xxxiii xxxvii Part 1:
More informationDigital System Design with SystemVerilog
Digital System Design with SystemVerilog Mark Zwolinski AAddison-Wesley Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Capetown Sydney Tokyo
More informationDigital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University
Digital Circuit Design and Language Datapath Design Chang, Ik Joon Kyunghee University Typical Synchronous Design + Control Section : Finite State Machine + Data Section: Adder, Multiplier, Shift Register
More informationWhy Should I Learn This Language? VLSI HDL. Verilog-2
Verilog Why Should I Learn This Language? VLSI HDL Verilog-2 Different Levels of Abstraction Algorithmic the function of the system RTL the data flow the control signals the storage element and clock Gate
More informationENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations
ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2017 1 Topics 1. Programmable logic
More informationTOPIC : Verilog Synthesis examples. Module 4.3 : Verilog synthesis
TOPIC : Verilog Synthesis examples Module 4.3 : Verilog synthesis Example : 4-bit magnitude comptarator Discuss synthesis of a 4-bit magnitude comparator to understand each step in the synthesis flow.
More informationIntroduction. Why Use HDL? Simulation output. Explanation
Introduction Verilog HDL is a Hardware Description Language (HDL) HDL is a language used to describe a digital system, for example, a computer or a component of a computer. Most popular HDLs are VHDL and
More informationChapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>
Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
More informationOnline Verilog Resources
EECS 427 Discussion 6: Verilog HDL Reading: Many references EECS 427 F08 Discussion 6 1 Online Verilog Resources ASICs the book, Ch. 11: http://www.ge.infn.it/~pratolo/verilog/verilogtutorial.pdf it/ pratolo/verilog/verilogtutorial
More informationLecture 3: Modeling in VHDL. EE 3610 Digital Systems
EE 3610: Digital Systems 1 Lecture 3: Modeling in VHDL VHDL: Overview 2 VHDL VHSIC Hardware Description Language VHSIC=Very High Speed Integrated Circuit Programming language for modelling of hardware
More informationIntroduction to Verilog/System Verilog
NTUEE DCLAB Feb. 27, 2018 Introduction to Verilog/System Verilog Presenter: Yao-Pin Wang 王耀斌 Advisor: Prof. Chia-Hsiang Yang 楊家驤 Dept. of Electrical Engineering, NTU National Taiwan University What is
More informationArithmetic Operators There are two types of operators: binary and unary Binary operators:
Verilog operators operate on several data types to produce an output Not all Verilog operators are synthesible (can produce gates) Some operators are similar to those in the C language Remember, you are
More informationDate Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits
Name: Instructor: Engr. Date Performed: Marks Obtained: /10 Group Members (ID):. Checked By: Date: Experiment # 11 Introduction to Verilog II Sequential Circuits OBJECTIVES: To understand the concepts
More informationECE Digital System Design & Synthesis Exercise 1 - Logic Values, Data Types & Operators - With Answers
ECE 601 - Digital System Design & Synthesis Exercise 1 - Logic Values, Data Types & Operators - With Answers Fall 2001 Final Version (Important changes from original posted Exercise 1 shown in color) Variables
More informationHDLs and SystemVerilog. Digital Computer Design
HDLs and SystemVerilog Digital Computer Design Logic Arrays Gates can be organized into regular arrays. If the connections are made programmable, these logic arrays can be configured to perform any function
More informationENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations
ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations Professor Sherief Reda http://scale.engin.brown.edu School of Engineering Brown University Spring 2016 1 Topics 1. Programmable logic
More informationECE 4514 Digital Design II. Spring Lecture 13: Logic Synthesis
ECE 4514 Digital Design II A Tools/Methods Lecture Second half of Digital Design II 9 10-Mar-08 L13 (T) Logic Synthesis PJ2 13-Mar-08 L14 (D) FPGA Technology 10 18-Mar-08 No Class (Instructor on Conference)
More informationRegister Transfer Level in Verilog: Part I
Source: M. Morris Mano and Michael D. Ciletti, Digital Design, 4rd Edition, 2007, Prentice Hall. Register Transfer Level in Verilog: Part I Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National
More information101-1 Under-Graduate Project Digital IC Design Flow
101-1 Under-Graduate Project Digital IC Design Flow Speaker: Ming-Chun Hsiao Adviser: Prof. An-Yeu Wu Date: 2012/9/25 ACCESS IC LAB Outline Introduction to Integrated Circuit IC Design Flow Verilog HDL
More informationLab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog
Lab 7 (Sections 300, 301 and 302) Prelab: Introduction to Verilog Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received unauthorized aid on this academic work
More informationIntroduction to Verilog HDL. Verilog 1
Introduction to HDL Hardware Description Language (HDL) High-Level Programming Language Special constructs to model microelectronic circuits Describe the operation of a circuit at various levels of abstraction
More informationDesign Using Verilog
EGC220 Design Using Verilog Baback Izadi Division of Engineering Programs bai@engr.newpaltz.edu Basic Verilog Lexical Convention Lexical convention are close to C++. Comment // to the of the line. /* to
More informationa, b sum module add32 sum vector bus sum[31:0] sum[0] sum[31]. sum[7:0] sum sum overflow module add32_carry assign
I hope you have completed Part 1 of the Experiment. This lecture leads you to Part 2 of the experiment and hopefully helps you with your progress to Part 2. It covers a number of topics: 1. How do we specify
More informationChapter 4. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 4 <1>
Chapter 4 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 4 Chapter 4 :: Topics Introduction Combinational Logic Structural Modeling Sequential
More informationTwo HDLs used today VHDL. Why VHDL? Introduction to Structured VLSI Design
Two HDLs used today Introduction to Structured VLSI Design VHDL I VHDL and Verilog Syntax and ``appearance'' of the two languages are very different Capabilities and scopes are quite similar Both are industrial
More information271/471 Verilog Tutorial
271/471 Verilog Tutorial Prof. Scott Hauck, last revised 9/15/14 Introduction The following tutorial is inted to get you going quickly in circuit design in Verilog. It isn t a comprehensive guide to System
More informationIntroduction To HDL. Verilog HDL. Debdeep Mukhopadhyay How it started!
Introduction To HDL Verilog HDL Debdeep Mukhopadhyay debdeep@cse.iitm.ernet.in Dept of CSE, IIT Madras 1 How it started! Gateway Design Automation Cadence purchased Gateway in 1989. Verilog was placed
More informationLecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines
Lecture 3 Behavioral Modeling Sequential Circuits Registers Counters Finite State Machines Behavioral Modeling Behavioral Modeling Behavioral descriptions use the keyword always, followed by optional event
More informationIn this lecture, we will go beyond the basic Verilog syntax and examine how flipflops and other clocked circuits are specified.
1 In this lecture, we will go beyond the basic Verilog syntax and examine how flipflops and other clocked circuits are specified. I will also introduce the idea of a testbench as part of a design specification.
More informationSpeaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28
99-1 Under-Graduate Project Verilog Simulation & Debugging Tools Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28 ACCESS IC LAB Outline Basic Concept of Verilog HDL Gate Level Modeling
More informationCHAPTER - 2 : DESIGN OF ARITHMETIC CIRCUITS
Contents i SYLLABUS osmania university UNIT - I CHAPTER - 1 : BASIC VERILOG HDL Introduction to HDLs, Overview of Digital Design With Verilog HDL, Basic Concepts, Data Types, System Tasks and Compiler
More information271/469 Verilog Tutorial
271/469 Verilog Tutorial Prof. Scott Hauck, last revised 8/14/17 Introduction The following tutorial is inted to get you going quickly in circuit design in Verilog. It isn t a comprehensive guide to System
More informationChapter 9: Sequential Logic Modules
Chapter 9: Sequential Logic Modules Prof. Soo-Ik Chae Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008, John Wiley 9-1 Objectives After completing this chapter, you will be able
More informationVERILOG QUICKSTART. Second Edition. A Practical Guide to Simulation and Synthesis in Verilog
VERILOG QUICKSTART A Practical Guide to Simulation and Synthesis in Verilog Second Edition VERILOG QUICKSTART A Practical Guide to Simulation and Synthesis in Verilog Second Edition James M. Lee SEVA Technologies
More informationSynthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis
Synthesis of Language Constructs 1 Nets Nets declared to be input or output ports are retained Internal nets may be eliminated due to logic optimization User may force a net to exist trireg, tri0, tri1
More informationHardware description languages
Specifying digital circuits Schematics (what we ve done so far) Structural description Describe circuit as interconnected elements Build complex circuits using hierarchy Large circuits are unreadable Hardware
More informationVerilog HDL Introduction
EEE3050 Theory on Computer Architectures (Spring 2017) Prof. Jinkyu Jeong Verilog HDL Introduction 2017.05.14 TA 이규선 (GYUSUN LEE) / 안민우 (MINWOO AHN) Modules The Module Concept Basic design unit Modules
More informationECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS
ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS Note: Closed book no notes or other material allowed apart from the one
More informationLecture 11 Logic Synthesis, Part 2
Lecture 11 Logic Synthesis, Part 2 Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/ Write Synthesizable Code Use meaningful names for signals and variables
More information