250+ TOP MCQs on Architecture and Answers

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

1. What does the architecture of an entity define?
a) External interface
b) Internal functionality
c) Ports of the entity
d) Specifications
Answer: b
Clarification: Basically, entity describes the interface to the VHDL model and its architecture describes the internal view of that entity. It describes the functionality and contains the statements which describe the behavior of entity.

2. Which of the following is the correct syntax for architecture declaration and definition?
a)

ARCHITECTURE architecture_type OF entity_name IS
     Declarations_for_architecture;
     BEGIN
     Code;
     ….
    END architecture_name;

b)

ARCHITECTURE architecture_name OF entity_name IS
     BEGIN
     Declarations_for_architecture;
     Code;
     ….
    END architecture_name;

c)

ARCHITECTURE architecture_type OF entity_name IS
     BEGIN
     Declarations_for_architecture;
     Code;
     ….
    END architecture_type;

d)

ARCHITECTURE architecture_name OF entity_name IS
     Declarations_for_architecture
     BEGIN
     Code;
     ….
     END architecture_name;

View Answer

Answer: d
Clarification: Architecture has two parts which are declarative part and the code part containing concurrent and sequential statements. Declaration part is optional but the code part is essential. The declaration of architecture is started with the keyword ARCHITECTURE followed by its name and then the name of entity. Then, the declaration part is used to declare and then BEGIN keyword is used to start the code part.

 
 

3. What does the declarative part of architecture contain?
a) Declaration of another entity
b) Declaration of libraries and packages
c) Declaration of local signals, constants or subprograms
d) Declaration of Architecture type
Answer: c
Clarification: Declarative part is the optional part of architecture definition. In this section, the local signals, constants, variables or subprograms are declared which are needed in the architecture. The scope of variables declared in this region is limited to the architecture only.

4. The statements in between the keyword BEGIN and END are called _______
a) Concurrent statements
b) Netlist
c) Declaration statement
d) Entity function
Answer: a
Clarification: The proper word for the statements between BEGIN and END is Concurrent statements since they are executed concurrently. The code in between BEGIN and END describes the functionality or structure of the entity. BEGIN keyword specifies the starting of code.

5. Which of the following is the correct architecture for a simple Nand gate?
a)

ARCHITECTURE my_arch OF nand_gate IS
    BEGIN
    x <= a NAND b;
    END my_arch;

b)

BEGIN
     ARCHITECTURE my_arch OF nand_gate IS
    x <= a NAND b;
    END behavioral;

c)

BEGIN
    ARCHITECTURE behavioral OF nand_gate IS
    x <= a NAND b;
    END my_arch;

d)

ARCHITECTURE nand OF nand_gate IS
    BEGIN
    x <= a NAND b;
    END nand;

View Answer

Answer: a
Clarification: For correct syntax, the word ARCHITECTURE must be followed by the name of architecture which may not contain the reserved words. After which BEGIN keyword is used to show the beginning of code section of the architecture and at last END keyword is used followed by name of architecture. Therefore, only option a is correct architecture of NAND gate explaining its functionality.

 
 

6. Which of the following can be the name of an architecture?
a) arch 1
b) 1arch
c) arch_1
d) architecture
Answer: c
Clarification: The name of architecture is its identifier and hence, it will follow the same rule as that of identifiers. It may contain alphanumeric characters and underscore character starting with alphabet always. Also, name can’t be same as any of the reserved word of VHDL.

7. An entity can’t be described by more than one architecture.
a) True
b) False
Answer: b
Clarification: It is false that an entity can’t have two or more architectures. An entity can be described by using more than one architecture. For an instance, one can define its behavior and another can explain its structure. However, the converse of the statement is not true, one architecture can describe only one entity.

8. Which of the following can’t be declared in the declaration part of the architecture?
a) Signals
b) Subprograms
c) Components
d) Libraries
Answer: d
Clarification: In the declaration part of architecture, the local data objects and subprograms are defined which can be used in the architecture only. However, a library contains packages which are generally used in every VHDL model and they are declared globally at the starting of VHDL code.

9. It is not possible to declare an entity after declaring its architecture.
a) True
b) False
Answer: a
Clarification: An entity is required first to describe its architecture. First of all, entity create an external interface of the system after which we can describe the internal view of entity. Until there is no entity, architecture declaration is not possible.

10. Which of the following statements execute faster?
a) Sequential statements
b) Concurrent statements
c) Declaration statements
d) Loop statements
Answer: b
Clarification: Concurrent statements execute faster than sequential statements. Sequential statements are those which are executed one after another whereas concurrent statements execute concurrently or simultaneously. Therefore, concurrent are faster.