###################################################################
# Copyright (c) 2012 Mango Communications
# All Rights Reserved
# This code is covered by the Rice-WARP license
# See http://warp.rice.edu/license/ for details
###################################################################

BEGIN w3_ad_bridge

## Peripheral Options
OPTION IPTYPE = PERIPHERAL
OPTION IMP_NETLIST = TRUE
OPTION HDL = VERILOG
OPTION ARCH_SUPPORT_MAP = (virtex6=DEVELOPMENT)
OPTION USAGE_LEVEL = BASE_USER
OPTION DESC = WARP v3 AD interface
OPTION IP_GROUP = USER
OPTION RUN_NGCBUILD = FALSE
OPTION STYLE = HDL

IO_INTERFACE IO_IF = ext_ad_ports, IO_TYPE = W3_ADBRIDGE_V1
IO_INTERFACE IO_IF = user_ports, IO_TYPE = W3_ADBRIDGE_V1

PARAMETER C_FAMILY = virtex6, DT = STRING
PARAMETER INCLUDE_IDELAYCTRL = 1, DT = INTEGER, RANGE = (0,1), DESC = "Include IDELAYCTRL (enable for design without any other IDELAYCTRL blocks)", VALUES = (0=FALSE, 1=TRUE), PERMIT=BASE_USER 
PARAMETER TRXCLK_IDELAY_RFA = 31, DT = INTEGER, RANGE = (0:31), DESC = "IODELAY tap value for TRXCLK clock input delay for RFA", PERMIT=BASE_USER
PARAMETER TRXCLK_IDELAY_RFB = 31, DT = INTEGER, RANGE = (0:31), DESC = "IODELAY tap value for TRXCLK clock input delay for RFB", PERMIT=BASE_USER

####################################################################################
## User Ports
## The user must connect sources/sinks to these ports in XPS in order to use
##  the radio board. The rest of the board's connections are made automatically
####################################################################################
PORT sys_samp_clk_Tx = "", DIR = I, IO_IF = user_ports, IO_IS = sampClkTx, SIGIS = CLK
PORT sys_samp_clk_Tx_90 = "", DIR = I, IO_IF = user_ports, IO_IS = sampClkTx90, SIGIS = CLK
PORT sys_samp_clk_Rx = "", DIR = I, IO_IF = user_ports, IO_IS = sampClkRx, SIGIS = CLK

PORT clk200 = "", DIR = I, IO_IF = user_ports, IO_IS = idelayCtrlClk, SIGIS = CLK, CLK_FREQ = 200000000

PORT user_RFA_RXD_I = "", DIR = O, VEC = [0:11], IO_IF = user_ports, IO_IS = userARXDI
PORT user_RFA_RXD_Q = "", DIR = O, VEC = [0:11], IO_IF = user_ports, IO_IS = userARXDQ

PORT user_RFA_TXD_I = "", DIR = I, VEC = [0:11], IO_IF = user_ports, IO_IS = userATXDI
PORT user_RFA_TXD_Q = "", DIR = I, VEC = [0:11], IO_IF = user_ports, IO_IS = userATXDQ

PORT user_RFA_TXIQ = "", DIR = I, IO_IF = user_ports, IO_IS = user_ATXIQ

PORT user_RFB_RXD_I = "", DIR = O, VEC = [0:11], IO_IF = user_ports, IO_IS = userBRXDI
PORT user_RFB_RXD_Q = "", DIR = O, VEC = [0:11], IO_IF = user_ports, IO_IS = userBRXDQ

PORT user_RFB_TXD_I = "", DIR = I, VEC = [0:11], IO_IF = user_ports, IO_IS = userBTXDI
PORT user_RFB_TXD_Q = "", DIR = I, VEC = [0:11], IO_IF = user_ports, IO_IS = userBTXDQ

PORT user_RFB_TXIQ = "", DIR = I, IO_IF = user_ports, IO_IS = user_BTXIQ

####
# Radio Bridge <-> Radio Board ports
####
PORT ad_RFA_TXD = "", DIR = O, VEC = [11:0], IO_IS = adATXD, ENDIAN = LITTLE, IO_IF = ext_ad_ports
PORT ad_RFA_TXIQ = "", DIR = O, IO_IS = adATXIQ, IO_IF = ext_ad_ports
PORT ad_RFA_TXCLK = "", DIR = O, IO_IS = adATXCLK, IO_IF = ext_ad_ports

PORT ad_RFA_TRXD = "", DIR = I, VEC = [11:0], IO_IS = adATRXD, ENDIAN = LITTLE, IO_IF = ext_ad_ports
PORT ad_RFA_TRXIQ = "", DIR = I, IO_IS = adATRXIQ, IO_IF = ext_ad_ports
PORT ad_RFA_TRXCLK = "", DIR = I, IO_IS = adATRXCLK, IO_IF = ext_ad_ports

PORT ad_RFB_TXD = "", DIR = O, VEC = [11:0], IO_IS = adATXD, ENDIAN = LITTLE, IO_IF = ext_ad_ports
PORT ad_RFB_TXIQ = "", DIR = O, IO_IS = adATXIQ, IO_IF = ext_ad_ports
PORT ad_RFB_TXCLK = "", DIR = O, IO_IS = adATXCLK, IO_IF = ext_ad_ports

PORT ad_RFB_TRXD = "", DIR = I, VEC = [11:0], IO_IS = adBTRXD, ENDIAN = LITTLE, IO_IF = ext_ad_ports
PORT ad_RFB_TRXIQ = "", DIR = I, IO_IS = adBTRXIQ, IO_IF = ext_ad_ports
PORT ad_RFB_TRXCLK = "", DIR = I, IO_IS = adBTRXCLK, IO_IF = ext_ad_ports

END
