Skip to content

5.Configuration

sagarpattar0 edited this page Nov 29, 2022 · 9 revisions

Global package variables

Table 5.1 Global package variables

Name Type Description
NO_OF_SLAVES integer specifies no of slaves connected to the APB interface
APB_transfer_char_s struct Structure to hold the packet data.
APB_transfer_cfg_s struct Structure to hold the configuration data.
apb_fsm_state_e enum Represents the type of state IDLE SETUP
ACCESS
slave_no_e enum Used to select the one slave at a time by one hot encoding SLAVE_0 = 16'b0000_0000_0000_0001 SLAVE_1 = 16'b0000_0000_0000_0010 SLAVE_2 = 16'b0000_0000_0000_0100 SLAVE_3 = 16'b0000_0000_0000_1000 SLAVE_4 = 16'b0000_0000_0001_000 SLAVE_5 = 16'b0000_0000_0010_0000
endian_e enum LITTLE_ENDIAN=1’b0 : lsb bit will store in first address location BIG_ENDIAN = 1’b1 : msb bit will store in first address location
tx_type_e enum WRITE=1’b1 : write transfer happen READ=1’b0 : read transfer happen
protectiontype_e enum Used to represent the protection type for transaction NORMAL_SECURE_DATA = 3'b000 NORMAL_SECURE_INSTRUCTION = 3'b001 = 3'b010 NORMAL_NONSECURE_INSTRUCTION = 3'b011
PRIVILEGED_SECURE_DATA = 3'b100 PRIVILEGED_SECURE_INSTRUCTION = 3'b101
slave_error_e enum Represents slave error signal NO_ERROR=1’b0;ERROR=1’b1;

Configuration used

  1. Env configuration
  2. Master Agent configuration
  3. Slave Agent configuration

Master agent configuration

Table 5.2 Master_agent_config |Name |Type |Default value| Description| |-|-|-|
|is_active|enum |VM_ACTIVE It will be used for configuring an agent as an active agent means it has sequencer, driver and monitor or passive agent which has monitor only.|
|no_of_slaves |integer |‘d1 Used for specifying the number of slaves connected to the master|
|has_coverage |integer |‘d1 Used for enabling the master agent coverage|

Slave agent configuration

Table 5.3 Slave_agent_config

|Name| Type| Default value |Description| |-|-|-| |is_active enum UVM_ACTIVE It will be used for configuring agent as an active agent means it has sequencer,driver and monitor and if it’s a passive agent then it will have only monitor slave _id integer ‘d0 Used for indicating the ID of this slave e.g. slave 0 is selected. has_coverage integer ‘d1 Used for enabling the slave agent coverage.

Clone this wiki locally