edt_msdv.h

00001 /*
00002 
00003 * register definition for MSDV interface
00004 * Xilinx bitfile.
00005 */
00006 
00007 #ifndef _EDT_MSDV_H_
00008 #define _EDT_MSDV_H_
00009 
00010 #include "edt_ocx.h"
00011 
00012 /*
00013 * MSDV definitions.
00014 */
00015 #define  MSDV_CLK_ENABLE        0x01010024
00016 #define  MSDV_X_DATA            0x01010040
00017 #define  MSDV_X_CONT            0x01010041
00018 #define  MSDV_X_STAT            0x01010042
00019 #define  MSDV_X_CONST           0x01010043
00020 #define  MSDV_TEMPERATURE       0x01010044
00021 #define  MSDV_RCV_CTRL          0x01010080
00022 #define  MSDV_XMT_CTRL          0x01010081
00023 #define  MSDV_DMA_TEST          0x01010082
00024 #define  MSDV_SERIAL_DEV        0x01010088
00025 #define  MSDV_CLK0_CFG_STAT     0x0101008c
00026 #define  MSDV_CLK1_CFG_STAT     0x0101008d
00027 /*
00028 * SI 532x config/stat registers
00029 */
00030 #define  SI532X_ENABLE          0x1
00031 #define  SI432X_INC             0x2
00032 #define  SI532X_DEC             0x4
00033 #define  SI532X_LOL             0x10
00034 #define  SI532X_C1B             0x20
00035 #define  SI532X_C2B             0x40
00036 
00037 
00038 #define  MSDV_CH0_PORT_CONFIG   0x01010090
00039 #define  MSDV_CH0_DATA_CONFIG   0x01010091
00040 #define  MSDV_CH0_REFRAME_COUNT 0x01010092
00041 #define  MSDV_CH0_DISP_ERR_COUNT        0x01010093
00042 #define  MSDV_CH0_CODE_ERR_COUNT        0x01010094
00043 #define  MSDV_CH0_PORT_STATUS   0x01010095
00044 
00045 #define  MSDV_CH1_PORT_CONFIG   0x01010098
00046 #define  MSDV_CH1_DATA_CONFIG   0x01010099
00047 #define  MSDV_CH1_REFRAME_COUNT 0x0101009A
00048 #define  MSDV_CH1_DISP_ERR_COUNT        0x0101009B
00049 #define  MSDV_CH1_CODE_ERR_COUNT        0x0101009C
00050 #define  MSDV_CH1_PORT_STATUS   0x010100(D
00051 
00052 #define  MSDV_CH2_PORT_CONFIG   0x010100B0
00053 #define  MSDV_CH2_DATA_CONFIG   0x010100B1
00054 #define  MSDV_CH2_REFRAME_COUNT 0x010100B2
00055 #define  MSDV_CH2_DISP_ERR_COUNT        0x010100B3
00056 #define  MSDV_CH2_CODE_ERR_COUNT        0x010100B4
00057 #define  MSDV_CH2_PORT_STATUS   0x010100B5
00058 
00059 #define  MSDV_CH3_PORT_CONFIG   0x010100B8
00060 #define  MSDV_CH3_DATA_CONFIG   0x010100B9
00061 #define  MSDV_CH3_REFRAME_COUNT 0x010100BA
00062 #define  MSDV_CH3_DISP_ERR_COUNT        0x010100BB
00063 #define  MSDV_CH3_CODE_ERR_COUNT        0x010100BC
00064 #define  MSDV_CH3_PORT_STATUS   0x010100BD
00065 
00066 
00067 
00068 
00069 
00070 /* MSDV_PORT_CONFIG */
00071 
00072 #define  MSDV_OUT_ENABLE        0x1
00073 #define  MSDV_XMIT_STDDEF       0x4
00074 #define  MSDV_MUTE_INPUT        0x8
00075 #define  MSDV_BYPASS            0x10
00076 #define  MSDV_ERR_COUNT_EN      0x80
00077 
00078 /* MSDV_DATA_CONFIG */
00079 
00080 #define  MSDV_MODE_RAW          0
00081 #define  MSDV_MODE_BIT_ALIGNED  1
00082 #define  MSDV_MODE_DECODED      2
00083 #define  MSDV_MODE_DATA         3
00084 #define  MSDV_MODE_TS_FRAMES    4
00085 #define  MSDV_MODE_TIMESTAMP    5
00086 #define  MSDV_MODE_PRBS15       6
00087 #define  MSDV_MODE_TEST         7
00088 
00089 #define  MSDV_INVERT_PRBS       0x8
00090 #define  MSDV_FILTER_IDLE       0x10
00091 
00092 /* MSDV_PORT_STATUS */
00093 
00094 #define MSDV_CARRIER_DETECT     1
00095 #define MSDV_CHANNEL_RESET      2
00096 #define MSDV_PLL_LOCK           4
00097 #define MSDV_BIT_ALIGN          8
00098 #define MSDV_TS_FRAME           0x10
00099 #define MSDV_TS_206             0x20
00100 
00101 
00102 #define  MSDV_BITFILE_VER       0x010100A0
00103 
00104 
00105 /*
00106 * registers 0 (PCD_CMD), 1 (PCD_DATA_PATH_STAT), 2 POCD_FUNCT), 3 (PCD_STAT),  0xf (PCD_CONFIG),
00107 * 0x10 (SSD16_CHEN), 0x16 (SSD16_LSB), 0x18 (SSD16_UNDER) and 0x1b (SSD16_OVER) have
00108 * the regular address definition with the standard bit placement and definition as follows:
00109 * command - PCD_ENABLE bit 0x8 only, others are read/write but unused
00110 * data_path - bits are read/write but not used
00111 * funct - bits are read write but unused
00112 * status - bit 0 indicates the sysclk DCM on the Xilinx is locked to the clock from the MSDV board
00113 */
00114 #define MSDV_STAT_SYS_LOCKED            0x1
00115 
00116 /*
00117 * config - bit 0 is byteswap (PCD_BYTESWAP) and 3 is short swap (PCD_SHORTSWAP)
00118 * channel enable - bit 0 and 1 enable channel 0 and 1
00119 * lsb_first - bit 0 and 1 control channel 0 and 1
00120 * underflow - bit 0 and 1 report status, bit 2 to 15 are always 0.
00121 * overflow - bit 0 and 1 report status, bit 2 to 15 are always 0.
00122 */
00123 
00124 /* channel enable bits in SSD16_CHEN  channel 0 to 3 enable channel 0 to 3 */
00125 /* channel direction bits in SSD16_DIR  channel 0 to 3 control the direction */
00126 
00127 
00128 /*
00129 * program the Xilinx for channel 0 
00130 * the data register is loaded with the bit file data. It is a fifo which holds 15 bytes
00131 * the number of bytes in the fifo is read in the top 4 bist of the status register
00132 * The CONT register controls the PROGL and INIT pins of each Xilinx, bit 4 controls which
00133 * xilinx gets the data being loaded in the data register
00134 * The STAT register reflects the status of the DONE and INIT pins.
00135 * The constant register is written and read to determine if the ocm.bit file is loaded before
00136 * attempting to load the individual channel xilinx.
00137 */
00138 
00139 /* control register bits */
00140 #define MSDV_CONT_CH0_INIT      0x1     /* one tristates INIT pin */
00141 #define MSDV_CONT_CH0_PROG      0x2     /* one drives the PROG_L pin low (resets xilinx program) */
00142 #define MSDV_CONT_ENABLE        0x20    /* enables the fifo, cclk and bit serializer */
00143 #define MSDV_CONT_EN_FIFO       0x40    /* enables the fifo, cclk and bit serializer */
00144 
00145 /* status bits */
00146 #define MSDV_STAT_CH0_INIT      0x1     /* reads state of INIT pin */
00147 #define MSDV_STAT_CH0_DONE      0x2     /* reads state of DONE pin */
00148 #define MSDV_FCNT_MSK           0xf0
00149 #define MSDV_FCNT_SHFT          4
00150 
00151 #define MSDV_CONSTANT           0x10    /* fixed pattern in OCM_X_CONST register */
00152 
00153 
00154 /*
00155 * Enable Registers
00156 */
00157 #define SYS_EN          0x04
00158 /* read status in top bits */
00159 #define SYS_LOCK        0x20
00160 
00161 /*
00162 * id string for ocm.bit
00163 */
00164 #define MSDV_ID_STR     0x0101007d
00165 /*
00166 * id string for ocm mezzanine bit files
00167 */
00168 #define MSDV_CH0_ID_STR 0x010100a0
00169 /*
00170 * both id registers can be written with the following commands
00171 */
00172 #define MSDV_ID_SIZE            16
00173 
00174 /*
00175 */
00176 
00177 
00178 #endif

Generated on 19 Jun 2015 by  doxygen 1.4.7