Chapter 10 Advanced Features - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Chapter 10 Advanced Features

Description:

It also provides a mechanism to refer to the same named item in different ways ... These attributes create new signals from the signals with which they are associated. ... – PowerPoint PPT presentation

Number of Views:92
Avg rating:3.0/5.0
Slides: 28
Provided by: personal
Category:

less

Transcript and Presenter's Notes

Title: Chapter 10 Advanced Features


1
Chapter 10 Advanced Features
Dec. 1st
2
Generate 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.

3
Example 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)

4
Vhdl code
5
Simulation results
6
Using Generate statement
7
Simulation results
8
Another example revisit
9
Another example revisit
10
Equivalent description using generate statement
11
Simulation results
12
Conditional generate statement
13
Conditional generate statement
14
Simulation results
15
Aliases
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.
16
Aliases
15
8
5
4
3
0
DATA_BUS
RESET
STATUS
RX_READY
17
Attribute
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
18
Example of attribute
19
Value 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
20
Value 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
21
Function 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)
22
Function 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.
23
Function 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.
24
Function attributes
Function kind attributes returning information
about signals 'event 'active 'last_event
'last_value 'last_active
25
Function 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
26
Function 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.
27
Function attributes
Write a Comment
User Comments (0)
About PowerShow.com