Line 40... |
Line 40... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1 2003/01/27 16:49:31 mihad
|
|
// 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.
|
//
|
//
|
// Revision 1.8 2002/10/17 22:49:22 tadejm
|
// Revision 1.8 2002/10/17 22:49:22 tadejm
|
// Changed BIST signals for RAMs.
|
// Changed BIST signals for RAMs.
|
Line 529... |
Line 532... |
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 ;
|
|
reg [(WBW_ADDR_LENGTH-2):0] pci_clk_inGreyCount ;
|
|
synchronizer_flop #((WBW_ADDR_LENGTH - 1)) i_synchronizer_reg_inGreyCount
|
|
(
|
|
.data_in (inGreyCount),
|
|
.clk_out (pci_clock_in),
|
|
.sync_data_out (pci_clk_sync_inGreyCount),
|
|
.async_reset (1'b0)
|
|
) ;
|
|
|
|
always@(posedge pci_clock_in or posedge wbw_clear)
|
|
begin
|
|
if (wbw_clear)
|
|
pci_clk_inGreyCount <= #`FF_DELAY 1 ;
|
|
else
|
|
pci_clk_inGreyCount <= # `FF_DELAY pci_clk_sync_inGreyCount ;
|
|
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
|
Line 562... |
Line 583... |
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
|
|
|
// synchronize transaction ready output to reading clock
|
assign wbw_transaction_ready_out = pci_clk_inGreyCount != outGreyCount ;
|
// transaction ready is set when incoming transaction count is not equal to outgoing transaction count (what goes in must come out logic)
|
|
// transaction ready is cleared when whole transaction is pulled out of fifo (otherwise it could stay set for additional cycle and result in wrong op.)
|
|
wire wbw_transaction_ready_flop_i = inGreyCount != outGreyCount ;
|
|
|
|
meta_flop #(0) i_meta_flop_wbw_transaction_ready
|
|
(
|
|
.rst_i (wbw_clear),
|
|
.clk_i (pci_clock_in),
|
|
.ld_i (out_count_en),
|
|
.ld_val_i (1'b0),
|
|
.en_i (1'b1),
|
|
.d_i (wbw_transaction_ready_flop_i),
|
|
.meta_q_o (wbw_transaction_ready_out)
|
|
) ;
|
|
|
|
endmodule
|
endmodule
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|