Title: Chapter 10 Advanced Features
1Chapter 10 Advanced Features
Dec. 1st
2Generate Statement
- Concurrent statements can be conditionally
selected or replicated using the generate
statement - Using the for-generation scheme, concurrent
statements can be replicated a predetermined
number of times. - With the if-generation scheme, concurrent
statements can be conditionally elaborated.
3Example revisit4 bit full-adder
b
(3)
a
(3)
b
(0)
a
(0)
b
(1)
a
(1)
b
(2)
a
(2)
X0
X1
Cin
X2
X3
C(0)
C
(1)
C
(2)
(3)
CoutC(4)
C
sum
(3)
sum
sum
sum
(0)
(1)
(2)
4Vhdl code
5Simulation results
6Using Generate statement
7Simulation results
8Another example revisit
9Another example revisit
10Equivalent description using generate statement
11Simulation results
12Conditional generate statement
13Conditional generate statement
14Simulation results
15Aliases
An alias declares an alternate name for all or
part of a named item. It provides a convenient
shorthand notation for items that have long
names. It also provides a mechanism to refer to
the same named item in different ways depending
on the context.
16Aliases
15
8
5
4
3
0
DATA_BUS
RESET
STATUS
RX_READY
17Attribute
Attributes are a feature of VHDL that allow you
to extract additional information about an object
(such as a signal, variable or type) that may not
be directly related to the value that the object
carries. predefined attributes user-defined
attributes
18Example of attribute
19Value Attributes
Value kind attributes returning values from array
of values 'left 'right 'high 'low 'length
'ascending
'left Returns the index of the left-most element
of an array  Example
20Value Attributes
'right Returns the index of the right-most
element of an array
'high Returns the largest value of the indices
of an array
low, 'length, 'ascending can be found in the
textbook
21Function attributes
Function attributes represent functions that are
called to obtain a value.
Returning information about a given type, signal,
or array value 'pos(value) 'val(value)
'succ(value) 'pred(value) 'leftof(value)
rightof(value)
22Function attributes
'pos(name) Returns an integer number
corresponding to the position of the "name" in a
list
'val(position) Returns the value of the variable
at the specified position in a list of
variables.
23Function attributes
'succ(value) Returns the value of the variable
at the position following the specified item in
a list of variables.
'Pred(value) Returns the value of the variable
at the position preceding the specified item in
a list of variables.
24Function attributes
Function kind attributes returning information
about signals 'event 'active 'last_event
'last_value 'last_active
25Function attributes
'event Returns an value 'true' if the signal
changed in value during the current simulation
delta cycle.
'active Returns an value 'true' if any
transaction (scheduled event) occurred on the
specified signal during the current simulation
delta cycle
26Function attributes
Signal kind attributes 'delayed(time)
'stable(time) 'quiet(time) 'transaction These
attributes create new signals from the signals
with which they are associated. 'delayed(time),
'quiet(time) , 'transaction are not supported by
xilinx webpack.
27Function attributes