Line 37... |
Line 37... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.1 2002/02/01 13:39:43 mihad
|
|
// Initial testbench import. Still under development
|
|
//
|
//
|
//
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
//// ===================================================================== ////
|
//// ===================================================================== ////
|
//// Following PCI_USER_CONSTANTS are just for regression testing purposes ////
|
//// Following PCI_USER_CONSTANTS are just for regression testing purposes ////
|
Line 172... |
Line 175... |
//`define WB_ARTISAN_SDP
|
//`define WB_ARTISAN_SDP
|
//`define PCI_ARTISAN_SDP
|
//`define PCI_ARTISAN_SDP
|
`endif
|
`endif
|
`else
|
`else
|
`ifdef REGR_FIFO_LARGE_GENERIC // without any parameters only (generic)
|
`ifdef REGR_FIFO_LARGE_GENERIC // without any parameters only (generic)
|
`define WBW_ADDR_LENGTH 10
|
`define WBW_ADDR_LENGTH 9
|
`define WBR_ADDR_LENGTH 10
|
`define WBR_ADDR_LENGTH 9
|
`define PCIW_ADDR_LENGTH 10
|
`define PCIW_ADDR_LENGTH 9
|
`define PCIR_ADDR_LENGTH 10
|
`define PCIR_ADDR_LENGTH 9
|
|
|
//`define FPGA
|
//`define FPGA
|
//`define XILINX
|
//`define XILINX
|
|
|
//`define WB_RAM_DONT_SHARE
|
//`define WB_RAM_DONT_SHARE
|
Line 193... |
Line 196... |
`define WB_XILINX_RAMB4
|
`define WB_XILINX_RAMB4
|
//`define PCI_XILINX_DIST_RAM
|
//`define PCI_XILINX_DIST_RAM
|
//`define WB_XILINX_DIST_RAM
|
//`define WB_XILINX_DIST_RAM
|
`endif
|
`endif
|
`else
|
`else
|
`define PCI_FIFO_RAM_ADDR_LENGTH 11 // PCI target unit fifo storage definition when RAM sharing is used ( both pcir and pciw fifo use same instance of RAM )
|
`define PCI_FIFO_RAM_ADDR_LENGTH 10 // PCI target unit fifo storage definition when RAM sharing is used ( both pcir and pciw fifo use same instance of RAM )
|
`define WB_FIFO_RAM_ADDR_LENGTH 11 // WB slave unit fifo storage definition when RAM sharing is used ( both wbr and wbw fifo use same instance of RAM )
|
`define WB_FIFO_RAM_ADDR_LENGTH 10 // WB slave unit fifo storage definition when RAM sharing is used ( both wbr and wbw fifo use same instance of RAM )
|
//`define WB_ARTISAN_SDP
|
//`define WB_ARTISAN_SDP
|
//`define PCI_ARTISAN_SDP
|
//`define PCI_ARTISAN_SDP
|
`endif
|
`endif
|
`else
|
`else
|
`endif
|
`endif
|
Line 250... |
Line 253... |
// accesses. Maximum number allows for minimum image size ( number = 20, image size = 4KB ), minimum number
|
// accesses. Maximum number allows for minimum image size ( number = 20, image size = 4KB ), minimum number
|
// allows for maximum image size ( number = 1, image size = 2GB ). If you intend on using different sizes of WB images,
|
// allows for maximum image size ( number = 1, image size = 2GB ). If you intend on using different sizes of WB images,
|
// you have to define a number of minimum sized image and enlarge others by specifying different address mask.
|
// you have to define a number of minimum sized image and enlarge others by specifying different address mask.
|
// smaller the number here, faster the decoder operation
|
// smaller the number here, faster the decoder operation
|
`ifdef WB_DECODE_MIN
|
`ifdef WB_DECODE_MIN
|
`define WB_NUM_OF_DEC_ADDR_LINES 3
|
`define WB_NUM_OF_DEC_ADDR_LINES 4
|
`else
|
`else
|
`ifdef WB_DECODE_MED
|
`ifdef WB_DECODE_MED
|
`define WB_NUM_OF_DEC_ADDR_LINES 12
|
`define WB_NUM_OF_DEC_ADDR_LINES 12
|
`else
|
`else
|
`ifdef WB_DECODE_MAX
|
`ifdef WB_DECODE_MAX
|
Line 265... |
Line 268... |
|
|
// Base address for Configuration space access from WB bus. This value cannot be changed during runtime
|
// Base address for Configuration space access from WB bus. This value cannot be changed during runtime
|
`ifdef WB_CNF_BASE_ZERO
|
`ifdef WB_CNF_BASE_ZERO
|
`define WB_CONFIGURATION_BASE 20'h0000_0
|
`define WB_CONFIGURATION_BASE 20'h0000_0
|
`else
|
`else
|
`define WB_CONFIGURATION_BASE 20'hF000_0
|
`define WB_CONFIGURATION_BASE 20'hB000_0
|
`endif
|
`endif
|
|
|
/*-----------------------------------------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------------------------------------
|
[000h-00Ch] First 4 DWORDs (32-bit) of PCI configuration header - the same regardless of the HEADER type !
|
[000h-00Ch] First 4 DWORDs (32-bit) of PCI configuration header - the same regardless of the HEADER type !
|
Vendor_ID is an ID for a specific vendor defined by PCI_SIG - 2321h does not belong to anyone (e.g.
|
Vendor_ID is an ID for a specific vendor defined by PCI_SIG - 2321h does not belong to anyone (e.g.
|
Line 280... |
Line 283... |
`define HEADER_DEVICE_ID 16'h0001
|
`define HEADER_DEVICE_ID 16'h0001
|
`define HEADER_REVISION_ID 8'h01
|
`define HEADER_REVISION_ID 8'h01
|
|
|
// 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 !!!
|
`ifdef WB_RETRY_MAX
|
|
`define WB_RTY_CNT_MAX 8'hff
|
`define WB_RTY_CNT_MAX 8'hff
|
`else
|
|
`define WB_RTY_CNT_MAX 8'h1c
|
|
`endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
//// ======================================================================= ////
|
//// ======================================================================= ////
|
//// Following PCI_TESTBENC_DEFINES are just for regression testing purposes ////
|
//// Following PCI_TESTBENC_DEFINES are just for regression testing purposes ////
|
//// (script for running regression is prepared for NC-Sim) ////
|
//// (script for running regression is prepared for NC-Sim) ////
|
Line 302... |
Line 301... |
`define WB_FREQ 0.01
|
`define WB_FREQ 0.01
|
`else
|
`else
|
`ifdef WB_CLK66
|
`ifdef WB_CLK66
|
`define WB_FREQ 0.066
|
`define WB_FREQ 0.066
|
`else
|
`else
|
`ifdef WB_CLK100
|
`ifdef WB_CLK220
|
`define WB_FREQ 0.1
|
`define WB_FREQ 0.22
|
`endif
|
`endif
|
`endif
|
`endif
|
`endif
|
`endif
|
|
|
// values of image registers of PCI bridge device - valid are only upper 20 bits, others must be ZERO !
|
// values of image registers of PCI bridge device - valid are only upper 20 bits, others must be ZERO !
|
`define TAR0_BASE_ADDR_0 32'h1000_0000
|
`define TAR0_BASE_ADDR_0 32'h1000_0000
|
`define TAR0_BASE_ADDR_1 32'h2000_0000
|
`define TAR0_BASE_ADDR_1 32'h2000_0000
|
`define TAR0_BASE_ADDR_2 32'h3000_0000
|
`define TAR0_BASE_ADDR_2 32'h4000_0000
|
`define TAR0_BASE_ADDR_3 32'h4000_0000
|
`define TAR0_BASE_ADDR_3 32'h6000_0000
|
`define TAR0_BASE_ADDR_4 32'h5000_0000
|
`define TAR0_BASE_ADDR_4 32'h8000_0000
|
`define TAR0_BASE_ADDR_5 32'h6000_0000
|
`define TAR0_BASE_ADDR_5 32'hA000_0000
|
|
|
`define TAR0_ADDR_MASK_0 32'hFFFF_F000 // when BA0 is used to access configuration space, this is NOT important!
|
`define TAR0_ADDR_MASK_0 32'hFFFF_F000 // when BA0 is used to access configuration space, this is NOT important!
|
`define TAR0_ADDR_MASK_1 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_1 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_2 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_2 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_3 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_3 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_4 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_4 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_5 32'hFFFF_F000
|
`define TAR0_ADDR_MASK_5 32'hFFFF_F000
|
|
|
`define TAR0_TRAN_ADDR_0 32'h5000_0000 // when BA0 is used to access configuration space, this is NOT important!
|
`define TAR0_TRAN_ADDR_0 32'hC000_0000 // when BA0 is used to access configuration space, this is NOT important!
|
`define TAR0_TRAN_ADDR_1 32'h4000_0000
|
`define TAR0_TRAN_ADDR_1 32'hA000_0000
|
`define TAR0_TRAN_ADDR_2 32'h3000_0000
|
`define TAR0_TRAN_ADDR_2 32'h8000_0000
|
`define TAR0_TRAN_ADDR_3 32'h2000_0000
|
`define TAR0_TRAN_ADDR_3 32'h6000_0000
|
`define TAR0_TRAN_ADDR_4 32'h1000_0000
|
`define TAR0_TRAN_ADDR_4 32'h4000_0000
|
`define TAR0_TRAN_ADDR_5 32'h0000_0000
|
`define TAR0_TRAN_ADDR_5 32'h2000_0000
|
|
|
// values of image registers of PCI behavioral target devices !
|
// values of image registers of PCI behavioral target devices !
|
`define BEH_TAR1_MEM_START 32'h7000_0000
|
`define BEH_TAR1_MEM_START 32'hC000_0000
|
`define BEH_TAR1_MEM_END 32'h7000_0FFF
|
`define BEH_TAR1_MEM_END 32'hC000_0FFF
|
`define BEH_TAR1_IO_START 32'h8000_0001
|
`define BEH_TAR1_IO_START 32'hD000_0001
|
`define BEH_TAR1_IO_END 32'h8000_0FFF
|
`define BEH_TAR1_IO_END 32'hD000_0FFF
|
|
|
`define BEH_TAR2_MEM_START 32'h9000_0000
|
`define BEH_TAR2_MEM_START 32'hE000_0000
|
`define BEH_TAR2_MEM_END 32'h9000_0FFF
|
`define BEH_TAR2_MEM_END 32'hE000_0FFF
|
`define BEH_TAR2_IO_START 32'hA000_0001
|
`define BEH_TAR2_IO_START 32'hF000_0001
|
`define BEH_TAR2_IO_END 32'hA000_0FFF
|
`define BEH_TAR2_IO_END 32'hF000_0FFF
|
|
|
/*=======================================================================================
|
/*=======================================================================================
|
Following defines are used in a script file for regression testing !!!
|
Following defines are used in a script file for regression testing !!!
|
=========================================================================================
|
=========================================================================================
|
|
|