UVVM VVC Creation from BFMs

First off Thank for creating the UVVM Lib. It was selected and used on the current project for creatin 20+ BFMs for multiple busses based on UVVM Util. On the next project we may use the VVC Framework. I am looking for some guidance or confirmation.

All of the VIP have a GEN and BFM package. The BFM is based on UVVM the GEN creates an array of data that is specific to the Bus stimulus or response. I believe that is the GEN can be added to the VVC and this would be the cleanest approach. Here is and an example of our Ethernet GEN and BFM. The ETH BFM can be configured for multiple standards (MII,RMII,GMII,RGMII).

The ETH GEN configures for multiple packets.
type t_eth_pkg is ( S_ETH_PKT,
S_IPV4_PKT,
S_IPV6_PKT,
S_UDP_PKT,
S_TS_PKT,
S_DRN_PKT,
S_SERI_PKT,
S_VRT_PKT
);

type t_eth_gen_config is
record
eth_config : t_eth_config;
eth_header_config : t_eth_header_config;
eth_trailer_config : t_eth_trailer_config;
ip_config : t_ip_config;
ipv4_header_config : t_ipv4_header_config;

–GEN
eth_gen_1.eth_gen_pkt ( eth_pkt => eth_pkt,
data_value => GEN_DATA_VALUE,
gen_eth_pkt => GEN_DATA,
gen_eth_pkt_len => gen_eth_pkt_len,
config_com => eth_com_config,
config_gen => eth_gen_config
);
–BFM
eth_bfm_1.eth_master_transmit(data_value => GEN_DATA(0 to gen_eth_pkt_len-1),
eth_tx_if => eth_tx_if_1,
config => eth_bfm_1_config);

So I thinking that I will need to pass in some info on the GEN config to the vcc_methods_pkg
procedure eth_master_transmit(
signal VVCT : inout t_vvc_target_record;
constant vvc_instance_idx : in integer;
constant channel : in t_channel;
constant eth_pkt : in t_eth_pkt; --NEW
constant data_array : in t_byte_array;
constant msg : in string;
constant scope : in string := C_VVC_CMD_SCOPE_DEFAULT;
constant parent_msg_id_panel : in t_msg_id_panel := C_UNUSED_MSG_ID_PANEL;
constant config_com : in t_gen_config := C_GEN_CONFIG_DEFAULT; --NEW -need to pass to executer
constant config_eth_gen : in t_eth_gen_config := C_ETH_GEN_CONFIG_DEFAULT; --NEW -need to pass to executer
) is

and then use the info and the GEN and BFM in the eth_tx_vcc.vhd
case v_cmd.operation is – Only operations in the dedicated record are relevant
– VVC dedicated operations
–===================================
when MASTER_TRANSMIT =>
– Set transaction info
set_global_vvc_transaction_info(vvc_transaction_info_trigger, vvc_transaction_info, v_cmd, vvc_config);

     -- Call the corresponding procedure in the GEN package --NEW
     eth_gen_pkt(eth_pkt           => v_cmd.eth_pkt,
                 data_value        => v_cmd.data_array(0 to v_cmd.data_array_length-1),
                 gen_eth_pkt       => v_gen_eth_pkt,      --NEW
                 gen_eth_pkt_len   => v_gen_eth_pkt_len,  --NEW
                 config_com        => v_cmd.config_com,
                 config_gen        => v_cmd.config_eth_gen
                 );

     -- Call the corresponding procedure in the BFM package.
     eth_master_transmit( data_array    => v_gen_eth_pkt(0 to v_gen_eth_pkt_len-1),                 
                          gmii_tx_if    => gmii_vvc_tx_if,
                          msg           => format_msg(v_cmd),
                          scope         => C_SCOPE,
                          msg_id_panel  => v_msg_id_panel,     
                          config        => vvc_config.bfm_config
                          );

Hi bdecelles,

Not sure actually what your question is, I assume some guidance.

Take a look at

Rune Baeverrud has made this example which might give you some guidance

HTH
Rgds,
Eric

Hi so to be specific. I have a procedure that creates/generates the data array used by the BFM called GEN.

Q1- should I place this GEN in the VVC right before the BFM?

Q2 - the GEN required a two config to map the data confg_com and config_gen. Should I add these as inputs if the vvc_method_pkg procedure call?

Q3 - In the vcc_method_pkg procedure eth_master_transimit should I make config_com and config_gen part of the v_cmd as v_cmd.config_com and v_cmd.config_gen and then use v_cmd in the VVC?

I think this should work but is there some other approach I should be considering? Thanks.