Line 40... |
Line 40... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.4 2003/08/08 16:36:33 tadejm
|
|
// Added 'three_left_out' to pci_pciw_fifo signaling three locations before full. Added comparison between current registered cbe and next unregistered cbe to signal wb_master whether it is allowed to performe burst or not. Due to this, I needed 'three_left_out' so that writing to pci_pciw_fifo can be registered, otherwise timing problems would occure.
|
|
//
|
// Revision 1.3 2003/07/29 08:20:11 mihad
|
// Revision 1.3 2003/07/29 08:20:11 mihad
|
// Found and simulated the problem in the synchronization logic.
|
// Found and simulated the problem in the synchronization logic.
|
// Repaired the synchronization logic in the FIFOs.
|
// Repaired the synchronization logic in the FIFOs.
|
//
|
//
|
//
|
//
|
Line 256... |
Line 259... |
- grey coded next write address. If they are equal, the fifo has two free locations left.
|
- grey coded next write address. If they are equal, the fifo has two free locations left.
|
--------------------------------------------------------------------------------------------------------------------------------*/
|
--------------------------------------------------------------------------------------------------------------------------------*/
|
wire [(ADDR_LENGTH - 1):0] wclk_sync_rgrey_minus2 ;
|
wire [(ADDR_LENGTH - 1):0] wclk_sync_rgrey_minus2 ;
|
reg [(ADDR_LENGTH - 1):0] wclk_rgrey_minus2 ;
|
reg [(ADDR_LENGTH - 1):0] wclk_rgrey_minus2 ;
|
|
|
synchronizer_flop #(ADDR_LENGTH, 0) i_synchronizer_reg_rgrey_minus2
|
pci_synchronizer_flop #(ADDR_LENGTH, 0) i_synchronizer_reg_rgrey_minus2
|
(
|
(
|
.data_in (rgrey_minus2),
|
.data_in (rgrey_minus2),
|
.clk_out (wclock_in),
|
.clk_out (wclock_in),
|
.sync_data_out (wclk_sync_rgrey_minus2),
|
.sync_data_out (wclk_sync_rgrey_minus2),
|
.async_reset (clear)
|
.async_reset (clear)
|
Line 294... |
Line 297... |
Synchronized write pointer is also compared to Gray coded next read address. If these two are
|
Synchronized write pointer is also compared to Gray coded next read address. If these two are
|
equal, fifo is almost empty.
|
equal, fifo is almost empty.
|
--------------------------------------------------------------------------------------------------------------------------------*/
|
--------------------------------------------------------------------------------------------------------------------------------*/
|
wire [(ADDR_LENGTH - 1):0] rclk_sync_wgrey_addr ;
|
wire [(ADDR_LENGTH - 1):0] rclk_sync_wgrey_addr ;
|
reg [(ADDR_LENGTH - 1):0] rclk_wgrey_addr ;
|
reg [(ADDR_LENGTH - 1):0] rclk_wgrey_addr ;
|
synchronizer_flop #(ADDR_LENGTH, 3) i_synchronizer_reg_wgrey_addr
|
pci_synchronizer_flop #(ADDR_LENGTH, 3) i_synchronizer_reg_wgrey_addr
|
(
|
(
|
.data_in (wgrey_addr),
|
.data_in (wgrey_addr),
|
.clk_out (rclock_in),
|
.clk_out (rclock_in),
|
.sync_data_out (rclk_sync_wgrey_addr),
|
.sync_data_out (rclk_sync_wgrey_addr),
|
.async_reset (clear)
|
.async_reset (clear)
|