CS 3850 Lecture 4 Data Type. Physical Data Types The primary data types are for modeling registers (reg) and wires (wire). The reg variables store the.

Slides:



Advertisements
Similar presentations
Lecture 13: 10/8/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Advertisements

Simulation executable (simv)
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
INTRO TO VHDL Appendix A: page page VHDL is an IEEE and ANSI standard. VHDL stands for Very High Speed IC hardware description language.
Chap. 6 Dataflow Modeling
Chapter 11 Verilog HDL Application-Specific Integrated Circuits Michael John Sebastian Smith Addison Wesley, 1997.
Verilog Intro: Part 1.
Chapter 7 Henry Hexmoor Registers and RTL
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part3: Verilog – Part 1.
ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson slides3.ppt Modification date: March 16, Addressing Modes The methods used in machine instructions.
Logic Values 0:logic 0 / false 1:logic 1 / true X:unknown logic value Z:high-impedance.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
ELEN 468 Lecture 151 ELEN 468 Advanced Logic Design Lecture 15 Synthesis of Language Construct I.
Topic 9 – Introduction To Arrays. CISC105 – Topic 9 Introduction to Data Structures Thus far, we have seen “simple” data types. These refers to a single.
The Multicycle Processor II CPSC 321 Andreas Klappenecker.
Logic Values 0:logic 0 / false 1:logic 1 / true X:unknown logic value Z:high-impedance.
CS 3850 Lecture 5 Operators. 5.1 Binary Arithmetic Operators Binary arithmetic operators operate on two operands. Register and net (wire) operands are.
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
B. RAMAMURTHY Hardware Description Language 8/2/
Digital System Design EEE344 Lecture 3 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
Slide 1 5. VHDL/Verilog Operators, Arrays and Indexes.
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
Programmable Logic Architecture Verilog HDL FPGA Design Jason Tseng Week 2-3.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Programmable Logic Architecture Verilog HDL FPGA Design Jason Tseng Week 5.
ECE 2372 Modern Digital System Design
ECE/CS 352 Digital Systems Fundamentals
Workshop Topics - Outline
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
A VHDL Tutorial ENG2410. ENG241/VHDL Tutorial2 Goals Introduce the students to the following: –VHDL as Hardware description language. –How to describe.
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.
Module 1.3 Verilog Basics UNIT 1 : Introduction to Verilog Data Types.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
VARIABLES, CONSTANTS, OPERATORS ANS EXPRESSION
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
3/4/20031 ECE 551: Digital System Design * & Synthesis Lecture Set 3 3.1: Verilog - User-Defined Primitives (UDPs) (In separate file) 3.2: Verilog – Operators,
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
1 Verilog Digital System Design Z. Navabi, 2006 Verilog Language Concepts.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
BASIC VHDL LANGUAGE ELEMENTS Digital Design for Instrumentation with VHDL 1.
Sharif University of Technology Department of Computer Engineering Verilog ® HDL Basic Concepts Alireza Ejlali.
Introduction to Verilog
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Chapter 3: Dataflow Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 3-1 Chapter 3: Dataflow Modeling.
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 (c) , W. J. Dally Digital Design: A Systems Approach Lecture 1: The Digital Abstraction Combinational Logic Verilog.
Mohamed Younis CMCS 411, Computer Architecture 1 CMSC Computer Architecture Lecture 8 Hardware Design Languages February 21, 2001
Hardware Description Languages: Verilog
Computers’ Basic Organization
The Machine Model Memory
Data Transfers, Addressing, and Arithmetic
Reg and Wire:.
Hardware Description Languages: Verilog
Behavioral Modeling in Verilog
Chapter 3: Dataflow Modeling
Logic Values 0:logic 0 / false 1:logic 1 / true X:unknown logic value
Logic Values 0:logic 0 / false 1:logic 1 / true X:unknown logic value
Overview Part 1 - Registers, Microoperations and Implementations
Introduction to Digital System and Microprocessor Design
Computer Architecture
Logic Values 0:logic 0 / false 1:logic 1 / true X:unknown logic value
Chapters 4 – Part3: Verilog – Part 1
Verilog HDL Basic Syntax
Verilog for Testbenches
Reconfigurable Computing (EN2911X, Fall07)
EEL4712 Digital Design (VHDL Tutorial).
Presentation transcript:

CS 3850 Lecture 4 Data Type

Physical Data Types The primary data types are for modeling registers (reg) and wires (wire). The reg variables store the last value that was procedurally assigned to them; whereas the wire variables represent physical connections between structural entities such as gates. A wire does not store a value. A wire variable is really only a label on a wire.

The reg and wire data objects may have the following possible values: 0 logical zero or fals 1logical one or true x unknown logical value z high impedance of tristate gate The reg variables are initialized to x at the start of the simulation. Any wire variable not connected to something has the x value.

Some examples: reg [0:7] A, B; wire [0:3] Dataout; reg [7:0] C; specify registers A and B to be 8-bit wide with the most significant bit the zeroth bit; whereas the most significant bit of register C is bit seven. The wire Dataout is 4 bits wide.

The bits in a register or wire can be referenced by the notation [ : ]. For example, in the second procedural assignment statement initial begin: int1 A = 8'b ; B = {A[0:3] | A[4:7], 4'b0000}; end B is set to the first four bits of A bitwise or-ed with the last four bits of A and then concatenated with B now holds a value of The {} brackets means the bits of the two or more arguments separated by commas are concatenated together.

An argument may be replicated by specifying a repetition number of the form: {repetition_number{exp1, exp2,..., expn}} Here are some examples: C = {2{4'b1011}}; //C assigned the bit vector 8'b C = {{4{A[4]}}, A[4:7]}; // first 4 bits are sign extension.

The range referencing in an expression must have constant expression indices. However, a single bit may be referenced by a variable. For example: reg [0:7] A, B; B = 3; A[0: B] = 3'b111; // ILLEGAL - indices MUST be constant!! A[B] = 1'b1; // A single bit reference is LEGAL

Memories are specified as vectors of registers. For example, Mem is 1K words each 32-bits. reg [31:0] Mem [0:1023]; The notation Mem[0] references the zeroth word of memory. The array index for memory (register vector) may be a register. Notice that one can not reference a memory at the bit-level in Verilog HDL. If you want a specific range of bits in a word of memory, you must first transfer the data in the word to a temporary register.

Verilog HDL has several data types which do not have a corresponding hardware realization. These data types include integer, real and time. The data types integer and real behave pretty much as in other languages, e. g., C. Be warned that a reg variable is unsigned and that an integer variable is a signed 32- bit integer. This has important consequences when you subtract. Abstract Data Types

time variables hold 64-bit quantities and are used in conjunction with the $time system function. Arrays of integer and time variables (but not reals) are allowed. Multiple dimensional arrays are not allowed in Verilog HDL. Some examples: integer Count; // simple signed 32-bit integer integer K[1:64]; // an array of 64 integers time Start, Stop; // Two 64-bit time variables