VHDL Lexical Elements

Similar documents
CSCI Lab 3. VHDL Syntax. Due: Tuesday, week6 Submit to: \\fs2\csci250\lab-3\

ECE4401 / CSE3350 ECE280 / CSE280 Digital Design Laboratory

Review of Digital Design with VHDL

Programming in C++ 4. The lexical basis of C++

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 4 Introduction to VHDL

C-Based Hardware Design

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification Part II

Design units can NOT be split across different files

VHDL BASIC ELEMENTS INTRODUCTION

DECLARATIONS. Character Set, Keywords, Identifiers, Constants, Variables. Designed by Parul Khurana, LIECA.

Declarations. Lexical elements. Type declaration Subtype declaration Constant declaration Signal declaration Variable declaration.

Database Programming with PL/SQL

VHDL Structural Modeling II

Chapter 2: Introduction to C++

Chapter 2: Special Characters. Parts of a C++ Program. Introduction to C++ Displays output on the computer screen

Basic Language Constructs of VHDL

PYTHON- AN INNOVATION

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

LECTURE 02 INTRODUCTION TO C++

Summary of basic structures

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

JAVA Programming Fundamentals

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript

Data Types and Variables in C language

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

Java Notes. 10th ICSE. Saravanan Ganesh

Java Basic Datatypees

Contents. Appendix D VHDL Summary Page 1 of 23

Performance Engineering of Real-Time and Embedded Systems. Introduction to VHDL

MATVEC: MATRIX-VECTOR COMPUTATION LANGUAGE REFERENCE MANUAL. John C. Murphy jcm2105 Programming Languages and Translators Professor Stephen Edwards

BASIC ELEMENTS OF A COMPUTER PROGRAM

Standard 11. Lesson 9. Introduction to C++( Up to Operators) 2. List any two benefits of learning C++?(Any two points)

Full file at

Verilog. Like VHDL, Verilog HDL is like a programming language but:

LANGUAGE CONSTRUCTS AND CONVENTIONS IN VERILOG

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

Getting started with Java

0. Overview of this standard Design entities and configurations... 5

2 nd Week Lecture Notes

INTRODUCTION 1 AND REVIEW

VHDL: skaitmeninių įtaisų projektavimo kalba. 2 paskaita Pradmenys

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

C Language, Token, Keywords, Constant, variable

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program

EEL 4783: Hardware/Software Co-design with FPGAs

Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal

VHDL. Official Definition: VHSIC Hardware Description Language VHISC Very High Speed Integrated Circuit

COMS W4115 Programming Languages & Translators GIRAPHE. Language Reference Manual

The PCAT Programming Language Reference Manual

Unit 3. Constants and Expressions

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

.. Cal Poly CPE 101: Fundamentals of Computer Science I Alexander Dekhtyar..

C++ is case sensitive language, meaning that the variable first_value, First_Value or FIRST_VALUE will be treated as different.

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION

Gabriel Hugh Elkaim Spring CMPE 013/L: C Programming. CMPE 013/L: C Programming

Fundamental Data Types. CSE 130: Introduction to Programming in C Stony Brook University

Variables and Literals

Logic and Computer Design Fundamentals VHDL. Part 1 Chapter 4 Basics and Constructs

Visual C# Instructor s Manual Table of Contents

Introduction to QuickCalc BASIC. QUICKCALC Sample Programs. QUICKCALC BASIC vs IBM BASIC. Note: Please read the User License Agreement, below.

More about Binary 9/6/2016

Overview of C. Basic Data Types Constants Variables Identifiers Keywords Basic I/O

PL / SQL Basics. Chapter 3

ENGIN 241 Digital Systems with Lab

C++ Basics. Lecture 2 COP 3014 Spring January 8, 2018

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

Chapter 2: Basic Elements of C++

3 The Building Blocks: Data Types, Literals, and Variables

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

Types, Variables, and Constants

1 Lexical Considerations

Lexical Considerations

Java Programming Fundamentals. Visit for more.

VLC : Language Reference Manual

Lecture 2 Tao Wang 1

Lecture Set 2: Starting Java

UNIT-2 Introduction to C++

Structure of Programming Languages Lecture 3

Language Fundamentals Summary

Lecture Set 2: Starting Java

CPE/EE 422/522. Chapter 8 - Additional Topics in VHDL. Dr. Rhonda Kay Gaede UAH. 8.1 Attributes - Signal Attributes that return a value

CHAPTER-6 GETTING STARTED WITH C++

Expressions and Data Types CSC 121 Fall 2015 Howard Rosenthal

BSM540 Basics of C Language

Synthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden

CSI33 Data Structures

Objectives. In this chapter, you will:

C Basics. Chapter 2: C Basics. C Programming Language. v3.3 February 6, 2017

211: Computer Architecture Summer 2016

C++ Programming: From Problem Analysis to Program Design, Third Edition

VHDL Objects. Lecture 8: VHDL (2) Variables. VHDL Objects - Constant. Files. EE3109 Gopi K. Manne Fall 2007

