ModelSimAEで頑張る。
ModelSimAEで頑張る。
class uart_env extends ovm_env;// コントロール変数protected int unsigned baud = 2400;function new(string name="uart_env" ,ovm_component parent);super.new(name ,parent);endfunction`ovm_component_utils_begin(uart_env)`ovm_field_int(baud, OVM_ALL_ON|OVM_UNSIGNED)`ovm_component_utils_end// メンバ変数protected virtual interface uart_if intf;// コンポーネントuart_master_agent uart_tx;// buildfunction void build;super.build;set_config_int ("uart_tx.sequencer" ,"count" ,0);uart_tx = uart_master_agent::type_id::create("uart_tx", this);endfunction// インターフェース接続function void assign_vi(virtual interface uart_if intf);this.intf = intf;uart_tx.assign_vi(intf);endfunctionendclass