TWiki
>
Sandbox Web
>
InterfacesLCSNotes
(2016-12-29,
BrentHahoe
)
(raw view)
E
dit
A
ttach
---+!! Interfaces LCS/Proposal Notes %TOC% ---++ View Structure Views give mode control to composite <b>type</b> objects declared in interface lists of entity structures. Views have a slightly altered syntax, dependant on whether they apply to a <b>record</b> <b>type</b> or an <b>array</b> <b>type</b>. ---+++ Record View Given a <b>record</b> <b>type</b> - 'MyRecordType': <sticky><pre>%BLACK% <b>type</b> MyRecordType <b>is</b> <b>record</b> ElementA : ElementAType; ElementB : ElementBType; ElementC : ElementCType; ElementD, ElementE, ElementF : ElementDEFType; <b>end</b> <b>record</b> MyRecordType; </pre></sticky> A <b>view</b> (!MyRecordView) defining a particular mode definition for a given interface object of <b>record</b> <b>type</b> 'MyRecordType': <sticky><pre>%BLACK% <b>view</b> MyRecordView <b>of</b> MyRecordType <b>is</b> <b>record</b> ElementA : ElementAMode; ElementB : ElementBMode; ElementC : ElementCMode; ElementD, ElementE, ElementF : ElementDEFMode; <b>end</b> <b>record</b> <b>view</b> MyRecordView; </pre></sticky> ---+++ Array View Given an <b>array</b> <b>type</b> - 'MyArrayType': <sticky><pre>%BLACK% <b>type</b> MyArrayType <b>is</b> <b>array</b>( <b>of</b> ElementType; </pre></sticky> A <b>view</b> (!MyArrayView) defining a particular mode definition for a given interface object of <b>record</b> <b>type</b> 'MyArrayType': <sticky><pre>%BLACK% <b>view</b> MyArrayView <b>of</b> MyArrayType <b>is</b> <b>array</b>( TypeRangeZ : TypeRangeZMode, TypeRangeY : TypeRangeYMode, TypeRangeX : TypeRangeXMode) <b>end</b> <b>array</b> <b>view</b> MyArrayView; </pre></sticky> ---+++ Examples Some general examples of usage. Bottom level is a general peripheral interface: <sticky><pre>%BLACK% <b>type</b> MyPeripheralType <b>is</b> <b>record</b> Select : Std_uLogic; Enable : Std_uLogic; Read_Write : Std_uLogic; ReadData : Std_uLogic_Vector(31 downto 0); WriteData : Std_uLogic_Vector(31 downto 0); <b>end</b> <b>record</b> MyPeripheralType; </pre></sticky> <sticky><pre>%BLACK% <b>view</b> MyPeripheralView <b>of</b> MyPeripheralType <b>is</b> <b>record</b> Select : <b>in</b>; Enable : <b>in</b>; Read_Write : <b>in</b>; ReadData : <b>in</b>; WriteData : <b>out</b>; end <b>record</b> <b>view</b> MyPeripheralView; </pre></sticky> One peripheral interface is then mapped into an <b>array</b> of many peripheral interfaces. The new mode *null* is used to disconnect all other peripheral interfaces and allow one to be connected using a generic value: <sticky><pre>%BLACK% <b>type</b> MyInterfaceType <b>is</b> <b>array</b>(50 downto 1) <b>of</b> MyPeripheralType; </pre></sticky> <sticky><pre>%BLACK% <b>view</b> MyInterfaceView <b>of</b> MyInterfaceType <b>is</b> <b>generic</b>( <b>constant</b> value_g : Positive); <b>array</b>( 50 : <b>in</b>, value_g : <b>view</b> MyPeripheralView, others : <b>null</b>); <b>end</b> <b>array</b> <b>view</b> MyInterfaceView; </pre></sticky> The top level adds in interface clock and reset: <sticky><pre>%BLACK% <b>type</b> MyTopBusType <b>is</b> <b>record</b> Reset : Std_uLogic; Clock : Std_uLogic; MyInterface : MyInterfaceType; <b>end</b> <b>record</b> MyTopBusType; </pre></sticky> <sticky><pre>%BLACK% <b>view</b> MyTopBusView <b>of</b> MyTopBusType <b>is</b> <b>generic</b>( <b>constant</b> item_g : Positive) <b>record</b> Reset : <b>in</b>; Clock : <b>in</b>; MyInterface : <b>view</b> MyInterfaceView(value_g => item_g); end <b>record</b> <b>view</b> MyTopBusView; </pre></sticky> ---++ Bundles We need <b>bundle</b> objects to provide interconnect and *bundle* interface objects to define entity structure interfaces. With a normal object we have: object_class object_name : subtype indication ; e.g. <b>signal</b> !MySignal : Natural ; We need a similar syntax for a <b>bundle</b>: <b>bundle</b> !MyBundle : ????? ; The association with a <b>bundle</b> is not a <b>type</b> because it has a composite object structure, so let's call it a <b>group</b> <b>type</b>. The only valid format for this(???) is <b>record</b> based: <sticky><pre>%BLACK% <b>group</b> <b>type</b> MyGrype <b>is</b> <b>record</b> <b>signal</b> ElementA : ElementAType; <b>signal</b> ElementB : ElementBType; <b>shared</b> <b>variable</b> ElementC : ElementCType; <b>signal</b> ElementD, <b>signal</b> ElementE, <b>signal</b> ElementF : ElementDEFType; <b>end</b> <b>record</b> MyGrype; </pre></sticky> A <b>bundle</b> can only be declared in a concurrent code region? But what about passing into a subprogram. Then we may want variables and constant classes in the <b>bundle</b> <b>group</b> <b>type</b> as well. This may imply a <b>view</b> of a <b>group</b> <b>type</b> should be able to modify the object class structure?? A <b>bundle</b> of <b>signal</b> declarations may need to be passed into a <b>function</b> as a <b>bundle</b> of <b>constant</b> declarations.
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r5 - 2016-12-29 - 17:13:31 -
BrentHahoe
Sandbox
Log In
or
Register
Sandbox 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