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

Subversion Repositories openhmc

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

Show entire file | Details | Blame | View Log

Rev 12 Rev 15
Line 60... Line 60...
                `include "register_file_model_8x.sv"
                `include "register_file_model_8x.sv"
        `endif
        `endif
 
 
        `include "hmc_packet.sv"
        `include "hmc_packet.sv"
        `include "hmc_req_packet.sv"
        `include "hmc_req_packet.sv"
        //`include "hmc_req_posted_packet.sv"
 
        `include "hmc_2_axi4_sequencer.sv"
        `include "hmc_2_axi4_sequencer.sv"
        `include "hmc_2_axi4_sequence.sv"
        `include "hmc_2_axi4_sequence.sv"
        `include "tag_handler.sv"
        `include "tag_handler.sv"
 
 
        `include "hmc_link_config.sv"
        `include "hmc_link_config.sv"
        `include "hmc_vseqr.sv"
        `include "vseqr.sv"
 
 
        `include "axi4_stream_hmc_monitor.sv"
        `include "axi4_stream_hmc_monitor.sv"
        `include "bfm_2_hmc_monitor.sv"
        `include "bfm_2_hmc_monitor.sv"
 
 
        `include "hmc_tb.sv"
        `include "hmc_tb.sv"
Line 81... Line 80...
 
 
        //-- instantiate the interfaces
        //-- instantiate the interfaces
        axi4_stream_if #(
        axi4_stream_if #(
                .DATA_BYTES(`AXI4BYTES),
                .DATA_BYTES(`AXI4BYTES),
                .TUSER_WIDTH(`AXI4BYTES)
                .TUSER_WIDTH(`AXI4BYTES)
                ) axi4_hmc_req_if(
                ) axi4_hmc_req_if();
                        .ACLK(clk_user),
 
                        .ARESET_N(res_n)
 
                        );
 
 
 
        axi4_stream_if #(
        axi4_stream_if #(
                .DATA_BYTES(`AXI4BYTES),
                .DATA_BYTES(`AXI4BYTES),
                .TUSER_WIDTH(`AXI4BYTES)
                .TUSER_WIDTH(`AXI4BYTES)
                ) axi4_hmc_rsp_if(
                ) axi4_hmc_rsp_if();
                        .ACLK(clk_user),
 
                        .ARESET_N(res_n)
 
                        );
 
 
 
        cag_rgm_rfs_if #(
        cag_rgm_rfs_if #(
                .ADDR_WIDTH(`RFS_HMC_CONTROLLER_RF_AWIDTH),
                .ADDR_WIDTH(`RFS_OPENHMC_RF_AWIDTH),
                .READ_DATA_WIDTH(`RFS_HMC_CONTROLLER_RF_RWIDTH),
                .READ_DATA_WIDTH(`RFS_OPENHMC_RF_RWIDTH),
                .WRITE_DATA_WIDTH(`RFS_HMC_CONTROLLER_RF_WWIDTH)
                .WRITE_DATA_WIDTH(`RFS_OPENHMC_RF_WWIDTH)
        ) rfs_hmc_if();
        ) rfs_hmc_if();
 
 
        dut dut_I (
        dut dut_I (
                .clk_user(clk_user),
                .clk_user(clk_user),
                .clk_hmc_refclk(clk_hmc_refclk),
                .clk_hmc_refclk(clk_hmc_refclk),
Line 120... Line 113...
 
 
                //-- connect the BFM monitors with the Module UVC BFM to HMC Packet monitors
                //-- connect the BFM monitors with the Module UVC BFM to HMC Packet monitors
                uvm_config_db#(pkt_analysis_port#())::set(null,"uvm_test_top.hmc_tb0.hmc_module.hmc_req_mon","mb_pkt",dut_I.hmc_bfm0.hmc_flit_top.mb_rsp_pkt[0]);
                uvm_config_db#(pkt_analysis_port#())::set(null,"uvm_test_top.hmc_tb0.hmc_module.hmc_req_mon","mb_pkt",dut_I.hmc_bfm0.hmc_flit_top.mb_rsp_pkt[0]);
                uvm_config_db#(pkt_analysis_port#())::set(null,"uvm_test_top.hmc_tb0.hmc_module.hmc_rsp_mon","mb_pkt",dut_I.hmc_bfm0.hmc_flit_top.mb_req_pkt[0]);
                uvm_config_db#(pkt_analysis_port#())::set(null,"uvm_test_top.hmc_tb0.hmc_module.hmc_rsp_mon","mb_pkt",dut_I.hmc_bfm0.hmc_flit_top.mb_req_pkt[0]);
 
 
                //uvm_config_db#(pkt_analysis_port#())::set(null,"uvm_test_top.hmc_tb0.hmc_module.hmc_req_mon","mb_pkt",dut_I.hmc_bfm0.hmc_flit_top.mb_req_pkt_err_cov[0]);
 
                //uvm_config_db#(pkt_analysis_port#())::set(null,"uvm_test_top.hmc_tb0.hmc_module.hmc_rsp_mon","mb_pkt",dut_I.hmc_bfm0.hmc_flit_top.mb_rsp_pkt_err_cov[0]);
 
 
 
                run_test();
                run_test();
        end
        end
 
 
        initial begin
        initial begin
                clk_user                <= 1'b1;
                clk_user                <= 1'b1;
                clk_hmc_refclk  <= 1'b1;
                clk_hmc_refclk  <= 1'b1;
                res_n                   <= 1'b0;
                res_n                   <= 1'b0;
                #1000ns
                #500ns;
                @(posedge clk_user) res_n       <= 1'b1;
                @(posedge clk_user) res_n       <= 1'b1;
        end
        end
 
 
        //-- Generate the user clock
        //-- Generate the user clock
        always begin
        always begin
Line 165... Line 155...
                        #3.2ns clk_user = !clk_user;
                        #3.2ns clk_user = !clk_user;
                end
                end
            endcase
            endcase
        end
        end
 
 
        //-- 125 MHz
        //-- 125 MHz HMC/Transceiver refclock
        always #4ns clk_hmc_refclk <= ~clk_hmc_refclk;
        always #4ns clk_hmc_refclk <= ~clk_hmc_refclk;
 
 
endmodule : tb_top
endmodule : tb_top
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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