VHDL Questions and Answers – Attributes

This set of VHDL Multiple Choice Questions & Answers (MCQs) focuses on “Attributes”.

1. What is the use of an attribute?
a) To find all characteristics of an entity
b) To find all characteristics of architecture
c) To extract some additional information about some object
d) To extract information about clock signals
View Answer

Answer: c
Explanation: An attribute is a feature of VHDL that allows you to extract additional information about any object. This object can be either a signal, variable or a type. It can also be associated with an entity but it returns a single value which means single information.

2. Predefined attributes are defined as a part of _________ standard.
a) 1164
b) 1076
c) 1162
d) 1093
View Answer

Answer: b
Explanation: The VHDL describes some fundamental kinds of attributes. These different attributes are defined as a part of 1076 standard. All other attributes which are defined outside this standard are called user defined attributes.

3. How many fundamental kinds of predefined attributes are there?
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: d
Explanation: There are five fundamental kinds of predefined attributes which are generally named after their return type. Value kind, Function kind, Signal kind, Type kind and Range kind are the five fundamental kinds of predefined attributes.
advertisement
advertisement

4. What is the basic syntax to write an attribute?
a) Object_name’ attribute_name (parameter)
b) Attribute_name’ Object_name (parameter)
c) Object_name : Attribute_name (parameter)
d) Attribute_name : Object_name (parameter)
View Answer

Answer: a
Explanation: To use a predefined attribute, an object is used. First of all the object name is written followed by apostrophe sign and then the attribute name. There are parameters for some attributes which can be written within parentheses immediately after the attribute name.

5. Which can’t be a result of a predefined attribute?
a) A value
b) A function
c) An entity
d) A signal
View Answer

Answer: c
Explanation: As specified before, an attribute can return a value, function, signal, type or range. It can’t return an entity. The result of an attribute can be a value in case of value kind attributes and similarly for other five fundamental types.

6. How to declare a user defined attribute?
a) ATTRIBUTE name’ return_type;
b) ATTRIBUTE name : return_type;
c) ATTRIBUTE’ name : return_type;
d) ATTRIBUTE’ name’ return_type;
View Answer

Answer: b
Explanation: Apostrophe sign is used at the time when we need to use the attribute but not at the time of declaration. The declaration of user defined attribute includes the keyword ATTRIBUTE followed by the name of attribute. The type is also specified at the time of declaration which is placed after a colon sign.

7. Array attributes are those which ________
a) Returns array type
b) Can be used on arrays
c) Can’t be used on arrays
d) Returns scalar values
View Answer

Answer: b
Explanation: Array attributes can be used on arrays. It can be used to find the range, length and other characteristics of an array. So, it can be used to find a particular index type.
advertisement

8. Which of the following is used to extract information of non-array types?
a) Vector type
b) Scalar type
c) Non vector type
d) Array type
View Answer

Answer: b
Explanation: Those attributes which are used to extract information of non-array types are called Scalar type or scalar kind attributes. It can be used only on pre-defined data types and not on enumeration data types.

9. Attributes on enumeration types are synthesizable.
a) True
b) False
View Answer

Answer: b
Explanation: Attributes on enumeration types are not synthesizable and can’t be used in the design which we need to synthesize. Even there are some predefined attributes that are not completely synthesizable.
advertisement

10. Attributes can be associated with the entities.
a) True
b) False
View Answer

Answer: a
Explanation: It is true that the attributes can be associated with entities apart from functions, values or signals. The information about entities can also be extracted with the help of attributes.

Sanfoundry Global Education & Learning Series – VHDL.

To practice all areas of VHDL, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.