Today. o main function. o cout object. o Allocate space for data to be used in the program. o The data can be changed

Hardware Modeling. VHDL Syntax. Vienna University of Technology Department of Computer Engineering ECS Group

Full file at

Programming in C and Data Structures [15PCD13/23] 1. PROGRAMMING IN C AND DATA STRUCTURES [As per Choice Based Credit System (CBCS) scheme]

Exercise: Using Numbers

Number Systems, Scalar Types, and Input and Output

Chapter 17. Fundamental Concepts Expressed in JavaScript

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Transcription:

1 Design File = Sequence of Lexical Elements && Separators (a) Separators: Any # of Separators Allowed Between Lexical Elements 1. Space character 2. Tab 3. Line Feed / Carriage Return (EOL) (b) Lexical Elements: 1. Delimiters `` Meaningful Separator Characters`` 2. Identifiers 3. Literals (i) Character Literal (ii) String Literal (iii) Bit String Literal (iv) Abstract (Numeric) Literal

2 (i) Delimiters = Separators Which Have Meaning Simple & ' ( ) * +, -. / : ; < = > Compound * * := <= => /= >= <> -- (ii) Identifiers: 1. Key/Reserved Words (No Declaration Required) 2. User-Defined

3 Reserved Words abs disconnect label package access downto library Poll units after linkage procedure until alias else loop process use all elsif variable and end map range architecture entity mod record wait array exit nand register when assert new rem while attribute file next report with begin for nor return xor block function not select body generate null severity buffer generic of signal bus guarded on subtype case if open then component in or to configuration inout others transport constant is out type

4 User-Defined Identifiers Identifier ::= Letter{[underscore]Letter_or_Digit} Starts with a Letter Followed by any # of Alpha-Numeric Characters No 2-Consecutive Underscores are Allowed Underscore Cannot be the Last Character in an Identifier Comments Start with -- ``2 Consecutive Dashes`` Comment Must be the LAST Lexical Element on the Line IF Line starts with - -, It is a Full-Line Comment. --This is a Full-Line Comment C := A*B; - -This is an In-Line Comment

(i) Character Literal 5 Literals Single Character Enclosed in Single Quotes Used to Define Constant Values of Objects of Type Character `A` `B` `e` ` ` `1` `9` `*`.etc. (ii) String Literal Sequence of Characters Enclosed in Double Quotes IF a Quotation Char is Required, 2 Consecutive Quotation Marks Are Used No 2 Strings are Allowed on the same Line ``A String`` -- 8-Char String ```` -- Empty String `` `` `` `` -- 4-Double Quotes -- String of Length 1 ``A+B=C;#3=$`` -- String with Special Chars

(ii) String Literal (Contd) Strings Must Be Typed on One Line 6 (Literals) Longer Strings Are Concatenated from Shorter Ones Using the & operator. ``This is a Very Long String Literal`` ``Formed By Concatenation`` & (iii) Bit String Literals Is a String Literal Where All Chars are Only Digits or Underscore. Is Preceded By A Base Identifier {B, O, X} The Length of the String Does Not Include the Number of UnderScores B``11011001`` -- Length 8 B``1101_1001`` -- Length 8 X``D9`` -- Length 8 (Equiv to Above String) O``331`` -- Length 9

7 (iii) Bit String Literals (Contd) Used to Specify Initial Contents of Registers Value of Bit-String is Equivalent to a String of Bits, However, Interpreting This Value is a User Choice X``A`` -- Represents the String 1010 (iv) Abstract (Numeric) Literals 1. Default is Decimal -- Interpreted as +10 For Unsigned Representation -- Interpreted as -6 For Signed 2`s Complement Representation 2. Other Bases Are Possible (Bases Between 2 and 16) 3. Underscore Char May Be Used to Enhance Readability 4. Scientific Notations Must Have Integer Exponent 5. Integer Literals Should Not Have Base Point 6. Integer Literals Should Not Have -ive Exponents 7. In Real Literals, a Base Point Must Be Followed By AT LEAST ONE DIGIT 8. No Spaces Are Allowed

8 (iv) Abstract (Numeric) Literals (Contd) 0 1 123_987_456 73E13 -- Integers 0.0 2.5 2.7_456 73E-2 12.5E3 -- Reals Special Case (BASED LITERALS) General Base Abstract Literals (Including Decimal) Based_Literal::=Base#Based_Integer[.Based_Integer]#[Exponent] Based_Integer::=Extd_Digit{[Underscode] Extd_Digit} Extd_Digit::=digit Letters_A-F Both Base and Exponent are Expressed in Decimal Base Must be Between 2 & 16 Digits Are Extended to Use the HEX Characters A-F The Following Represent Integer Value of 196 2#1100_0100#, 16#C4# 4#301#E1, 10#196# The Following Represent Real Value of 4095.0 2#1.1111_1111_111#E11, 16#F.FF#E2 10#4095.0#