Configurations 201
FOR shifter
FOR A1 : alu USE CONFIGURATION WORK.alu_con;
END FOR;
FOR shift_reg
FOR R1 : int_reg USE CONFIGURATION WORK.int_reg_con;
END FOR;
END FOR;
END FOR;
END FOR;
END cpu_con;
In the configuration cpu_conof entity cpu, architecture fragmentis
used for the entity. Inside of block reg_array, all (R1through R4) of the
int_regcomponents use configuration int_reg_con. In block shifter,
the alucomponent (A1) uses configuration alu_con. For block shift_reg
inside of block shifter, the int_reg component uses configuration
int_reg_con.
Architecture Configurations
The last type of configuration we discuss is the architecture configuration.
This configuration exists in the architecture declarative region and
specifies the configurations of parts used in the architecture. If this type
of configuration is used, a separate configuration declaration is not
needed to configure the components used in the architecture.
The next example configuration is for a very high-level description of an
autopilot. The autopilot block diagram is shown in Figure 7-5. Following
is an example of this type of configuration:
PACKAGE ap IS
TYPE alt IS INTEGER RANGE 0 TO 50000;
TYPE hdg IS INTEGER RANGE 0 TO 359;
TYPE vdir IS INTEGER RANGE 0 TO 9;
TYPE hdir IS INTEGER RANGE 0 TO 9;
TYPE control IS INTEGER RANGE 0 TO 9;
END ap;
USE WORK.ap.ALL;
ENTITY autopilot IS
PORT( altitude : IN alt;
altitude_set : IN alt;
heading : IN hdg;
heading_set : IN hdg;
rudder : OUT control;