TWiki
>
P1076 Web
>
Vhdl2019CollectedRequirements
>
InterfaceAndBundleEnhancements
>
UCInterfaceDocCurrentCapab
(2016-01-21,
BrentHahoe
)
(raw view)
E
dit
A
ttach
---+ 4. Current Capabilities At a bare minimum an interface is a composite with a method to group the subprograms together. To some degree, this can be done using a *record* for the composite and a *package* to group the *record* with the subprograms. ---+++ 4.1.1. Single Record + Package Using current language features, an interface could be a *record* and subprograms defined in a *package*. Since all of the *record* elements are not in the same direction, the *record* object must be an *inout* of an *entity*. As a result, all *record* elements must be of a resolved *subtype* (based on *std_logic*). This is shown in the following example: <sticky><verbatim> type UartTbRecType is record CmdRdy : std_logic ; CmdAck : std_logic ; Data : std_logic_vector (7 downto 0); StatusMode : unsigned ( 3 downto 0) ; TbErrCnt : unsigned (15 downto 0) ; UartBaudPeriod : unsigned (31 downto 0) ; NumDataBits : unsigned ( 2 downto 0) ; ParityMode : unsigned ( 2 downto 0) ; NumStopBits : std_logic ; end record ; </verbatim></sticky> To resolve drivers, all of the *record* elements are initialized to *'Z'*. Typically this is done with a constant, such as the one that follows. <sticky><verbatim> constant InitTbUartTbRec : UartTbRecType := ( CmdRdy => 'Z', CmdAck => 'Z', Data => (others => 'Z'), StatusMode => (others => 'Z'), TbErrCnt => (others => 'Z'), UartBaudPeriod => (others => 'Z'), NumDataBits => (others => 'Z'), ParityMode => (others => 'Z'), NumStopBits => (others => 'Z') ) ; </verbatim></sticky> In this approach, supporting subprograms are needed for handshaking through the *record* interface. These are somewhat generic in that any interface that uses the same method for handshaking can use them. In addition, supporting subprograms are also needed for copying values to the *record* at the start of a transaction and out of the *record* at the end of a transaction. These would be specific to a particular interface as they have characteristics that are based on the interface itself (address, data, and operation type). ---+++ 4.1.2. Two Records There are also transaction-based testbench approaches that use two records: one for *"in"* and the other for *"out"*. As a result, there are no drivers to resolve. Since this is not a single element, it is not a true interface, but it is "Interface like". When using multiple records, both records must be specified on the interface and with every subprogram call (transaction initiation).
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 2016-01-21 - 11:46:34 -
BrentHahoe
P1076
Log In
or
Register
P1076 Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
Main
P1076
Ballots
LCS2016_080
P10761
P1647
P16661
P1685
P1734
P1735
P1778
P1800
P1801
Sandbox
TWiki
VIP
VerilogAMS
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback