Line 41... |
Line 41... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
// Revision 1.2 2001/08/09 14:42:34 mihad
|
// Revision 1.1.1.1 2001/10/02 15:33:46 mihad
|
// Changed files during testing
|
// New project directory structure
|
//
|
|
// Revision 1.1 2001/08/06 18:12:43 mihad
|
|
// Pocasi delamo kompletno zadevo
|
|
//
|
|
//
|
//
|
|
|
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// FIFO parameters define behaviour of FIFO control logic and ////
|
//// FIFO parameters define behaviour of FIFO control logic and ////
|
Line 69... |
Line 65... |
// 8) depth for each FIFO. FIFO depth MUST be power of 2, so address length can
|
// 8) depth for each FIFO. FIFO depth MUST be power of 2, so address length can
|
// be defined
|
// be defined
|
// Minimum FIFO depth of any FIFO is 8 - control logic is such that address
|
// Minimum FIFO depth of any FIFO is 8 - control logic is such that address
|
// lengths less than 3 are not supported
|
// lengths less than 3 are not supported
|
`define FPGA
|
`define FPGA
|
`define WBW_DEPTH 32
|
`define WBW_DEPTH 16
|
`define WBW_ADDR_LENGTH 4
|
`define WBW_ADDR_LENGTH 4
|
`define WBR_DEPTH 32
|
`define WBR_DEPTH 32
|
`define WBR_ADDR_LENGTH 5
|
`define WBR_ADDR_LENGTH 5
|
`define PCIW_DEPTH 32
|
`define PCIW_DEPTH 32
|
`define PCIW_ADDR_LENGTH 6
|
`define PCIW_ADDR_LENGTH 5
|
`define PCIR_DEPTH 32
|
`define PCIR_DEPTH 32
|
`define PCIR_ADDR_LENGTH 7
|
`define PCIR_ADDR_LENGTH 5
|
//`define BIG
|
//`define BIG
|
|
|
// if FPGA is not defined (commented out), there can still be control logic
|
// if FPGA is not defined (commented out), there can still be control logic
|
// for synchronous rams used by defining SYNCHRONOUS
|
// for synchronous rams used by defining SYNCHRONOUS
|
`define SYNCHRONOUS
|
`define SYNCHRONOUS
|
Line 108... |
Line 104... |
`timescale 1ns/10ps
|
`timescale 1ns/10ps
|
|
|
// PCI bridge HOST/GUEST implentation
|
// PCI bridge HOST/GUEST implentation
|
// - for HOST implementation 'HOST' MUST be written othervise there is GUEST
|
// - for HOST implementation 'HOST' MUST be written othervise there is GUEST
|
// implementation and 'GUEST MUST be written !!!
|
// implementation and 'GUEST MUST be written !!!
|
`define GUEST
|
`define HOST
|
|
|
// MAX Retry counter value for WISHBONE Master state-machine
|
// MAX Retry counter value for WISHBONE Master state-machine
|
// This value is 8-bit because of 8-bit retry counter !!!
|
// This value is 8-bit because of 8-bit retry counter !!!
|
`define WB_RTY_CNT_MAX 8'hff
|
`define WB_RTY_CNT_MAX 8'hff
|
|
|
Line 130... |
Line 126... |
// the maximum number of images.
|
// the maximum number of images.
|
// There is one exeption, when the core is implemented as HOST. If so, then the
|
// There is one exeption, when the core is implemented as HOST. If so, then the
|
// PCI specification allowes the Configuration space NOT to be visible on the
|
// PCI specification allowes the Configuration space NOT to be visible on the
|
// PCI bus. With `define PCI_IMAGE6 (and `define HOST), we assign PCI_IMAGE0
|
// PCI bus. With `define PCI_IMAGE6 (and `define HOST), we assign PCI_IMAGE0
|
// to normal WB to PCI image and not to configuration space!
|
// to normal WB to PCI image and not to configuration space!
|
`define PCI_IMAGE3
|
`define PCI_IMAGE6
|
|
|
`define PCI_AM0 20'hfff0_0
|
`define PCI_AM0 20'hffff_f
|
`define PCI_AM1 20'hfff0_0
|
`define PCI_AM1 20'hffff_f
|
`define PCI_AM2 20'h0000_0
|
`define PCI_AM2 20'hffff_f
|
`define PCI_AM3 20'h0000_0
|
`define PCI_AM3 20'hffff_f
|
`define PCI_AM4 20'h0000_0
|
`define PCI_AM4 20'hffff_f
|
`define PCI_AM5 20'h0000_0
|
`define PCI_AM5 20'hffff_f
|
// no. of WISHBONE Slave IMAGES
|
// no. of WISHBONE Slave IMAGES
|
// - The maximum number of images is "6". By default there are first two images
|
// - The maximum number of images is "6". By default there are first two images
|
// used and the first (WB_IMAGE0) is assigned to Configuration space! With a
|
// used and the first (WB_IMAGE0) is assigned to Configuration space! With a
|
// 'define' WB_IMAGEx you choose the number of used WB IMAGES in a bridge
|
// 'define' WB_IMAGEx you choose the number of used WB IMAGES in a bridge
|
// without WB_IMAGE0 (e.g. WB_IMAGE3 tells, that WB_IMAGE1, WB_IMAGE2 and
|
// without WB_IMAGE0 (e.g. WB_IMAGE3 tells, that WB_IMAGE1, WB_IMAGE2 and
|
// WB_IMAGE3 are used for mapping the space from PCI to WB. Offcourse,
|
// WB_IMAGE3 are used for mapping the space from PCI to WB. Offcourse,
|
// WB_IMAGE0 is assigned to Configuration space). That leave us WB_IMAGE5 as
|
// WB_IMAGE0 is assigned to Configuration space). That leave us WB_IMAGE5 as
|
// the maximum number of images.
|
// the maximum number of images.
|
`define WB_IMAGE5
|
`define WB_IMAGE5
|
|
|
|
`define WB_AM0 20'hffff_f
|
// if WB_CNF_IMAGE is commented out, than access to configuration space from WISHBONE for GUEST bridges is disabled alltogether ( even read only )
|
// if WB_CNF_IMAGE is commented out, than access to configuration space from WISHBONE for GUEST bridges is disabled alltogether ( even read only )
|
//`define WB_CNF_IMAGE
|
//`define WB_CNF_IMAGE
|
|
|
// decode speed for WISHBONE definition - initial cycle on WISHBONE bus will take 1 WS for FAST, 2 WSs for MEDIUM and 3 WSs for slow.
|
// decode speed for WISHBONE definition - initial cycle on WISHBONE bus will take 1 WS for FAST, 2 WSs for MEDIUM and 3 WSs for slow.
|
// slower the decode speed, faster the WISHBONE clock can be
|
// slower the decode speed, faster the WISHBONE clock can be
|
//`define WB_DECODE_FAST
|
`define WB_DECODE_FAST
|
`define WB_DECODE_MEDIUM
|
//`define WB_DECODE_MEDIUM
|
//`define WB_DECODE_SLOW
|
//`define WB_DECODE_SLOW
|
|
|
// definition of how many address lines are compared on address decoding for WISHBONE and PCI images. Put a number of smallest image used here.
|
// definition of how many address lines are compared on address decoding for WISHBONE and PCI images. Put a number of smallest image used here.
|
// Minimum number is 1 and maximum number is 20 ( 1 = only 2GB images can be done, 20 - 4KB image is smallest possible)
|
// Minimum number is 1 and maximum number is 20 ( 1 = only 2GB images can be done, 20 - 4KB image is smallest possible)
|
`define WB_NUM_OF_DEC_ADDR_LINES 20
|
`define WB_NUM_OF_DEC_ADDR_LINES 20
|