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

Subversion Repositories pci

[/] [pci/] [tags/] [rel_6/] [rtl/] [verilog/] [pci_wbw_wbr_fifos.v] - Diff between revs 81 and 88

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

Rev 81 Rev 88
Line 40... Line 40...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.2  2003/01/30 22:01:09  mihad
 
// Updated synchronization in top level fifo modules.
 
//
// Revision 1.1  2003/01/27 16:49:31  mihad
// Revision 1.1  2003/01/27 16:49:31  mihad
// Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
// Changed module and file names. Updated scripts accordingly. FIFO synchronizations changed.
//
//
// Revision 1.9  2002/10/18 03:36:37  tadejm
// Revision 1.9  2002/10/18 03:36:37  tadejm
// Changed wrong signal name scanb_sen into scanb_en.
// Changed wrong signal name scanb_sen into scanb_en.
Line 524... Line 527...
// register holding grey coded count of incoming transactions
// register holding grey coded count of incoming transactions
always@(posedge wb_clock_in or posedge wbw_clear)
always@(posedge wb_clock_in or posedge wbw_clear)
begin
begin
    if (wbw_clear)
    if (wbw_clear)
    begin
    begin
        inGreyCount[(WBW_ADDR_LENGTH-2)] <= #`FF_DELAY 1'b1 ;
        inGreyCount <= #`FF_DELAY 0 ;
        inGreyCount[(WBW_ADDR_LENGTH-3):0] <= #`FF_DELAY {(WBW_ADDR_LENGTH-2),1'b0} ;
 
    end
    end
    else
    else
    if (in_count_en)
    if (in_count_en)
        inGreyCount <= #`FF_DELAY inNextGreyCount ;
        inGreyCount <= #`FF_DELAY inNextGreyCount ;
end
end
 
 
wire [(WBW_ADDR_LENGTH-2):0] pci_clk_sync_inGreyCount ;
wire [(WBW_ADDR_LENGTH-2):0] pci_clk_sync_inGreyCount ;
reg  [(WBW_ADDR_LENGTH-2):0] pci_clk_inGreyCount ;
reg  [(WBW_ADDR_LENGTH-2):0] pci_clk_inGreyCount ;
synchronizer_flop #((WBW_ADDR_LENGTH - 1)) i_synchronizer_reg_inGreyCount
synchronizer_flop #((WBW_ADDR_LENGTH - 1), 0) i_synchronizer_reg_inGreyCount
(
(
    .data_in        (inGreyCount),
    .data_in        (inGreyCount),
    .clk_out        (pci_clock_in),
    .clk_out        (pci_clock_in),
    .sync_data_out  (pci_clk_sync_inGreyCount),
    .sync_data_out  (pci_clk_sync_inGreyCount),
    .async_reset    (1'b0)
    .async_reset    (wbw_clear)
) ;
) ;
 
 
always@(posedge pci_clock_in or posedge wbw_clear)
always@(posedge pci_clock_in or posedge wbw_clear)
begin
begin
    if (wbw_clear)
    if (wbw_clear)
        pci_clk_inGreyCount <= #`FF_DELAY 1 ;
        pci_clk_inGreyCount <= #`FF_DELAY 0 ;
    else
    else
        pci_clk_inGreyCount <= # `FF_DELAY pci_clk_sync_inGreyCount ;
        pci_clk_inGreyCount <= # `FF_DELAY pci_clk_sync_inGreyCount ;
end
end
 
 
// register holding grey coded count of outgoing transactions
// register holding grey coded count of outgoing transactions
always@(posedge pci_clock_in or posedge wbw_clear)
always@(posedge pci_clock_in or posedge wbw_clear)
begin
begin
    if (wbw_clear)
    if (wbw_clear)
    begin
    begin
        outGreyCount[(WBW_ADDR_LENGTH-2)]   <= #`FF_DELAY 1'b1 ;
        outGreyCount <= #`FF_DELAY 0 ;
        outGreyCount[(WBW_ADDR_LENGTH-3):0] <= #`FF_DELAY {(WBW_ADDR_LENGTH-2),1'b0} ;
 
    end
    end
    else
    else
    if (out_count_en)
    if (out_count_en)
        outGreyCount <= #`FF_DELAY outNextGreyCount ;
        outGreyCount <= #`FF_DELAY outNextGreyCount ;
end
end
 
 
// incoming transactions counter
// incoming transactions counter
always@(posedge wb_clock_in or posedge wbw_clear)
always@(posedge wb_clock_in or posedge wbw_clear)
begin
begin
    if (wbw_clear)
    if (wbw_clear)
        wbw_inTransactionCount <= #`FF_DELAY {(WBW_ADDR_LENGTH-1){1'b0}} ;
        wbw_inTransactionCount <= #`FF_DELAY 1 ;
    else
    else
    if (in_count_en)
    if (in_count_en)
        wbw_inTransactionCount <= #`FF_DELAY wbw_inTransactionCount + 1'b1 ;
        wbw_inTransactionCount <= #`FF_DELAY wbw_inTransactionCount + 1'b1 ;
end
end
 
 
// outgoing transactions counter
// outgoing transactions counter
always@(posedge pci_clock_in or posedge wbw_clear)
always@(posedge pci_clock_in or posedge wbw_clear)
begin
begin
    if (wbw_clear)
    if (wbw_clear)
        wbw_outTransactionCount <= #`FF_DELAY {(WBW_ADDR_LENGTH-1){1'b0}} ;
        wbw_outTransactionCount <= 1 ;
    else
    else
    if (out_count_en)
    if (out_count_en)
        wbw_outTransactionCount <= #`FF_DELAY wbw_outTransactionCount + 1'b1 ;
        wbw_outTransactionCount <= #`FF_DELAY wbw_outTransactionCount + 1'b1 ;
end
end
 
 

powered by: WebSVN 2.1.0

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