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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_7/] [bench/] [verilog/] [wb_bus_mon.v] - Diff between revs 15 and 45

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

Rev 15 Rev 45
Line 41... Line 41...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.1  2002/02/01 13:39:43  mihad
 
// Initial testbench import. Still under development
 
//
// Revision 1.1  2001/08/06 18:12:58  mihad
// Revision 1.1  2001/08/06 18:12:58  mihad
// Pocasi delamo kompletno zadevo
// Pocasi delamo kompletno zadevo
//
//
//
//
 
 
Line 153... Line 156...
end
end
 
 
reg [`WB_DATA_WIDTH-1:0] previous_data ;
reg [`WB_DATA_WIDTH-1:0] previous_data ;
reg [`WB_ADDR_WIDTH-1:0] previous_address ;
reg [`WB_ADDR_WIDTH-1:0] previous_address ;
reg [`WB_SEL_WIDTH-1:0] previous_sel ;
reg [`WB_SEL_WIDTH-1:0] previous_sel ;
 
reg                     previous_stb ;
 
reg                     previous_ack ;
 
reg                     previous_err ;
 
reg                     previous_rty ;
 
reg                     previous_cyc ;
reg can_change ;
reg can_change ;
 
 
// cycle monitor
 
always@(posedge CLK_I or posedge RST_I)
always@(posedge CLK_I or posedge RST_I)
begin
begin
 
    if (RST_I)
 
    begin
 
        previous_stb <= 1'b0 ;
 
        previous_ack <= 1'b0 ;
 
        previous_err <= 1'b0 ;
 
        previous_rty <= 1'b0 ;
 
        previous_cyc <= 1'b0 ;
 
    end
 
    else
 
    begin
 
        previous_stb <= STB_O ;
 
        previous_ack <= ACK_I ;
 
        previous_err <= ERR_I ;
 
        previous_rty <= RTY_I ;
 
        previous_cyc <= CYC_O ;
 
    end
 
end
 
 
 
// cycle monitor
 
always@(posedge CLK_I)
 
begin
    if (CYC_O && ~RST_I) // cycle in progress
    if (CYC_O && ~RST_I) // cycle in progress
    begin
    begin
        if (STB_O)
        if (STB_O)
        begin
        begin
            // check for two control signals active at same edge
            // check for two control signals active at same edge
Line 225... Line 253...
            begin
            begin
                $display("RTY_I asserted during cycle without STB_O") ;
                $display("RTY_I asserted during cycle without STB_O") ;
                $fdisplay(log_file_desc, "RTY_I asserted during cycle without STB_O") ;
                $fdisplay(log_file_desc, "RTY_I asserted during cycle without STB_O") ;
            end
            end
 
 
 
            if ((previous_ack !== 1) && (previous_err !== 1) && (previous_rty !== 1) && (previous_stb !== 0))
 
            begin
 
                $display("STB_O de-asserted without reception of slave response") ;
 
                $fdisplay(log_file_desc, "STB_O de-asserted without reception of slave response") ;
 
            end
 
 
            can_change = 1 ;
            can_change = 1 ;
        end   // ~STB_O
        end   // ~STB_O
    end // cycle in progress
    end // cycle in progress
 
    else if (!RST_I)
 
    begin
 
        // cycle not in progress anymore
 
        can_change = 1 ;
 
        if ((previous_ack !== 1) && (previous_err !== 1) && (previous_rty !== 1) && (previous_stb !== 0))
 
        begin
 
            $display("STB_O de-asserted without reception of slave response") ;
 
            $fdisplay(log_file_desc, "STB_O de-asserted without reception of slave response") ;
 
        end
 
    end
end // cycle monitor
end // cycle monitor
 
 
// CAB_O monitor - CAB_O musn't change during one cycle
// CAB_O monitor - CAB_O musn't change during one cycle
reg [1:0] first_cab_val ;
reg [1:0] first_cab_val ;
always@(posedge CLK_I or RST_I)
always@(posedge CLK_I or RST_I)

powered by: WebSVN 2.1.0

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