TWiki
>
P1076/Ballots Web
>
Vhdl2019CollectedRequirements
>
AttributeShorthand
(2020-02-17,
JimLewis
)
(raw view)
E
dit
A
ttach
---+ Attribute Shorthand %TOC% ---++ Proposal Details * Who Updates: Main.DanielKho, <Add Main.YourName > * Date Proposed: * Date Last Updated: * Priority: * Complexity: * Focus: ---+++ Current Situation Currently we need to declare every attribute before we use it to decorate an object. In many instances, an attribute is only applied to one object, instead of many objects. In these cases, it makes sense that we do not need to declare the attribute before we apply it to an object. ---+++ Requirement Propose a shorthand to specify attributes. ---+++ Implementation details For cases where an attribute can be applied to more than one object, the traditional way of specifying attributes may be used: <verbatim>attribute period:time; attribute period of clk0:signal is 10 ns; attribute period of clk1:signal is 20 ns;</verbatim> For cases where an attribute only needs to be applied for a single object, a shorthand may be used: <verbatim>attribute period:time of clk:signal is 10 ns; attribute maxTransition:time of clk:signal is 1.5 ns;</verbatim> It would be an error if an attribute is redeclared as a different type: <verbatim>attribute period:time of clk0:signal is 10 ns; attribute period:integer of clk1:signal is 100; -- error, can't have a different -- type for previously-declared attribute.</verbatim> It would be an error if an attribute is redefined for a previously-defined object: <verbatim>attribute period:time of clk:signal is 10 ns; attribute period:time of clk:signal is 20 ns; -- error, conflicting attributes</verbatim> If an attribute is redeclared to a different object, the declaration is ignored, but the previously-declared attribute adds a binding to the new object: <verbatim>attribute period:time of clk0:signal is 10 ns; attribute period:time of clk1:signal is 15 ns; -- declaration dropped, the "period" attribute -- adds a new binding to "clk1".</verbatim> ---+++ Code Examples ---++ Use Cases Specifying physical constraints for layout (area, placement, routing), timing, and I/O. <verbatim> /* Example Xilinx constraints. */ attribute loc:string; attribute diff_term:boolean; attribute iostandard:string; attribute pullup:boolean; attribute area_group:string; attribute rloc_range:string; /* I/O placement constraints and analogue buffer assignments. */ attribute loc of reset:signal is "h10"; -- pushbutton attribute iostandard of reset:signal is "lvdci_25"; attribute loc of sysClkP:signal is "j9"; attribute diff_term of sysClkP:signal is true; attribute iostandard of sysClkP:signal is "lvds_25"; attribute loc of sysClkN:signal is "h9"; attribute diff_term of sysClkN:signal is true; attribute iostandard of sysClkN:signal is "lvds_25"; attribute loc of led:signal is "ad24 ae24 ag23 ab23 ae23 ae22 ac24 ac22"; attribute iostandard of led:signal is "lvcmos25";</verbatim> ---++ Arguments FOR Useful for backend / physical design, especially when specifying constraints on area, placement, timing, I/O, and any other physical design constraints directly from HDL. ---++ Arguments AGAINST ---++ General Comments -- Main.DavidKoontz - 2015-01-03 This strikes me as the opposite way around, you'd think you'd want to assign an attribute where the signal in your example is declared, noting that you can't use either object until they are declared. -- Main.DanielKho - 2015-01-04 Yes, the signal / variable that the attribute is applying to must have already been declared earlier. However, the attribute declaration and binding to an object is done in a single statement. Subsequent declarations of the same attribute will be ignored, but new bindings can be applied. ---++ Supporters _Add your signature here to indicate your support for the proposal_ <div id="_mcePaste" style="position: absolute; left: -10000px; top: 393px; width: 1px; height: 1px; overflow: hidden;"> <pre>attribute period:time; attribute period of clk:signal is 10 ns; attribute maxTransition:time; attribute maxTransition of clk:signal is 1.5 ns;</pre> </div> -- Main.DanielKho - 2015-01-02 -- Main.PatrickLehmann - 2016-02-19
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r7
<
r6
<
r5
<
r4
<
r3
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r7 - 2020-02-17 - 15:34:49 -
JimLewis
P1076/Ballots
Log In
or
Register
P1076/Ballots 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-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback