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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_7/] [bench/] [verilog/] [system.v] - Diff between revs 81 and 87

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 81 Rev 87
Line 37... Line 37...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.14  2003/01/30 22:01:33  mihad
 
// Updated synchronization in top level fifo modules.
 
//
// Revision 1.13  2003/01/21 16:06:50  mihad
// Revision 1.13  2003/01/21 16:06:50  mihad
// Bug fixes, testcases added.
// Bug fixes, testcases added.
//
//
// Revision 1.12  2002/10/21 13:04:30  mihad
// Revision 1.12  2002/10/21 13:04:30  mihad
// Changed BIST signal names etc..
// Changed BIST signal names etc..
Line 18393... Line 18396...
    if ( temp_val1[8] !== 0 )
    if ( temp_val1[8] !== 0 )
    begin
    begin
        $display("Target completion expiration testing failed! Error status bit in PCI error reporting register set for no reason! Time %t ", $time) ;
        $display("Target completion expiration testing failed! Error status bit in PCI error reporting register set for no reason! Time %t ", $time) ;
        test_fail("Error status bit in PCI error reporting register was set for no reason") ;
        test_fail("Error status bit in PCI error reporting register was set for no reason") ;
    end
    end
    // test target retry counter expiration
 
    // set wb slave to retry response
    // set wb slave to retry response
    wishbone_slave.cycle_response(3'b001, tb_subseq_waits, 8'd255);
    wishbone_slave.cycle_response(3'b001, tb_subseq_waits, 8'd255);
    test_name = "RETRY COUNTER EXPIRATION DURING WRITE THROUGH PCI TARGET UNIT" ;
    test_name = "RETRY COUNTER EXPIRATION DURING WRITE THROUGH PCI TARGET UNIT" ;
    ok_pci = 1 ;
    ok_pci = 1 ;
 
 
    fork
    fork
    begin
    begin
        if ( test_mem == 1 )
        if ( test_mem == 1 )
            PCIU_MEM_WRITE ("MEM_WRITE ", `Test_Master_1,
            PCIU_MEM_WRITE ("MEM_WRITE ", `Test_Master_1,
                        pci_image_base, 32'hDEAD_BEAF, 4'hA,
                        pci_image_base, 32'hBEAF_DEAD, 4'h5,
                        1, `Test_One_Zero_Master_WS, `Test_One_Zero_Target_WS,
                        1, `Test_One_Zero_Master_WS, `Test_One_Zero_Target_WS,
                        `Test_Devsel_Medium, `Test_Target_Normal_Completion);
                        `Test_Devsel_Medium, `Test_Target_Normal_Completion);
        else
        else
            PCIU_IO_WRITE( `Test_Master_1, pci_image_base, 32'hDEAD_BEAF, 4'hA, 1, `Test_Target_Normal_Completion) ;
            PCIU_IO_WRITE( `Test_Master_1, pci_image_base, 32'hBEAF_DEAD, 4'h5, 1, `Test_Target_Normal_Completion) ;
 
 
        do_pause(1) ;
        do_pause(1) ;
 
 
        // do another write with same address and different data
        // do another write with same address and different data
        if ( test_mem == 1 )
        if ( test_mem == 1 )
            PCIU_MEM_WRITE ("MEM_WRITE ", `Test_Master_1,
            PCIU_MEM_WRITE ("MEM_WRITE ", `Test_Master_1,
                        pci_image_base, 32'h8765_4321, 4'h0,
                        pci_image_base, 32'h1234_5678, 4'h0,
                        1, `Test_One_Zero_Master_WS, `Test_One_Zero_Target_WS,
                        1, `Test_One_Zero_Master_WS, `Test_One_Zero_Target_WS,
                        `Test_Devsel_Medium, `Test_Target_Normal_Completion);
                        `Test_Devsel_Medium, `Test_Target_Normal_Completion);
        else
        else
            PCIU_IO_WRITE( `Test_Master_1, pci_image_base, 32'h8765_4321, 4'h0, 1, `Test_Target_Normal_Completion) ;
            PCIU_IO_WRITE( `Test_Master_1, pci_image_base, 32'h1234_5678, 4'h0, 1, `Test_Target_Normal_Completion) ;
 
 
        do_pause(1) ;
        do_pause(1) ;
    end
    end
    begin
    begin
        for ( i = 0 ; i < `WB_RTY_CNT_MAX ; i = i + 1 )
        for ( i = 0 ; i < `WB_RTY_CNT_MAX ; i = i + 1 )
