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:08 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.10 2002/10/18 03:36:37 tadejm
|
// Revision 1.10 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 554... |
Line 557... |
|
|
always@(posedge pci_clock_in or posedge pciw_clear)
|
always@(posedge pci_clock_in or posedge pciw_clear)
|
begin
|
begin
|
if (pciw_clear)
|
if (pciw_clear)
|
begin
|
begin
|
inGreyCount[(PCIW_ADDR_LENGTH-2)] <= #`FF_DELAY 1'b1 ;
|
inGreyCount <= 0 ;
|
inGreyCount[(PCIW_ADDR_LENGTH-3):0] <= #`FF_DELAY {(PCIW_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 [(PCIW_ADDR_LENGTH-2):0] wb_clk_sync_inGreyCount ;
|
wire [(PCIW_ADDR_LENGTH-2):0] wb_clk_sync_inGreyCount ;
|
reg [(PCIW_ADDR_LENGTH-2):0] wb_clk_inGreyCount ;
|
reg [(PCIW_ADDR_LENGTH-2):0] wb_clk_inGreyCount ;
|
synchronizer_flop #((PCIW_ADDR_LENGTH - 1)) i_synchronizer_reg_inGreyCount
|
synchronizer_flop #((PCIW_ADDR_LENGTH - 1), 0) i_synchronizer_reg_inGreyCount
|
(
|
(
|
.data_in (inGreyCount),
|
.data_in (inGreyCount),
|
.clk_out (wb_clock_in),
|
.clk_out (wb_clock_in),
|
.sync_data_out (wb_clk_sync_inGreyCount),
|
.sync_data_out (wb_clk_sync_inGreyCount),
|
.async_reset (1'b0)
|
.async_reset (pciw_clear)
|
) ;
|
) ;
|
|
|
always@(posedge wb_clock_in or posedge pciw_clear)
|
always@(posedge wb_clock_in or posedge pciw_clear)
|
begin
|
begin
|
if (pciw_clear)
|
if (pciw_clear)
|
wb_clk_inGreyCount <= #`FF_DELAY 1 ;
|
wb_clk_inGreyCount <= #`FF_DELAY 0 ;
|
else
|
else
|
wb_clk_inGreyCount <= # `FF_DELAY wb_clk_sync_inGreyCount ;
|
wb_clk_inGreyCount <= # `FF_DELAY wb_clk_sync_inGreyCount ;
|
end
|
end
|
|
|
always@(posedge wb_clock_in or posedge pciw_clear)
|
always@(posedge wb_clock_in or posedge pciw_clear)
|
begin
|
begin
|
if (pciw_clear)
|
if (pciw_clear)
|
begin
|
begin
|
outGreyCount[(PCIW_ADDR_LENGTH-2)] <= #`FF_DELAY 1'b1 ;
|
outGreyCount <= #`FF_DELAY 0 ;
|
outGreyCount[(PCIW_ADDR_LENGTH-3):0] <= #`FF_DELAY {(PCIW_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
|
|
|
always@(posedge pci_clock_in or posedge pciw_clear)
|
always@(posedge pci_clock_in or posedge pciw_clear)
|
begin
|
begin
|
if (pciw_clear)
|
if (pciw_clear)
|
pciw_inTransactionCount <= #`FF_DELAY {(PCIW_ADDR_LENGTH-1){1'b0}} ;
|
pciw_inTransactionCount <= #`FF_DELAY 1 ;
|
else
|
else
|
if (in_count_en)
|
if (in_count_en)
|
pciw_inTransactionCount <= #`FF_DELAY pciw_inTransactionCount + 1'b1 ;
|
pciw_inTransactionCount <= #`FF_DELAY pciw_inTransactionCount + 1'b1 ;
|
end
|
end
|
|
|
always@(posedge wb_clock_in or posedge pciw_clear)
|
always@(posedge wb_clock_in or posedge pciw_clear)
|
begin
|
begin
|
if (pciw_clear)
|
if (pciw_clear)
|
pciw_outTransactionCount <= #`FF_DELAY {(PCIW_ADDR_LENGTH-1){1'b0}} ;
|
pciw_outTransactionCount <= #`FF_DELAY 1 ;
|
else
|
else
|
if (out_count_en)
|
if (out_count_en)
|
pciw_outTransactionCount <= #`FF_DELAY pciw_outTransactionCount + 1'b1 ;
|
pciw_outTransactionCount <= #`FF_DELAY pciw_outTransactionCount + 1'b1 ;
|
end
|
end
|
|
|