Reg and Wire:.

Slides:



Advertisements
Similar presentations
Verilog HDL -Introduction
Advertisements

Simulation executable (simv)
The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Supplement on Verilog adder examples
Synchronous Sequential Logic
EE 361 Fall 2003University of Hawaii1 Hardware Design Tips EE 361 University of Hawaii.
Anurag Dwivedi.  Verilog- Hardware Description Language  Modules  Combinational circuits  assign statement  Control statements  Sequential circuits.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 8: Sequential Design Spring 2009 W. Rhett.
7-Segment LED Display DD: Section Mano: Section 3.10.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
2-to-1 Multiplexer: if Statement Discussion D7.1 Example 4.
Advanced Verilog EECS 270 v10/23/06.
B. RAMAMURTHY Hardware Description Language 8/2/
Overview Logistics Last lecture Today HW5 due today
each of these is an instantiation of “full_adder”
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
ECE 2372 Modern Digital System Design
Registers CPE 49 RMUTI KOTAT.
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.
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.
Module 1.2 Introduction to Verilog
1 CSE-308 Digital System Design (DSD) N-W.F.P. University of Engineering & Technology, Peshawar.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Chap. 4 Modules and Ports. 2 Modules and Ports Modules Ports Hierarchical Names Summary.
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
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 4: Testing, Dataflow Modeling Spring 2009.
Multiplexers Section Topics Multiplexers – Definition – Examples – Verilog Modeling.
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.
LECTURE V TEST BENCHES. As your projects become more complex and multiple modules are employed, it will no longer be possible to simulate them as we did.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part4: Verilog – Part 2.
Full Adder Verilog(HO: wires/regs, always) Section 4.5 (Full adder)
Introduction to FPGAs Getting Started with Xilinx.
Exp#5 & 6 Introduction to Verilog COE203 Digital Logic Laboratory Dr. Ahmad Almulhem KFUPM Spring 2009.
Structural Description
Overview Logistics Last lecture Today HW5 due today
Hardware Description Languages: Verilog
Hardware Description Language
TODAY’S OUTLINE Verilog Codings Concurrent and Sequential If-else
Discussion 2: More to discuss
Verilog Introduction Fall
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
Supplement on Verilog Sequential circuit examples: FSM
Lecture 2 Supplement Verilog-01
Verilog Coding Guideline
Hardware Description Languages: Verilog
TODAY’S OUTLINE Procedural Assignments Verilog Coding Guidelines
Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-I]
Introduction to Verilog
Hardware Description Language
Logic Values 0:logic 0 / false 1:logic 1 / true X:unknown logic value
Hardware Description Language
Levels in computer design
Hardware Description Language
Supplement on Verilog Sequential circuit examples: FSM
Introduction to Verilog
Hardware Description Language
Supplement on Verilog adder examples
Hardware Description Language
The Verilog Hardware Description Language
COE 202 Introduction to Verilog
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

Reg and Wire:

Wire: Wires are simple wires/busses of arbitrary width used in Verilog. They connect to input & output ports of a module instantiation together w/ some other element, but also within actual module declaration. Wires can’t store value, & can’t be used on the left-hand side of =/<= sign in an always@ block.(always@ blocks are used to describe events that should happen under certain conditions) Only legal type on the left-hand side of an assign statement, and wires can only be used to model combinational logic.

Wire used in Verilog: And gate. module wire_example( a, b, y); input a, b; output y; wire a, b, y; assign y = a & b; endmodule This means that if you declare a variable w/ specifying reg or wire, it will be a 1-bit wide wire.

Reg: Similar to wires, but instead store information like a container. Allowed to be connect to the input port of a module, but not the output of an instantiation. W/in a module declaration reg can be connected to the outputs, but not the inputs. Legal only on the left-hand of an always@ block =/<= sign and initial block = sign. Can’t be used on the left hand side of an assign statement, but could be used to create registers when used in conjunction w/ always@(posedge Clock) blocks. Also can be used to create both combination & sequential logic.

Reg in Verilog: Combinational Gives same output as the assign statement, but difference is the y is declared as reg. The advantages are with reg is its useful when “case” statement is required. module reg_ex ( a, b, y); input a, b; output y; reg y; wire a, b; always @ ( a or b) begin y = a & b; end endmodule Combinational