Line 18489... Line 18492...
    begin
    begin
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in bus command field in error control and status register when retry counter expired during a write! Time %t", $time) ;
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in bus command field in error control and status register when retry counter expired during a write! Time %t", $time) ;
        test_fail("bus command field in error control and status register was wrong when retry counter expired during posted write through PCI Target unit") ;
        test_fail("bus command field in error control and status register was wrong when retry counter expired during posted write through PCI Target unit") ;
    end
    end
 
 
    if ( temp_val1[31:28] !== 4'hA )
    if ( temp_val1[31:28] !== 4'h5 )
    begin
    begin
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in byte enable field in error control and status register when retry counter expired during a write! Time %t", $time) ;
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in byte enable field in error control and status register when retry counter expired during a write! Time %t", $time) ;
 
        $display("Expected value: %h, actual value %h", 4'h5, temp_val1[31:28]) ;
        test_fail("byte enable field in error control and status register was wrong when retry counter expired during posted write through PCI Target unit") ;
        test_fail("byte enable field in error control and status register was wrong when retry counter expired during posted write through PCI Target unit") ;
    end
    end
 
 
    // clear error status register
    // clear error status register
    config_write( pci_err_cs_offset, temp_val1, 4'h2, ok ) ;
    config_write( pci_err_cs_offset, temp_val1, 4'h2, ok ) ;
Line 18508... Line 18512...
        test_fail("value in error address register was wrong when retry counter expired during posted write through PCI Target unit") ;
        test_fail("value in error address register was wrong when retry counter expired during posted write through PCI Target unit") ;
    end
    end
 
 
    test_name = "ERROR DATA REGISTER VALUE CHECK AFTER RETRY COUNTER EXPIRED" ;
    test_name = "ERROR DATA REGISTER VALUE CHECK AFTER RETRY COUNTER EXPIRED" ;
    config_read( pci_err_cs_offset + 8, 4'hF, temp_val1 ) ;
    config_read( pci_err_cs_offset + 8, 4'hF, temp_val1 ) ;
    if ( temp_val1 !== 32'hDEAD_BEAF )
    if ( temp_val1 !== (32'hBEAF_DEAD) )
    begin
    begin
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in error data register when retry counter expired during a write! Time %t", $time) ;
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in error data register when retry counter expired during a write! Time %t", $time) ;
 
        $display("Expected value %h, actual %h", 32'hBEAF_DEAD, temp_val1) ;
        test_fail("value in error data register was wrong when retry counter expired during posted write through PCI Target unit") ;
        test_fail("value in error data register was wrong when retry counter expired during posted write through PCI Target unit") ;
    end
    end
 
 
    test_name = "RETRY COUNTER EXPIRATION DURING READ THROUGH PCI TARGET UNIT" ;
    test_name = "RETRY COUNTER EXPIRATION DURING READ THROUGH PCI TARGET UNIT" ;
    ok_pci = 1 ;
    ok_pci = 1 ;
Line 18611... Line 18616...
    begin
    begin
        $display("WISHBONE Master Retry Counter expiration test failed! WB Master shouldn't signal an error when retry counter expires during a read! Time %t", $time) ;
        $display("WISHBONE Master Retry Counter expiration test failed! WB Master shouldn't signal an error when retry counter expires during a read! Time %t", $time) ;
        test_fail("error shouldn't be reported, when retry counter expires during read through PCI Target unit") ;
        test_fail("error shouldn't be reported, when retry counter expires during read through PCI Target unit") ;
    end
    end
 
 
 
`ifdef PCI_WBM_NO_RESPONSE_CNT_DISABLE
 
`else
 
 
    test_name = "NO RESPONSE COUNTER EXPIRATION DURING READ THROUGH PCI TARGET UNIT" ;
    test_name = "NO RESPONSE COUNTER EXPIRATION DURING READ THROUGH PCI TARGET UNIT" ;
    $display("PCIU monitor (WB bus) will complain in following section for a few times - no WB response test!") ;
    $display("PCIU monitor (WB bus) will complain in following section for a few times - no WB response test!") ;
    $fdisplay(pciu_mon_log_file_desc,
    $fdisplay(pciu_mon_log_file_desc,
    "********************************************  Monitor should complain in following section for two times about STB de-asserted without slave response  ************************************************") ;
    "********************************************  Monitor should complain in following section for two times about STB de-asserted without slave response  ************************************************") ;
    ok_pci = 1 ;
    ok_pci = 1 ;
Line 18711... Line 18719...
 
 
    fork
    fork
    begin
    begin
        if ( test_mem == 1 )
        if ( test_mem == 1 )
            PCIU_MEM_WRITE ("MEM_WRITE ", `Test_Master_1,
            PCIU_MEM_WRITE ("MEM_WRITE ", `Test_Master_1,
                        pci_image_base, 32'hBEAF_DEAD, 4'h0,
                        pci_image_base, 32'hDEAD_BEAF, 4'hA,
                        1, `Test_One_Zero_Master_WS, `Test_One_Zero_Target_WS,
                        1, `Test_One_Zero_Master_WS, `Test_One_Zero_Target_WS,
                        `Test_Devsel_Medium, `Test_Target_Normal_Completion);
                        `Test_Devsel_Medium, `Test_Target_Normal_Completion);
        else
        else
            PCIU_IO_WRITE( `Test_Master_1, pci_image_base, 32'hBEAF_DEAD, 4'h0, 1, `Test_Target_Normal_Completion) ;
            PCIU_IO_WRITE( `Test_Master_1, pci_image_base, 32'hDEAD_BEAF, 4'h0, 1, `Test_Target_Normal_Completion) ;
 
 
        do_pause(1) ;
        do_pause(1) ;
 
 
        // do another write with same address and different data
        // do another write with same address and different data
        if ( test_mem == 1 )
        if ( test_mem == 1 )
Line 18796... Line 18804...
    begin
    begin
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in bus command field in error control and status register when no response counter expired during a write! Time %t", $time) ;
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in bus command field in error control and status register when no response counter expired during a write! Time %t", $time) ;
        test_fail("bus command field in error control and status register was wrong when no response counter expired during posted write through PCI Target unit") ;
        test_fail("bus command field in error control and status register was wrong when no response counter expired during posted write through PCI Target unit") ;
    end
    end
 
 
    if ( temp_val1[31:28] !== 4'h0 )
    if ( temp_val1[31:28] !== 4'hA )
    begin
    begin
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in byte enable field in error control and status register when no response counter expired during a write! Time %t", $time) ;
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in byte enable field in error control and status register when no response counter expired during a write! Time %t", $time) ;
        test_fail("byte enable field in error control and status register was wrong when no response counter expired during posted write through PCI Target unit") ;
        test_fail("byte enable field in error control and status register was wrong when no response counter expired during posted write through PCI Target unit") ;
    end
    end
 
 
Line 18815... Line 18823...
        test_fail("value in error address register was wrong when no response counter expired during posted write through PCI Target unit") ;
        test_fail("value in error address register was wrong when no response counter expired during posted write through PCI Target unit") ;
    end
    end
 
 
    test_name = "ERROR DATA REGISTER VALUE CHECK AFTER NO RESPONSE COUNTER EXPIRED" ;
    test_name = "ERROR DATA REGISTER VALUE CHECK AFTER NO RESPONSE COUNTER EXPIRED" ;
    config_read( pci_err_cs_offset + 8, 4'hF, temp_val1 ) ;
    config_read( pci_err_cs_offset + 8, 4'hF, temp_val1 ) ;
    if ( temp_val1 !== 32'hBEAF_DEAD )
    if ( temp_val1 !== 32'hDEAD_BEAF )
    begin
    begin
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in error data register when no response counter expired during a write! Time %t", $time) ;
        $display("WISHBONE Master Retry Counter expiration test failed! Invalid value in error data register when no response counter expired during a write! Time %t", $time) ;
        test_fail("value in error data register was wrong when no response counter expired during posted write through PCI Target unit") ;
        test_fail("value in error data register was wrong when no response counter expired during posted write through PCI Target unit") ;
    end
    end
 
`endif
 
 
    // disable current image - write address mask register
    // disable current image - write address mask register
    config_write( pci_am_offset, 32'h0000_0000, 4'hF, ok ) ;
    config_write( pci_am_offset, 32'h0000_0000, 4'hF, ok ) ;
end
end
endtask // target_completion_expiration
endtask // target_completion_expiration

powered by: WebSVN 2.1.0

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