B. RAMAMURTHY Hardware Description Language 8/2/2015 1.

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Verilog Intro: Part 1.
Combinational Logic with Verilog Materials taken from: Digital Design and Computer Architecture by David and Sarah Harris & The Essentials of Computer.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
CSE 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
 HDLs – Verilog and Very High Speed Integrated Circuit (VHSIC) HDL  „ Widely used in logic design  „ Describe hardware  „ Document logic functions.
Introduction to Verilog
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
Computer Organization Lecture Set – 03 Introduction to Verilog Huei-Yung Lin.
Digital System Design EEE344 Lecture 3 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
Lecture # 12 University of Tehran
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
ECE 2372 Modern Digital System Design
ECE/CS 352 Digital Systems Fundamentals
Verilog HDL. Hardware Description Language  HDL – a “language” for describing hardware  Two industry IEEE standards: Verilog VHDL (Very High Speed Integrated.
HCL and ALU תרגול 10. Overview of Logic Design Fundamental Hardware Requirements – Communication: How to get values from one place to another – Computation.
Verilog HDL: A solution for Everybody By, Anil Kumar Ram Rakhyani
Verilog Language Concepts
CS 3850 Lecture 3 The Verilog Language. 3.1 Lexical Conventions The lexical conventions are close to the programming language C++. Comments are designated.
C ONTINUOUS A SSIGNMENTS. C OMBINATIONAL L OGIC C IRCUITS each output of a Combinational Logic Circuit  A function of the inputs - Mapping functions.
CPEN Digital System Design
EEE2243 Digital System Design Chapter 3: Verilog HDL (Combinational) by Muhazam Mustapha, January 2011.
Module 1.2 Introduction to Verilog
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
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.
Use of HDLs in Teaching of Computer Hardware Courses Zvonko Vranesic and Stephen Brown University of Toronto.
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
Introduction to Verilog. Data Types A wire specifies a combinational signal. – Think of it as an actual wire. A reg (register) holds a value. – A reg.
Introduction to Verilog
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Chapter 3: Dataflow Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 3-1 Chapter 3: Dataflow Modeling.
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,
Introduction to Verilog COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals.
Hardware Description Languages: Verilog
Hardware Description Language
Reg and Wire:.
Introduction to Verilog
Discussion 2: More to discuss
Verilog Introduction Fall
KARTHIK.S Lecturer/ECE S.N.G.C.E
Lecture 2 Supplement Verilog-01
Hardware Description Languages: Verilog
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Introduction to Verilog
Hardware Description Language
Hardware Description Language
Hardware Description Language
Introduction to Verilog
Hardware Description Language
Introduction to Verilog
Hardware Description Language
Supplement on Verilog adder examples
Chapters 4 – Part3: Verilog – Part 1
Introduction to Verilog
Hardware Description Language
Introduction to Verilog
EEE2243 Digital System Design Chapter 1: Verilog HDL (Combinational) by Muhazam Mustapha, February 2012.
COE 202 Introduction to Verilog
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

B. RAMAMURTHY Hardware Description Language 8/2/2015 1

HDL 8/2/ Your goal in this class is to be able to design hardware organization of digital processors. How do you specify this hardware design or model, its components/modules, instances and interface (ports) to the external world?  Using a language that we can easily specify and understand.  VHDL is a older language  Verilog is commonly used

HDL (contd.) 8/2/ As explained in your text: The principal feature of a hardware description language is that it contains the capability to describe the function of a piece of hardware independently of the implementation. The great advance with modern HDLs was the recognition that a single language could be used to describe the function of the design and also to describe the implementation. This allows the entire design process to take place in a single language, and thus a single representation of the design.

Verilog 8/2/ The Verilog Hardware Description Language, usually just called Verilog, was designed and first implemented by Phil Moorby at Gateway Design Automation in 1984 and Verilog simulators are available for most computers at a variety of prices, and which have a variety of performance characteristics and features. Verilog is more heavily used than ever, and it is growing faster than any other hardware description language. It has truly become the standard hardware description language.

Verilog 8/2/ A Verilog model is composed of modules. A module is the basic unit of the model, and it may be composed of instances of other modules. A module which is composed of other module instances is called a parent module, and the instances are called child modules. system comp2 comp1 sub3

Verilog Design Concept 8/2/ System instantiates comp1,comp2 comp2 instantiates sub3 System comp1 sub3 comp2

Primitives Primitives are pre-defined module types. They can be instantiated just like any other module type. The Verilog primitives are sometimes called gates, because for the most part, they are simple logical primitives. 1-output and,nand or,nor 1-input buf,not Etc. 8/2/2015 7

Register Registers are storage elements. Values are stored in registers in procedural assignment statements. Typical register declarations would be: reg r1, r2; reg [31:0] bus32; integer i; real fx1, fx2; Register can take 0, 1, x (unknown) and z (high impedence) 8/2/2015 8

Register Types There are four types of registers: 1. Reg This is the generic register data type. A reg declaration can specify registers which are 1 bit wide to 1 million bits wide. A register declared as a reg is always unsigned. 2. Integer Integers are 32 bit signed values. Arithmetic done on integers is 2's complement. 3. Time Registers declared with the time keyword are 64-bit unsigned integers. 4. Real (and Realtime) Real registers are 64-bit IEEE floating point. Not all operators can be used with real operands. Real and realtime are synonymous. 8/2/2015 9

Example Primitives are instantiated in a module like any other module instance. For example, the module represented by this diagram would be instantiated: module test; wire n1, n2; reg ain, bin; and and_prim(n1, ain, bin); not not_prim(n2, n1); endmodule 8/2/ ain bin n1 n2

Assign Continuous assignments are sometimes known as data flow statements because they describe how data moves from one place, either a net or register, to another. They are usually thought of as representing combinational logic. Example: assign w1 = w2 & w3; 8/2/

Lets get the Verilog module for this circuit 8/2/ esigners_guide/wire_assignments/

Solutions using “assign” and “wire” module AOI (input A, B, C, D, output F); /* start of a block comment wire F; wire AB, CD, O; assign AB = A & B; assign CD = C & D; assign O = AB | CD; assign F = ~O; end of a block comment */ // Equivalent... wire AB = A & B; wire CD = C & D; wire O = AB | CD; wire F = ~O; endmodule // end of Verilog code 8/2/

Module abc in vabc 8/2/ module vabc (d, s); input [1:0] s; output [3:0] d; abc a1 (d[3], d[2], d[1], d[0], s[1], s[0]); endmodule

Module Definition + Gate Level Diagram 8/2/ module abc (a, b, c, d, s1, s0); input s1, s0; output a, b, c,d; not (s1_, s1), (s0_, s0); and (a, s1_, s0_); and (b, s1_, s0); and (c, s1, s0_); and (d, s1, s0); endmodule

Verilog Module Example module shift (shiftOut, dataIn, shiftCount); parameter width = 4; output [width-1:0] shiftOut; input [width-1:0] dataIn; input [31:0] shiftCount; assign shiftOut = dataIn << shiftCount; endmodule This module can now be used for shifters of various sizes, simply by changing the width parameter. Parameters can be changed per instance. shift sh1 (shiftedVal, inVal, 7); //instantiation of shift module defparam sh1.width = 16; // parameter redefinition 8/2/

Net component (connectors) Nets are the things that connect model components together. They are usually thought of as wires in a circuit. Nets are declared in statements like this: net_type [range] [delay3] list_of_net_identifiers ;net_typerangedelay3list_of_net_identifiers or net_type [drive_strength] [range] [delay3] list_of_net_decl_assignments ;drive_strengthlist_of_net_decl_assignments Example: wire w1, w2; tri [31:0] bus32; wire wire_number_5 = wire_number_2 & wire_number_3; & here represents AND operation (AND gate) 8/2/

4-bit Adder : Lets write Verilog Source 8/2/

Lets examine a full-adder What is a half-adder? A+B  {S, Cout} What is a full-adder? A+B+Cin  {S, Cout} Determine the functions for sum and carry (S, Cout) from (A, B inputs and Cin) S ==? Cout =? We will implement a 1-bit Adder module, build a 4- bit module out of it, then we will add a tester and a main module. Adder 8/2/