SlideShare a Scribd company logo
1 of 6
UNIT I
Basic Language Elements
 Identifiers
 Comments
 Data Objects
 Data Types
 Operators
Delays in VHDL
 Inertial delay
 Transport delay
 Delta delay
VHDL – Basic Language Elements
Identifiers
- Identifiers are used to name items in a VHDL model.
Basic identifier: composed ofa sequence of one or more characters
A basic identifier maycontainonlycapital ‘A’ - ’Z’ , ‘a’ - ’z’,
‘0’ - ’9’, underscore character ‘_’
• first character must be a letter, last character must NOT be anunderscore
• Two underscores cannot occur concurrently
• case insensitive: COUNT, count, Count, counT are all the same
Extended identifier: sequence of characters writtenbetweentwo backslashes
• Anyprintable characters canbe usedincluding %, $, *, etc.
• lower case andupper case are distinct
• examples: 2FOR$, countNow!, &#$(@#&!!!
Keywords can not be usedas basic identifiers
Comments
 Its nonexecutable or readable parameter for understandingpurpose.
 The comments to be proceeded bytwo consecutive
hyphens(--)
Data Objects
– holda value ofa specifiedtype
constant:holds a single value of a specifiedtype andcannot be changed throughout the simulatio
constant declaration:
• constant RESULT:BIT:=1; constant FALL_TIME:TIME:=10ns
variable:
holds a single value ofa specifiedtype but can be changed throughout the simulation
• variable ABAR:BIT;variable STATUS:BIT_VECTOR(3 downto0);
signal:
holds a list of values including current value and a list of possible future values
• typicallyusedto model wires andflip-flops
• signal DATA_BUS:BIT_VECTOR(0 to 31)
file:
same as withanycomputer file, contains data
Data Types
– Is a name whichis associatedwith a set of values anda set ofoperations.
 Major types:
• ScalarType
• Composite Type
• Access Type
• File Type
There canalsobe user-definedtypes andsubtypes
A subtype is a type witha (possibly) added constraint
syntax: subtype subtype_name is base_type range range_constraint;
example: subtype DIGITS is integer range 0 to 9;
Scalar types
Enumeration – defines a type that hasa set of user-defined values
type std_logic is (‘U’, ‘X’, ‘0’, ‘1’, ‘Z’, ‘W’, ‘L’, ‘H’,’-’);
‘u’ unspecified, ‘x’ unknown, ‘0’ strong zero, ‘1’ strong one
‘z’ high impedance, ‘w’ weak unknown, ‘l’ weak zero, ‘h’ weakone, ‘-’ don’t care
Integer – valuesfall within the specified integer range
• type REG_SIZEis range 0 to 31
• subtype WORDis REG_SIZE range 0 to 15
Floating Point –real decimaltypes
Physical – represent measurement of some physical quantitylike time, voltage, or current
Composite Types
– a collection ofvalues
Array Types – collectionof values all belonging to a single type
• BIT_VECTOR andSTRING are pre-defined one-dimensional arraytypes
• type DATA_BYTE is array(0 to 7) of BIT;
• type MEMORY is array(0 to 127) of DATA_BYTE;
Record Types – collectionof values that maybelong to different types
type MODULE is
record
SUM:BIT_VECTOR(0 to 7);
COUT:BIT;
end record
Access Type
 Valuesbelonging to anaccess type are pointers to a allocatedobject of some other type.
 Example :
type PTR is access MODULE;
File Type
 Objects of file type represent files in the host environment.
 Syntax :
type file_type_name is file of type_name;
Operators
logical operators
• and, or, nand, nor, xor, xnor, not
relational operators
• <, >, =, <=, >=, /= -- /= means not equal to
shift operators
• sll, srl, sla, sra, rol, ror
adding operators
• +, -, & -- & is concatenation
multiplying operators
• *, /, mod, rem
miscellaneous operators
• abs, ** -- ** is exponentiation
DELAYS IN VHDL
 VHDL allows signal assignments to include delayspecifications, inthe formof an‘after’ clause.
 The ‘after’ clause allows you to model the behavior of gate anddelays.
 Delay’s are useful insimulation models to estimate delays in synthesizable design.
 Three fundamental delays are
