Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

What is attribute and allias in VHDL ?

Status
Not open for further replies.
Joined
Sep 3, 2007
Messages
853
Helped
66
Reputation
132
Reaction score
16
Trophy points
1,298
Activity points
0
What is attribute and allias in VHDL.
Please provide an exemple.
Are these instructions recognized by synthesis tool like DC ?
Thanks.
 

suru

Full Member level 3
Joined
Aug 31, 2007
Messages
157
Helped
4
Reputation
14
Reaction score
1
Trophy points
1,298
Activity points
1,934
Question in VHDL

ATTRIBUTES ARE NOTHING BUT JUST LIKE CHARACTER OF PERSON.,HIEGHT, HAIRSTYLE ETC.
 

farrokhiyan

Junior Member level 3
Joined
Sep 17, 2007
Messages
29
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,283
Activity points
1,473
Re: Question in VHDL

Hi

Please see this file. it describes what you want. also other features of VHDL. search the file for "ATTRIBUTE" and "ALIAS".
it includes helpfull examples.

regards
 

vomit

Full Member level 2
Joined
Jun 14, 2002
Messages
148
Helped
14
Reputation
28
Reaction score
4
Trophy points
1,298
Activity points
1,527
Re: Question in VHDL

An attribute is a user-defined label you can attach to anything. Usually the synthesis tool will just take this label and pass it on in the netlist.
This way, you can control certain routing tools through strategically placed labels.
Code:
attribute preserve_signal : string;
...
signal mysig : std_logic;
...
attribute perserve_signal of mysig:signal is "TRUE";
This glues a label of string type, called "preserve_signal" onto the signal mysig. When the synthesis tool sees this, and if the "preserve_signal" label is a special option for that synthesis tool, it may interpret it as a hint not to optimize away a net.
A label "black_box", when put on a component, may instruct the synthesis tool to preserve it without synthesising the contents.
So the meaning of labels (attributes) is tool-specific. A VHDL-standardized user attribute is called "foreign" (a string attribute) and is used to create external DLL calls for the "FLI" (foreign language interface).
Code:
attribute FOREIGN of myfunc:function is "myDLL:my_c_function";
Similarly, you can put
Code:
attribute LOC: string;
...
attribute LOC of input1 : signal is "P13";
and the Xilinx routing tools will recognize the LOC label as the "location" constraint to put the signal on pin P13. Assuming "input1" is defined in the top entity port of course.

There are also the built-in language attributes, that begin with apostrophe '
They are used to ask certain properties of types, signals, events and arrays. Most of them are not synthesizable, but a lot are. 'event is used for clock edges, 'high, 'left, 'pos, and their opposite counterparts are very useful for writing code that automatically scales with the size of the vectors.

Aliases introduce synonym names. Like
Code:
signal statusregister : std_logic_vector(7 downto 0);
alias status_done : std_logic is statusregister(5);
Now status_done is a synonym for statusregister(5).
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top