CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

ENEL111 Digital Electronics
Verilog.
Simulation executable (simv)
The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
CPEN Digital System Design
Verilog Intro: Part 1.
Hardware Description Language (HDL)
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.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
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.
CSE 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
ECE 551 Digital System Design & Synthesis Lecture 08 The Synthesis Process Constraints and Design Rules High-Level Synthesis Options.
1 Verilog Digital Computer Logic Kashif Bashir WWW: http//:
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 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Verilog and VeriWell Bo Cheng.
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Verilog Lab This presentation includes some material that is selected from BUCKNELL VERILOG HANDBOOK. Instructor: Dr. Charles Liu Prepared by John Ren.
CS 61C L24 Verilog I (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
CSE241 R1 Verilog.1Kahng & Cichy, UCSD ©2003 CSE241 VLSI Digital Circuits Winter 2003 Recitation 1: Verilog Introduction.
CS 61C L30 Verilog I (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
Hardware Description Language HDL. 2 Hardware Description Language HDL  Describes circuits and systems in text. −As a software program.  Can be processed.
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.
B. RAMAMURTHY Hardware Description Language 8/2/
O VERVIEW OF DIGITAL SYSTEMS Hardware Description Language 1.
Hardware Description Language(HDL). Verilog simulator was first used beginning in 1985 and was extended substantially through The implementation.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
Hardware Design Environment Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
Introduction Verilog is a HARDWARE DESCRIPTION LANGUAGE (HDL) A hardware description language is a language or means used to describe or model a digital.
Tutorial 1 Combinational Logic Synthesis. Introduction to VHDL VHDL = Very high speed Hardware Description Language VHDL and Verilog are the industry.
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
CS 61C L4.2.2 Verilog II (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Verilog II Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
Module 1.2 Introduction to Verilog
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.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics Modeling with hardware description languages (HDLs).
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Modeling with hardware description languages (HDLs).
Verilog A Hardware Description Language (HDL ) is a machine readable and human readable language for describing hardware. Verilog and VHDL are HDLs.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
Introduction to ASIC flow and Verilog HDL
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 4: Testing, Dataflow Modeling Spring 2009.
FPGA-Based System Design Copyright  2004 Prentice Hall PTR Topics n Modeling with hardware description languages (HDLs).
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
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.
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
Reg and Wire:.
Discussion 2: More to discuss
Topics Modeling with hardware description languages (HDLs).
Hardware Description Languages: Verilog
Topics Modeling with hardware description languages (HDLs).
Introduction to Verilog
Lecture 1.3 Hardware Description Languages (HDLs)
Levels in computer design
Introduction to Digital System and Microprocessor Design
The Verilog Hardware Description Language
Introduction to Digital IC Design
COE 202 Introduction to Verilog
Presentation transcript:

CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson & Hennessy, ©2005 Some slides and/or pictures in the following are adapted from: slides ©2008 UCB 14

Hardware Description Languages Basic idea: Language constructs and code describe circuits –text-based way to describe and exchange designs Originally introduced for circuit simulation –can simulate the operation of a circuit before we build it in silicon (easier to debug a model of the circuit rather than the real circuit in silicon) Now “logic synthesis” tools exist for automatic generation of lower- level logic circuit designs from high-level specifications HDL specification SimulationSynthesis

Verilog HDL One of two popular standard language (VHDL is the other) –C-like syntax –widely used in industry For purposes of describing our circuits, we will use only a simple subset of the language –will focus just on those language constructs used for “structural composition” – sometimes referred as “gate-level modeling” –these constructs allow us to instantiate primitive logic elements (logic gates) on our own circuit elements and connect them together with wires –very similar to what we would do if we were to wire together physical logic gates in a hardware lab

Verilog Introduction The module describes a component in the circuit Two ways to describe –Structural Verilog List of components and how they are connected One-to-one correspondence to the actual circuit The way we will describe our circuits –Behavioral Verilog Describe what a component does, not how it does it Useful before details of the actual circuit is worked out Useful for describing the test algorithm for another circuit

Verilog Introduction Build up a hierarchy of modules. Top-level module is your entire design (or the environment to test your design) Warning! –Even though we use language constructs to describe hardware that doesn’t mean that hardware design is equivalent to writing software –Describing circuits is not equivalent to programming –Therefore, to help keep you out of trouble, when describing circuits, in this class we will restrict our use of Verilog to structural constructs

Two-input Multiplexor Example (DONE IN CLASS)

Verilog big idea: Time in code One difference from a programming language is that time is part of the language –part of what we are trying to describe is when things occur, or how long things will take In both structural and behavioral Verilog, determine time with #n : event will take place in n time units –structural: not #2 (notX, X) says notX does not change until time advanced 2 ns –Default unit is nanoseconds; can change

2-input Mux with delay module mux2 (in0, in1, select, out); input in0, in1, select; output out; wire s0, w0, w1; not #1 (s0, select); and #1 (w0, s0, in0), (w1, select, in1); or #1 (out, w0, w1); endmodule

Testing in Verilog Code examples so far define hardware modules Need separate code to test the module (just like C/Java) Since hardware is hard to build, major emphasis on testing in HDL Testing modules called “test benches” in Verilog Could design special hardware blocks to test other blocks – awkward! Use behavioral Verilog to help

Testing the Multiplexor Create a test module for mux2 module testmux; reg a, b, s; wire f; reg expected; mux2 myMux(.select(s),.in0(a),.in1(b),.out(f)); /* add testing code */ endmodule Outline: declare variable to use for connection from testbench, instantiate module, specify stimulus, compare output to expected, print results

Testing the Multiplexor Now we write the code to try different inputs by assigning to connections... begin #0 s=0; a=0; b=1; expected=0; #10 a=1; b=0; expected=1; #10 s=1; a=0; b=1; expected=1; #10 $stop end

Testing the Multiplexor Use $monitor to watch some signals and see every time they are updated... initial $monitor(“select=%b in0=%b in1=%b out=%b, expected out=%b time=%d”, s,a,b,f,expected, $time); endmodule $time is system function which gives current (simulated) time

Testing the Multiplexor module testmux; reg a, b, s; reg expected; mux2 myMux(.select(s),.in0(a),.in1(b),.out(f)); initial begin #0 s=0; a=0; b=1; expected=0; #10 a=1; b=0; expected=1; #10 s=1; a=0; b=1; expected=1; #10 $stop end initial $monitor(“select=%b in0=%b in1=%b out=%b,expected out=%b time=%d”,s,a,b,f,expected,$time); endmodule