250+ TOP MCQs on Attributes and Answers

This set of VHDL Multiple Choice Questions & Answers (MCQs) 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
Answer: c
Clarification: 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
Answer: b
Clarification: 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
Answer: d
Clarification: 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.

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)
Answer: a
Clarification: 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.

  250+ TOP MCQs on All Keywords in VHDL – 3 and Answers

5. Which can’t be a result of a predefined attribute?
a) A value
b) A function
c) An entity
d) A signal
Answer: c
Clarification: 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;
Answer: b
Clarification: 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
Answer: b
Clarification: 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.

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
Answer: b
Clarification: 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.

  250+ TOP MCQs on Procedures – 1 and Answers

9. Attributes on enumeration types are synthesizable.
a) True
b) False
Answer: b
Clarification: 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.

10. Attributes can be associated with the entities.
a) True
b) False
Answer: a
Clarification: 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.

Scroll to Top