eDoc Report for Package: shr_apb (version 1.5)
Structs
Structs
Description
shr_apb_agent_u
shr_apb_bfm_u
shr_apb_bus_monitor_u
Declare the monitor unit for the whole bus
shr_apb_driver_u
create a generic APB sequence
shr_apb_env_u
shr_apb_map_address_s
shr_apb_map_address_s
shr_apb_memory_map_u
apb_memory_map
shr_apb_memory_segment_s
shr_apb_memory_segment_s
shr_apb_reserved_space_s
shr_apb_sequence
create a generic APB sequence
shr_apb_signal_map_u
shr_apb_slave_signal_map_u
shr_apb_trans_s
shr_apb_agent_u
(top)
Fields of shr_apb_agent_u
Field
When
Description
env
:
shr_apb_env_u
Back pointer to the eVC instance to which this agent is connected.
kind
:
shr_apb_agent_kind_t
bridge or slave
presence
: erm_active_passive_t
shadow agent or eVC
bfm
: BRIDGE
shr_apb_bfm_u
ACTIVE BRIDGE
bridge_sequence_driver
:
shr_apb_driver_u
ACTIVE BRIDGE
slave_number
: int
ACTIVE BRIDGE
bfm
: SLAVE
shr_apb_bfm_u
ACTIVE SLAVE
name
:
shr_apb_agent_name_t
BRIDGE
id
:
shr_apb_slave_id_t
SLAVE
Methods of shr_apb_agent_u
Method
Description
transfer_completed
(transfer:
shr_apb_trans_s
)
User can extend this method to hook in a scoreboard. The user MUST NOT alter the transfer in any way.
Events of shr_apb_agent_u
Event
Description
clock_fall
clock_rise
these two events are local copies of the main env events which are created for convenience.
transfer_complete
This event is emitted at the same time as the transfer_completed method is called.
shr_apb_bfm_u
(top)
Fields of shr_apb_bfm_u
Field
When
Description
env
:
shr_apb_env_u
backpointer to the env this BFM is for (constrained by agent)
kind
:
shr_apb_agent_kind_t
keep logger.style == GREEN; Is this a BRIDGE or SLAVE
logger
: message_logger
smp
:
shr_apb_signal_map_u
bridge
: ACTIVE BRIDGE
shr_apb_agent_u
BRIDGE
Back pointer to the bridge agent
ssmp
: list of
shr_apb_slave_signal_map_u
BRIDGE
err
: bool
SLAVE
return_value
:
shr_apb_data_t
SLAVE
slave
: ACTIVE SLAVE
shr_apb_agent_u
SLAVE
Back pointer to the slave agent
ssmp
:
shr_apb_slave_signal_map_u
SLAVE
Methods of shr_apb_bfm_u
Method
When
Description
drive_enable_phase
(t:
shr_apb_trans_s
)
BRIDGE
drive_setup_phase
(t:
shr_apb_trans_s
)
BRIDGE
drive_transfer
(t:
shr_apb_trans_s
)
BRIDGE
execute_transfers
()
BRIDGE
get_selnum
(ad:
shr_apb_address_t
): uint(bits: 4)
BRIDGE
check_input
(data_in:
shr_apb_data_t
)
SLAVE
For dut slaves checking
check_output
(data_in:
shr_apb_data_t
, data_out:
shr_apb_data_t
)
SLAVE
get_data
()
SLAVE
extend those 2 functions if you want to proceed a special behaviour of the slave
listen_and_respond
()
SLAVE
put_data
()
SLAVE
Events of shr_apb_bfm_u
Event
Description
clock_fall
clock_rise
These two events are local copies of the main env events which are created for convenience.
shr_apb_bus_monitor_u
(top)
Fields of shr_apb_bus_monitor_u
Field
When
Description
amba3
: bool
cur_slave
: int
cur_transfer
:
shr_apb_trans_s
Transfer properties
cur_transfer_slave
:
shr_apb_slave_id_t
slave target of transfer
env
:
shr_apb_env_u
backpointer to the env this monitor is monitoring.
has_coverage
: bool
has_protocol_checker
: bool
num_of_transfers
: uint
phase
:
shr_apb_phase_t
smp
:
shr_apb_signal_map_u
ssmp
: list of
shr_apb_slave_signal_map_u
tr_number
: int
current transfer number
transfers
: list of
shr_apb_trans_s
start_trans
: bool
has_coverage
defines if transfer is ongoing
transfer_length
: uint
has_coverage
measured in clock cycles
transfer_time
: uint
has_coverage
measured using sys.time
Methods of shr_apb_bus_monitor_u
Method
When
Description
evaluate_state
()
log_transfer
()
For Scoreboard : This method is empty and is called on tr_ended
selected_slave
():
shr_apb_slave_id_t
selected_slave()
set_cur_slave
(i: int)
Methods
clock_cntr
()
has_coverage
count the clocks between transfer_start and transfer_end
Events of shr_apb_bus_monitor_u
Event
Description
bus_phase_trap
cover bus states
data_changed
PWDATA changed
enable_up
go_to_sleep
new_setup
pclk_f
Events
pclk_r
setting_up
tr_enable
tr_ended
tr_ended_bus_cover
tr_started
shr_apb_driver_u like any_sequence_driver
(top)
Fields of shr_apb_driver_u
Field
Description
bridge_bfm
: BRIDGE
shr_apb_bfm_u
Back pointer to the BFM this driver is for
shr_apb_env_u like any_env
(top)
Fields of shr_apb_env_u
Field
Description
active_bridge_name
:
shr_apb_agent_name_t
active_slave_names
: list of
shr_apb_slave_id_t
active_slaves
: list of ACTIVE SLAVE
shr_apb_agent_u
List of all ACTIVE slave agents
all_slave_names
: list of
shr_apb_slave_id_t
amba3
: bool
bridge_presence
: erm_active_passive_t
bus_bridge
: BRIDGE
shr_apb_agent_u
user will have to precise ACTIVE or PASSIVE BRIDGE
bus_monitor
:
shr_apb_bus_monitor_u
Instatiate the bus monitor
has_protocol_checker
: bool
If this field is TRUE then the eVC supplies a protocol checker
log_enable
: bool
memory_map
:
shr_apb_memory_map_u
name
:
shr_apb_bus_name_t
next_id
: int(bits: 16)
passive_slave_names
: list of
shr_apb_slave_id_t
passive_slaves
: list of PASSIVE SLAVE
shr_apb_agent_u
List of all PASSIVE slave agents
reserved_space
:
shr_apb_reserved_space_s
for user memory map
reset_asserted
: bool
slaves
: list of SLAVE
shr_apb_agent_u
List of all slave agents (both passive and eVC-supplied)
smp
:
shr_apb_signal_map_u
The names of the bus signals
ssmp
: list of
shr_apb_slave_signal_map_u
test_length
: uint
Methods of shr_apb_env_u
Method
Description
get_next_slave_id
():
shr_apb_slave_id_t
wait_and_stop_test
()
This TCM waits for
clock cycles and then stops the test
Events of shr_apb_env_u
Event
Description
clock_fall
This event is the falling edge of the bus clock, qualified by reset.
clock_rise
This event is the rising edge of the bus clock, qualified by reset.
reset_change
This event gets emitted each time the reset signal changes state. Note that, depending on how reset is generated, it is possible that this event will be emitted at time zero.
reset_end
This event gets emitted when reset is de-asserted.
reset_start
This event gets emitted when reset is asserted.
unqualified_clock_fall
This event is the falling edge of the bus clock, unqualified by reset.
unqualified_clock_rise
This event is the rising edge of the bus clock, unqualified by reset.
shr_apb_map_address_s
(top)
Fields of shr_apb_map_address_s
Field
Description
end_address
:
shr_apb_address_t
id
:
shr_apb_slave_id_t
start_address
:
shr_apb_address_t
shr_apb_memory_map_u
(top)
Fields of shr_apb_memory_map_u
Field
Description
default_seg_size
: uint(bits: 33)
first_address
:
shr_apb_address_t
last_address
:
shr_apb_address_t
name
:
shr_apb_bus_name_t
next_id
: int(bits: 16)
reserved_space
:
shr_apb_reserved_space_s
reserved_space_copy
: list of
shr_apb_map_address_s
segments
: list of
shr_apb_memory_segment_s
slaves_id
: list of
shr_apb_slave_id_t
Methods of shr_apb_memory_map_u
Method
Description
calc_default_size
(first_addr:
shr_apb_address_t
, last_addr:
shr_apb_address_t
, slaves: list of
shr_apb_slave_id_t
): uint(bits: 33)
calc_default_size() calculate the default size of a segment in an evenly destributed memory map, the size is a multiplicity of 1k
create_undef_seg
(start_addr:
shr_apb_address_t
, end_addr:
shr_apb_address_t
)
get_id
(ind: int):
shr_apb_slave_id_t
get_id_from_idx
(num: uint):
shr_apb_slave_id_t
get_segment
(ad:
shr_apb_address_t
):
shr_apb_memory_segment_s
get_segment(ad: apb_address): apb_memory_segment return the segment in 'segments' that contain 'ad'
get_slave_id
(ad:
shr_apb_address_t
):
shr_apb_slave_id_t
get_slave_number
(ad:
shr_apb_address_t
): uint(bits: 4)
get_unique_evc_slave_id
():
shr_apb_slave_id_t
shr_apb_memory_segment_s
(top)
Fields of shr_apb_memory_segment_s
Field
Description
end_ad
:
shr_apb_address_t
num
: uint
size
: uint(bits: 33)
slave_id
:
shr_apb_slave_id_t
slave ID
start_ad
:
shr_apb_address_t
Methods of shr_apb_memory_segment_s
Method
Description
belong
(ad:
shr_apb_address_t
): bool
** Methods belong() -- return TRUE if 'ad' belongs to the segment
shr_apb_reserved_space_s
(top)
Fields of shr_apb_reserved_space_s
Field
Description
map_addrs
: list of
shr_apb_map_address_s
name
:
shr_apb_bus_name_t
shr_apb_sequence like any_sequence
(top)
Fields of shr_apb_sequence
Field
Description
trans
:
shr_apb_trans_s
For "do trans"
Methods of shr_apb_sequence
Method
Description
read
(addr:
shr_apb_address_t
):
shr_apb_data_t
read one transfer from the bus
write
(addr:
shr_apb_address_t
, data:
shr_apb_data_t
)
write one transfer to the bus
Events of shr_apb_sequence
Event
Description
cover_seq
shr_apb_signal_map_u
(top)
Fields of shr_apb_signal_map_u
Field
Description
APB_PADDR
: string
32-bit address bus
APB_PCLK
: string
clock
APB_PENABLE
: string
enable
APB_PRDATA
: string
read data bus
APB_PREADY
: string
APB_PRESETn
: string
reset (active low)
APB_PSLVERR
: string
APB_PWDATA
: string
32-bit write data bus
APB_PWRITE
: string
transfer direction
amba3
: bool
name
:
shr_apb_bus_name_t
sig_paddr
: inout simple_port of uint(bits: 32)
sig_pclk
: inout simple_port of bit
sig_penable
: inout simple_port of bit
sig_prdata
: inout simple_port of uint(bits: 32)
sig_pready
: inout simple_port of bit
sig_presetn
: inout simple_port of bit
sig_pslverr
: inout simple_port of bit
sig_pwdata
: inout simple_port of uint(bits: 32)
sig_pwrite
: inout simple_port of
shr_apb_direction_t
shr_apb_slave_signal_map_u
(top)
Fields of shr_apb_slave_signal_map_u
Field
Description
APB_PSEL
: string
id
:
shr_apb_slave_id_t
name
:
shr_apb_bus_name_t
sig_psel
: inout simple_port of bit
shr_apb_trans_s like any_sequence_item
(top)
Fields of shr_apb_trans_s
Field
Description
addr
:
shr_apb_address_t
data
:
shr_apb_data_t
Data is the list of bytes to be transferred - size of list depends on transfer size.
direction
:
shr_apb_direction_t
Is this a read or write transfer
driver
:
shr_apb_driver_u
create a generic APB sequence
end_time
: time
err
: bool
slave_number
:
shr_apb_slave_id_t
start_time
: time
transmit_delay
: uint
delay from end of last transfer to requesting the bus for this one in clock cycles
Methods of shr_apb_trans_s
Method
Description
end
()
start
()
Types
(top)
Types
Description
shr_apb_address_t
: uint(bits: 32)
shr_apb_agent_kind_t
: [BRIDGE, SLAVE]
shr_apb_agent_name_t
: [MONITOR]
shr_apb_bus_name_t
: []
shr_apb_data_t
: uint(bits:32)
shr_apb_direction_t
: [READ, WRITE]
shr_apb_phase_t
: [IDLE, SETUP, ENABLE]
no trans currently going
shr_apb_slave_id_t
: [UNDEFINED, S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15]
slave identifier