OpenCores
URL https://opencores.org/ocsvn/openhmc/openhmc/trunk

Subversion Repositories openhmc

[/] [openhmc/] [trunk/] [openHMC/] [sim/] [tb/] [bfm/] [testlib/] [hmc_base_test.sv] - Diff between revs 12 and 15

Show entire file | Details | Blame | View Log

Rev 12 Rev 15
Line 61... Line 61...
 
 
                //-- AXI4 request config
                //-- AXI4 request config
                axi4_req_config = axi4_stream_config::type_id::create("axi4_req_config", this);
                axi4_req_config = axi4_stream_config::type_id::create("axi4_req_config", this);
                axi4_req_config.master_active = UVM_ACTIVE;
                axi4_req_config.master_active = UVM_ACTIVE;
                axi4_req_config.slave_active = UVM_PASSIVE;
                axi4_req_config.slave_active = UVM_PASSIVE;
 
                axi4_req_config.open_rsp_mode  = UVM_PASSIVE;
 
 
                uvm_report_info(get_type_name(), $psprintf("Setting the axi4_req config:\n"), UVM_LOW);
                uvm_report_info(get_type_name(), $psprintf("Setting the axi4_req config:\n"), UVM_LOW);
                uvm_config_db#(axi4_stream_config)::set(this, "hmc_tb0", "axi4_req_config", axi4_req_config);
                uvm_config_db#(axi4_stream_config)::set(this, "hmc_tb0", "axi4_req_config", axi4_req_config);
 
 
                //-- AXI4 response config
                //-- AXI4 response config
                axi4_rsp_config = axi4_stream_config::type_id::create("axi4_rsp_config", this);
                axi4_rsp_config = axi4_stream_config::type_id::create("axi4_rsp_config", this);
                axi4_rsp_config.master_active = UVM_PASSIVE;
                axi4_rsp_config.master_active = UVM_PASSIVE;
                axi4_rsp_config.slave_active = UVM_ACTIVE;
                axi4_rsp_config.slave_active = UVM_ACTIVE;
 
                axi4_rsp_config.open_rsp_mode = `OPEN_RSP_MODE==1 ? UVM_ACTIVE : UVM_PASSIVE;
 
 
                uvm_report_info(get_type_name(), $psprintf("Setting the axi4_rsp config:\n"), UVM_LOW);
                uvm_report_info(get_type_name(), $psprintf("Setting the axi4_rsp config:\n"), UVM_LOW);
                uvm_config_db#(axi4_stream_config)::set(this, "hmc_tb0", "axi4_rsp_config", axi4_rsp_config);
                uvm_config_db#(axi4_stream_config)::set(this, "hmc_tb0", "axi4_rsp_config", axi4_rsp_config);
 
 
                //-- HMC link config
                //-- HMC link config
                link_cfg = hmc_link_config::type_id::create("link_cfg",this);
                link_cfg = hmc_link_config::type_id::create("link_cfg",this);
 
                link_cfg.cfg_rsp_open_loop = `OPEN_RSP_MODE==1 ? UVM_ACTIVE : UVM_PASSIVE;
                void'(link_cfg.randomize());
                void'(link_cfg.randomize());
 
 
                uvm_config_db#(hmc_link_config)::set(this, "hmc_tb0", "link_cfg", link_cfg);
                uvm_config_db#(hmc_link_config)::set(this, "hmc_tb0", "link_cfg", link_cfg);
 
 
 
 
Line 102... Line 105...
 
 
        virtual task run_phase(uvm_phase phase);
        virtual task run_phase(uvm_phase phase);
                phase.phase_done.set_drain_time(this, 10us);
                phase.phase_done.set_drain_time(this, 10us);
        endtask : run_phase
        endtask : run_phase
 
 
        //function void report_phase(uvm_phase phase);
 
        //    report_summarize();
 
        //endfunction : report_phase
 
 
 
endclass : hmc_base_test
endclass : hmc_base_test
 
 
 
 
class hmc_base_seq extends uvm_sequence;
class hmc_base_seq extends uvm_sequence;
 
 
        function new(string name="hmc_base_seq");
        function new(string name="hmc_base_seq");
                super.new(name);
                super.new(name);
        endfunction : new
        endfunction : new
 
 
        `uvm_object_utils(hmc_base_seq)
        `uvm_object_utils(hmc_base_seq)
        `uvm_declare_p_sequencer(hmc_vseqr)
        `uvm_declare_p_sequencer(vseqr)
 
 
        virtual task pre_body();
        virtual task pre_body();
                if(starting_phase != null)
                if(starting_phase != null)
                        starting_phase.raise_objection(this);
                        starting_phase.raise_objection(this);
        endtask : pre_body
        endtask : pre_body

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.