• Inertial delay.
• Transport Delay.
• Delta Delay.
INERTIAL DELAY
 Inertial Delaymodels the delays oftenfoundinswitching circuits (component delays).
 These are default delays.
 Spikes are not propagatedif after clause is used.
 An input value must be stable for an specifiedpulse rejectionlimit durationbefore the value is allowed to propagate
to the output.
 Inertial delayis usedto model component delay.
 Spike of 2ns incmos component withdelayof 10ns is normallynot seen at the output.
 Problemarises ifwe want to model a component withdelayof 10ns, but allspikes at input > 5 ns are visible output.
 Above problemcanbe solvedbyintroducingreject & modelingas follows:
 outp <= reject 5 ns inertial Inp after 10 ns;
TRANSPORT DELAY
 Transport delaymodels the behavior ofa wire, inwhich all pulses (events)are propagated.
 Pulses are propagated irrespective ofwidth.
 Good for interconnect delays.
 Models delays in hardware that doesnot exhibit anyinertial delay.
 Represents pure propagation delay
 Routing delays canbe modeledusing transport delay
Z<= transport a after 10 ns;
Delta Delay
 Deltadelayneededtoprovide supportforconcurrentoperationswithzerodelay
 Schedulingof zerodelay devicesrequiresthe delta delay.
 A deltadelayisnecessaryif nootherdelayisspecified.

More Related Content

What's hot

Java: Primitive Data Types
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data TypesTareq Hasan
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGAbhishek Dwivedi
 
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...rahuldaredia21
 
2 programming with c# i
2 programming with c# i2 programming with c# i
2 programming with c# isiragezeynu
 
Learn C# Programming - Data Types & Type Conversion
Learn C# Programming - Data Types & Type ConversionLearn C# Programming - Data Types & Type Conversion
Learn C# Programming - Data Types & Type ConversionEng Teong Cheah
 
Programming in scala - 1
Programming in scala - 1Programming in scala - 1
Programming in scala - 1Mukesh Kumar
 
Chapter 13.1.1
Chapter 13.1.1Chapter 13.1.1
Chapter 13.1.1patcha535
 
Java generics(Under The Hood Of The Compiler) by Harmeet singh
Java generics(Under The Hood Of The Compiler) by Harmeet singhJava generics(Under The Hood Of The Compiler) by Harmeet singh
Java generics(Under The Hood Of The Compiler) by Harmeet singhHarmeet Singh(Taara)
 
C# Value Data Types and Reference Data Types
C# Value Data Types and Reference Data TypesC# Value Data Types and Reference Data Types
C# Value Data Types and Reference Data TypesMicheal Ogundero
 
Programming in c
Programming in cProgramming in c
Programming in cvineet4523
 
datatypes_variables_constants
datatypes_variables_constantsdatatypes_variables_constants
datatypes_variables_constantsMicheal Ogundero
 
Doppl development iteration #2
Doppl development   iteration #2Doppl development   iteration #2
Doppl development iteration #2Diego Perini
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data typesTuan Ngo
 

What's hot (20)

Java: Primitive Data Types
Java: Primitive Data TypesJava: Primitive Data Types
Java: Primitive Data Types
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
 
fundamentals of c
fundamentals of cfundamentals of c
fundamentals of c
 
Vhdl
VhdlVhdl
Vhdl
 
2 programming with c# i
2 programming with c# i2 programming with c# i
2 programming with c# i
 
Learn C# Programming - Data Types & Type Conversion
Learn C# Programming - Data Types & Type ConversionLearn C# Programming - Data Types & Type Conversion
Learn C# Programming - Data Types & Type Conversion
 
Programming in scala - 1
Programming in scala - 1Programming in scala - 1
Programming in scala - 1
 
Java Programming
Java Programming Java Programming
Java Programming
 
Chapter 13.1.1
Chapter 13.1.1Chapter 13.1.1
Chapter 13.1.1
 
