This set of VHDL Multiple Choice Questions & Answers (MCQs) focuses on “Configurations”.
1. Configuration is generally associated with ________
a) Behavioral modeling
b) Dataflow modeling
c) Structural modeling
d) All of the modeling styles
Explanation: Configurations are generally used to connect component instances to the entity or the external interface. It is basically used with modeling at the component level which is structural modeling.
2. It is necessary to use configuration to bind entity to the architecture in case of structural modeling.
Explanation: Configurations are optional and usually are not supported by the synthesis tools. They are used in structural modeling but it is not necessary every time to use a configuration. It makes code more complex.
3. Among the following cases, when the configurations must be used?
a) One entity and two architectures
b) Two entities and one architecture
c) Two entities and no architecture
d) One entity and no architecture
Explanation: The configurations are used when there are multiple number of entities and architectures. To associate one entity with an architecture. For example, there are two different entities defining different ports and an architecture using structural modeling is defining two components with ports in both entities. In that case, configuration can be used to associate the component with a proper entity.
4. Which of the following is correct syntax for defining a configuration?
FOR instantation_label : component_name USE ENTITY library_name.entity_name[(architecture_name)];
FOR instantation_label : component_name USE ENTITY entity_name[(architecture_name)];
FOR component_name : instantiation_label USE ENTITY library_name.entity_name[(architecture_name)];
FOR component_name : instantiation_label USE ENTITY entity_name[(architecture_name)];
Explanation: The configuration can be directly defined by using a FOR statement in which the label where the component is instantiated is written first and then the name of component is written. Then a USE clause followed by the name of library in which entity is present to which the component is to be linked. After which the architecture name is written which should be used.
5. Which of the following part is optional in a configuration statement?
a) Instantiation label
b) Library name
c) Entity name
d) Architecture name
Explanation: Architecture name is optional, all other parts are compulsory in a configuration statement. Architecture name is only written if there is more than one architecture associated with the entity then only we have to write architecture name.
6. What is the use of default configurations?
a) To bind the architecture and entity
b) To configure block statements in architecture
c) To bind generics with architecture
d) To bind components with entity
Explanation: When there is no configuration used in structural modeling, then default configuration is used to bind the architecture and entity. Default configuration is associated with entities and architectures. The component is automatically associated with the entity by looking at its ports and modes.
7. Which of the following is true about configurations?
a) To use architecture in configurations, it must be first added to some library
b) A configuration can use more than one architecture for an entity
c) To use an entity in configurations, it must be first added to some library
d) A configuration can’t use any architecture for any entity
Explanation: Since the library name is written before the name of the entity, so it is necessary to add the entity in some library to use it in a configuration. Also, a configuration binds only one architecture with an entity.
8. Apart from the components ________ can also be associated with configurations.
Explanation: Generics can also be defined and attached with the entity by using configurations. Configuration can bind generics and architectures as well. Just like port map and generic map, configurations do the same for these two.
9. It is necessary to define entity and configuration in the same library.
Explanation: For any design configuration of some design entity and the configuration itself must be included in the same library. In most cases, the library used is work library, but it is not mandatory to use work every time.
10. Which of the following is not a part of the configuration statement?
a) Architecture specification
b) Instance specification
c) Binding indication
d) Library binding
Explanation: There are always three parts in a configuration statement. First of all architecture is specified by using FOR keyword. Second part is instance specified in which component name followed by instance label is specified. Last part of the statement is a binding indication which specifies the entity name to which architecture should be associated.
11. As a VHDL designer, what should you make sure about the design so that it is synthesized correctly?
a) It must use a configuration when more than one architecture is used
b) All the component ports and entity ports must be matched
c) A configuration must be there always
d) A configuration is used when ports are mismatched
Explanation: Configurations are generally not supported by synthesis tools, so one must ignore them. It should be made sure that all the ports of all components are matching with their counterparts in entities.
Sanfoundry Global Education & Learning Series – VHDL.
To practice all areas of VHDL, here is complete set of 1000+ Multiple Choice Questions and Answers.
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!