Java generics(Under The Hood Of The Compiler) by Harmeet singh
Java generics(Under The Hood Of The Compiler) by Harmeet singhJava generics(Under The Hood Of The Compiler) by Harmeet singh
Java generics(Under The Hood Of The Compiler) by Harmeet singh
 
C# Value Data Types and Reference Data Types
C# Value Data Types and Reference Data TypesC# Value Data Types and Reference Data Types
C# Value Data Types and Reference Data Types
 
7.data types in c#
7.data types in c#7.data types in c#
7.data types in c#
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Core Java
Core JavaCore Java
Core Java
 
C reference manual
C reference manualC reference manual
C reference manual
 
datatypes_variables_constants
datatypes_variables_constantsdatatypes_variables_constants
datatypes_variables_constants
 
Doppl development iteration #2
Doppl development   iteration #2Doppl development   iteration #2
Doppl development iteration #2
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data types
 

Similar to Unit i (20)

the-vhsic-.pptx
the-vhsic-.pptxthe-vhsic-.pptx
the-vhsic-.pptx
 
VHDL-Data-Types.ppt
VHDL-Data-Types.pptVHDL-Data-Types.ppt
VHDL-Data-Types.ppt
 
VHDL_Lecture_new1 [Autosaved].ppt
VHDL_Lecture_new1 [Autosaved].pptVHDL_Lecture_new1 [Autosaved].ppt
VHDL_Lecture_new1 [Autosaved].ppt
 
DDUV.pdf
DDUV.pdfDDUV.pdf
DDUV.pdf
 
VHDL course
VHDL courseVHDL course
VHDL course
 
Constants, Variables, and Data Types
Constants, Variables, and Data TypesConstants, Variables, and Data Types
Constants, Variables, and Data Types
 
DLD5.pdf
DLD5.pdfDLD5.pdf
DLD5.pdf
 
Data Handling
Data HandlingData Handling
Data Handling
 
Spdas2 vlsibput
Spdas2 vlsibputSpdas2 vlsibput
Spdas2 vlsibput
 
Verilogspk1
Verilogspk1Verilogspk1
Verilogspk1
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
 
Vhdl 1 ppg
Vhdl 1 ppgVhdl 1 ppg
Vhdl 1 ppg
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operators
 
UNIT-I.pptx of subject in engineering bla bla bla
UNIT-I.pptx of subject in engineering bla bla blaUNIT-I.pptx of subject in engineering bla bla bla
UNIT-I.pptx of subject in engineering bla bla bla
 
DIGITAL ELECTRONICS AND LOGIC DESIGN
DIGITAL ELECTRONICS AND LOGIC DESIGN DIGITAL ELECTRONICS AND LOGIC DESIGN
DIGITAL ELECTRONICS AND LOGIC DESIGN
 
Verilog Final Probe'22.pptx
Verilog Final Probe'22.pptxVerilog Final Probe'22.pptx
Verilog Final Probe'22.pptx
 
FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2
 
Vhdl
VhdlVhdl
Vhdl
 
Hd3
Hd3Hd3
Hd3
 

Unit i

  • 1. UNIT I Basic Language Elements  Identifiers  Comments  Data Objects  Data Types  Operators Delays in VHDL  Inertial delay  Transport delay  Delta delay VHDL – Basic Language Elements Identifiers - Identifiers are used to name items in a VHDL model. Basic identifier: composed ofa sequence of one or more characters A basic identifier maycontainonlycapital ‘A’ - ’Z’ , ‘a’ - ’z’, ‘0’ - ’9’, underscore character ‘_’ • first character must be a letter, last character must NOT be anunderscore • Two underscores cannot occur concurrently • case insensitive: COUNT, count, Count, counT are all the same Extended identifier: sequence of characters writtenbetweentwo backslashes • Anyprintable characters canbe usedincluding %, $, *, etc. • lower case andupper case are distinct • examples: 2FOR$, countNow!, &#$(@#&!!! Keywords can not be usedas basic identifiers
  • 2. Comments  Its nonexecutable or readable parameter for understandingpurpose.  The comments to be proceeded bytwo consecutive hyphens(--) Data Objects – holda value ofa specifiedtype constant:holds a single value of a specifiedtype andcannot be changed throughout the simulatio constant declaration: • constant RESULT:BIT:=1; constant FALL_TIME:TIME:=10ns variable: holds a single value ofa specifiedtype but can be changed throughout the simulation • variable ABAR:BIT;variable STATUS:BIT_VECTOR(3 downto0); signal: holds a list of values including current value and a list of possible future values • typicallyusedto model wires andflip-flops • signal DATA_BUS:BIT_VECTOR(0 to 31) file: same as withanycomputer file, contains data Data Types – Is a name whichis associatedwith a set of values anda set ofoperations.  Major types: • ScalarType • Composite Type • Access Type • File Type There canalsobe user-definedtypes andsubtypes A subtype is a type witha (possibly) added constraint syntax: subtype subtype_name is base_type range range_constraint; example: subtype DIGITS is integer range 0 to 9;
  • 3. Scalar types Enumeration – defines a type that hasa set of user-defined values type std_logic is (‘U’, ‘X’, ‘0’, ‘1’, ‘Z’, ‘W’, ‘L’, ‘H’,’-’); ‘u’ unspecified, ‘x’ unknown, ‘0’ strong zero, ‘1’ strong one ‘z’ high impedance, ‘w’ weak unknown, ‘l’ weak zero, ‘h’ weakone, ‘-’ don’t care Integer – valuesfall within the specified integer range • type REG_SIZEis range 0 to 31 • subtype WORDis REG_SIZE range 0 to 15 Floating Point –real decimaltypes Physical – represent measurement of some physical quantitylike time, voltage, or current Composite Types – a collection ofvalues Array Types – collectionof values all belonging to a single type • BIT_VECTOR andSTRING are pre-defined one-dimensional arraytypes • type DATA_BYTE is array(0 to 7) of BIT; • type MEMORY is array(0 to 127) of DATA_BYTE; Record Types – collectionof values that maybelong to different types type MODULE is record SUM:BIT_VECTOR(0 to 7); COUT:BIT; end record Access Type  Valuesbelonging to anaccess type are pointers to a allocatedobject of some other type.  Example : type PTR is access MODULE;
  • 4. File Type  Objects of file type represent files in the host environment.  Syntax : type file_type_name is file of type_name; Operators logical operators • and, or, nand, nor, xor, xnor, not relational operators • <, >, =, <=, >=, /= -- /= means not equal to shift operators • sll, srl, sla, sra, rol, ror adding operators • +, -, & -- & is concatenation multiplying operators • *, /, mod, rem miscellaneous operators • abs, ** -- ** is exponentiation
  • 5. DELAYS IN VHDL  VHDL allows signal assignments to include delayspecifications, inthe formof an‘after’ clause.  The ‘after’ clause allows you to model the behavior of gate anddelays.  Delay’s are useful insimulation models to estimate delays in synthesizable design.  Three fundamental delays are • Inertial delay. • Transport Delay. • Delta Delay. INERTIAL DELAY  Inertial Delaymodels the delays oftenfoundinswitching circuits (component delays).  These are default delays.  Spikes are not propagatedif after clause is used.  An input value must be stable for an specifiedpulse rejectionlimit durationbefore the value is allowed to propagate to the output.  Inertial delayis usedto model component delay.  Spike of 2ns incmos component withdelayof 10ns is normallynot seen at the output.  Problemarises ifwe want to model a component withdelayof 10ns, but allspikes at input > 5 ns are visible output.  Above problemcanbe solvedbyintroducingreject & modelingas follows:  outp <= reject 5 ns inertial Inp after 10 ns; TRANSPORT DELAY  Transport delaymodels the behavior ofa wire, inwhich all pulses (events)are propagated.  Pulses are propagated irrespective ofwidth.  Good for interconnect delays.  Models delays in hardware that doesnot exhibit anyinertial delay.  Represents pure propagation delay  Routing delays canbe modeledusing transport delay Z<= transport a after 10 ns;
  • 6. Delta Delay  Deltadelayneededtoprovide supportforconcurrentoperationswithzerodelay  Schedulingof zerodelay devicesrequiresthe delta delay.  A deltadelayisnecessaryif nootherdelayisspecified.