00001
00002
00003
00004
00005
00006
00007 #ifndef _EDT_OCM_H
00008 #define _EDT_OCM_H
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #define OCM_CH0_CONFIGL 0x01010020
00025 #define OCM_CH0_CONFIGH 0x01010021
00026 #define OCM_CH0_STATUS 0x01010022
00027 #define OCM_CH0_XCVR 0x01010023
00028 #define OCM_CH0_ENABLE 0x01010024
00029
00030 #define OCM_CH0_CONFIG0 0x01010020
00031 #define OCM_CH0_CONFIG1 0x01010021
00032 #define OCM_CH0_STATUS 0x01010022
00033 #define OCM_CH0_TRANSCEIVER 0x01010023
00034 #define OCM_CH0_ENABLE 0x01010024
00035
00036 #define OCM_CH1_CONFIG0 0x01010030
00037 #define OCM_CH1_CONFIG1 0x01010031
00038 #define OCM_CH1_STATUS 0x01010032
00039 #define OCM_CH1_TRANSCEIVER 0x01010033
00040 #define OCM_CH1_ENABLE 0x01010034
00041
00042 #define OCM_FPGA0_LOAD 0x01010040
00043 #define OCM_FPGA1_LOAD 0x01010041
00044 #define OCM_FPGA2_LOAD 0x01010042
00045 #define OCM_FPGA3_LOAD 0x01010043
00046
00047 #define OCM_CH0_RCV_FRAMING 0x01010080
00048 #define OCM_CH0_XMT_FRAMING 0x01010081
00049 #define OCM_CH0_XMT_NATIONAL 0x01010082
00050 #define OCM_CH0_RCV_FILTER 0x01010083
00051 #define OCM_CH0_XMT_TEST_DATA 0x04010084
00052 #define OCM_CH0_RCV_STATUS 0x01010094
00053 #define OCM_CH0_RCV_FRAME_STATUS 0x01010095
00054 #define OCM_CH0_DEMUX_BITMAP 0x01010097
00055 #define OCM_CH0_DEMUX_BITMAP_READ 0x01010098
00056 #define OCM_CH0_TX_STATUS 0x01010099
00057 #define OCM_CH0_BITFILE_VER 0x010100A0
00058
00059 #define OCM_CH1_RCV_FRAMING 0x010100C0
00060 #define OCM_CH1_XMT_FRAMING 0x010100C1
00061 #define OCM_CH1_XMT_NATIONAL 0x010100C2
00062 #define OCM_CH1_RCV_FILTER 0x010100C3
00063 #define OCM_CH1_XMT_TEST_DATA 0x040100C4
00064 #define OCM_CH1_RCV_STATUS 0x010100D4
00065 #define OCM_CH1_RCV_FRAME_STATUS 0x010100D5
00066 #define OCM_CH1_DEMUX_BITMAP 0x010100D7
00067 #define OCM_CH1_DEMUX_BITMAP_READ 0x010100D8
00068 #define OCM_CH1_TX_STATUS 0x010100D9
00069 #define OCM_CH1_BITFILE_VER 0x010100E0
00070
00071
00072 #define OCM_REG_CH0_MASK 0x01010097
00073 #define OCM_REG_CH0_MASK_READBACK 0x01010098
00074
00075
00076
00077 #define OCM_CH0_B1_ERROR_CNT 0x03010088
00078 #define OCM_CH0_B1_ERROR_MASK 0x0101008b
00079 #define OCM_CH1_B1_ERROR_CNT 0x030100c8
00080 #define OCM_CH1_B1_ERROR_MASK 0x010100cb
00081
00082 #define OCM_CH0_B2_ERROR_CNT 0x0401008c
00083 #define OCM_CH1_B2_ERROR_CNT 0x040100cc
00084
00085 #define OCM_CH0_M1_ERROR_CNT 0x03010090
00086 #define OCM_CH1_M2_ERROR_CNT 0x030100d0
00087
00088 #define OCM_CH0_CNT_CTRL 0x01010093
00089 #define OCM_CH1_CNT_CTRL 0x010100D3
00090
00091 #define OCM_CH0_LOF_CNT 0x0201009C
00092 #define OCM_CH1_LOF_CNT 0x020100DC
00093
00094 #define OCM_CH0_FRM_PAT_CNT 0x0201009E
00095 #define OCM_CH1_FRM_PAT_CNT 0x020100DE
00096
00097 #define OCM_CH0_FALSE_FRM_CNT 0x020100A4
00098 #define OCM_CH1_FALSE_FRM_CNT 0x020100E4
00099
00100
00101
00102
00103
00104 #define OCM_RX_CTRL 0x01010080
00105 #define OCM_TX_CONFIG 0x01010081
00106
00107 #define OCM_NAT_BYTE 0x01010082
00108 #define OCM_RX_FILTER 0x01010083
00109 #define TEST_DATA_REG 0x03010084
00110 #define OCM_RX_STATUS 0x01010094
00111 #define FRAME_STATUS 0x01010095
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 #define LOCAL_SYS_LOCK 0x1
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140 #define OCM_CH0_RX_ENABLE 0x1
00141 #define OCM_CH1_RX_ENABLE 0x2
00142 #define OCM_CH0_TX_ENABLE 0x4
00143 #define OCM_CH1_TX_ENABLE 0x8
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153 #define OFFSET_CH1_BASE 0x10
00154 #define OFFSET_CH1_MEZ 0x40
00155
00156
00157
00158 #define OCM_FRAME_EN 0x01
00159 #define LOCK_REF 0x02
00160 #define RX_SEL_MSK 0x0c
00161 #define AUTO_DETECT 0x10
00162 #define REMOTE_LOOP 0x20
00163 #define LOCAL_LOOP 0x40
00164 #define PRBS_EN 0x80
00165
00166
00167
00168 #define OC48_STM16 0x00
00169 #define OC24 0x04
00170 #define OC12_STM4 0x08
00171 #define OC3_STM1 0x0c
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181 #define OCM_MODE_MSK 0x3
00182 #define OCM_PRE_MSK 0xc
00183 #define OCM_LOOPTIME 0x10
00184
00185
00186
00187 #define OCM_PRE_DIS 0x0
00188 #define OCM_PRE_10 0x4
00189 #define OCM_PRE_20 0x8
00190 #define OCM_PRE_30 0xc
00191
00192
00193
00194 #define OCM_MODE_FULL 0x0
00195 #define OCM_MODE_TX 0x1
00196 #define OCM_MODE_RX 0x2
00197 #define OCM_MODE_REP 0x3
00198
00199
00200
00201
00202
00203
00204
00205 #define SPILL2511 0x01
00206 #define PRBSPASS 0x02
00207 #define RATE_DET_MSK 0x0c
00208
00209 #define LOS 0x10
00210 #define LOL 0x20
00211 #define SIG_DET 0x80
00212
00213
00214
00215
00216
00217
00218
00219 #define DISABLE_TX 0x01
00220 #define XCVR_SCL 0x02
00221 #define XCVR_WDATA 0x04
00222 #define XCVR_TS 0x08
00223 #define XCVR_RDATA 0x10
00224 #define XCVR_PRES 0x20
00225 #define XCVR_FLT 0x40
00226
00227
00228
00229
00230
00231
00232 #define SLK_EN 0x01
00233 #define PLL_EN 0x02
00234 #define SYS_EN 0x04
00235 #define RAM_EN 0x08
00236
00237 #define SYS_LOCK 0x20
00238 #define RX_LOCK 0x40
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251 #define RESET_FRM 0x01
00252 #define FRAME_EN 0x02
00253 #define RX_DATA_SRC_2G 0x04
00254 #define DISABLE_SCRAM 0x10
00255 #define SUSPEND_AQ 0x20
00256 #define EN_PAR_CNT 0x40
00257 #define EN_ERR_CNT 0x80
00258
00259
00260
00261
00262
00263
00264
00265 #define RESET_PTR 0x01
00266 #define TEST_DATA 0x02
00267 #define EN_TX_FRAME 0x04
00268 #define EN_IDLE 0x04
00269 #define CLOCK_SEL_MSK 0xC0
00270 #define CLK_125MHZ 0x00
00271 #define CLOCK_SEL_MSK 0xC0
00272 #define CLK_SONET_SDH 0x40
00273 #define CLK_GE 0x80
00274 #define CLK_FEC 0xC0
00275
00276
00277
00278
00279
00280
00281
00282 #define OVERHEAD_ONLY 0x01
00283
00284
00285 #define EN_DATA_COUNTER 0x02
00286 #define COUNT_FREERUN 0x04
00287 #define EN_ALL_DECODED 0x08
00288
00289
00290
00291 #define ODU_MASKED_PLUS_OVHD 0x02
00292 #define ODU_NO_FEC 0x04
00293
00294
00295 #define ODU_PASS_THRU 0x80
00296
00297
00298
00299
00300
00301
00302
00303
00304 #define FRAMED 0x01
00305 #define RX_LOCKED 0x01
00306 #define RATE12 0x02
00307
00308
00309
00310
00311
00312
00313 #define BIT_SYNC 0x01
00314 #define BYTE_SYNC 0x02
00315 #define MATCH_CNT_MSK 0x0c
00316 #define MATCH_CNT_SHFT 2
00317 #define DROP_CNT_MSK 0x30
00318 #define DROP_CNT_SHFT 4
00319 #define FOUND 0x40
00320 #define LOCKED 0x80
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331 #define OCM_EN_ERROR_COUNT 0x80
00332 #define OCM_ERROR_COUNT_HOLD 0x1
00333
00334
00335
00336 #define EN_PRBSPASS_LATCH 0x80
00337
00338
00339
00340 #define OCM_CH0_PRBS_ERR_CNTRL 0x010100ac
00341 #define OCM_CH1_PRBS_ERR_CNTRL 0x010100ec
00342
00343
00344
00345
00346 #define CLR_PRBS_CNT 0x01
00347
00348 #define OCM_CH0_PRBS_STATUS 0x010100ad
00349 #define OCM_CH1_PRBS_STATUS 0x010100ed
00350
00351
00352
00353
00354 #define PRBS_SYNCED 0x01
00355 #define PRBS_ERROR 0x02
00356 #define PRBS_ERR_LATCH 0x04
00357
00358
00359
00360 #define OCM_CH0_PRBS_ERR_CNT 0x010100ae
00361 #define OCM_CH1_PRBS_ERR_CNT 0x010100ee
00362 #define OCM_CH0_PRBS_LOS_CNT 0x010100af
00363 #define OCM_CH1_PRBS_LOS_CNT 0x010100ef
00364
00365
00366 #define OCM_CH0_FREQ_CNT_CTRL 0x010100b0
00367 #define OCM_CH1_FREQ_CNT_CTRL 0x010100f0
00368
00369
00370
00371
00372 #define CLEAR_VALID 0x01
00373
00374 #define OCM_CH0_FREQ_STATUS 0x010100b1
00375 #define OCM_CH1_FREQ_STATUS 0x010100f1
00376
00377
00378
00379
00380 #define FREQ_VALID 0x01
00381
00382
00383
00384 #define OCM_CH0_FREQUENCY 0x020100b2
00385 #define OCM_CH1_FREQUENCY 0x020100f2
00386
00387
00388 #define OCM_CH0_RX_CLK_CTRL 0x0101009e
00389 #define OCM_CH1_RX_CLK_CTRL 0x010100de
00390
00391
00392
00393
00394
00395 #define STAT_SEL_MSK 0x0f
00396 #define SIG_STAT 0x0
00397
00398 #define CLK_POS_START 0x4
00399 #define CLK_NEG_EDGE 0x5
00400 #define CLK_NXT_POS 0x6
00401 #define CLK_FINAL 0x7
00402 #define SHADOW_CNT 0x8
00403
00404 #define PRG_PS_EN 0x10
00405 #define PRG_PS_INC 0x20
00406
00407 #define OCM_CH0_RX_CLK_STAT 0x0101009f
00408 #define OCM_CH1_RX_CLK_STAT 0x010100df
00409
00410
00411
00412
00413
00414 #define CLK_F 0x01
00415 #define CLK_R 0x02
00416
00417
00418 #define DONE_STATE_MSK 0x0c
00419
00420
00421
00422 #define STATE_DONE_EN_1 0x08
00423 #define DCM_LOCK_SET 0x10
00424 #define NO_RXCLK 0x40
00425 #define PHASE_OVF 0x80
00426
00427
00428
00429 #define STATE_AUTO 0x00
00430 #define STATE_DONE 0x04
00431 #define STATE_PRG_WAIT 0x0c
00432
00433
00434
00435
00436
00437
00438
00439
00440 #define CATCH_FIFO_OVF 0x4
00441 #define CATCH_ALIGN_CHG 0x8
00442
00443 #define CATCH_CODE_VIOL 0x30
00444 #define CATCH_CODE_ERR 0xc0
00445
00446
00447
00448
00449 #define COMMA_ALIGNED 0x01
00450
00451 #define CATCH_ENABLED 0x02
00452
00453 #define ALIGNMENT_MSK 0xf0
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466 #define OCM_X_DATA 0x01010040
00467 #define OCM_X_CONT 0x01010041
00468 #define OCM_X_STAT 0x01010042
00469 #define OCM_X_CONST 0x01010043
00470
00471
00472 #define OCM_CONT_CH0_INIT 0x1
00473 #define OCM_CONT_CH0_PROG 0x2
00474 #define OCM_CONT_CH1_INIT 0x4
00475 #define OCM_CONT_CH1_PROG 0x8
00476 #define OCM_CONT_PRG_CH1 0x10
00477 #define OCM_CONT_ENABLE 0x20
00478 #define OCM_CONT_EN_FIFO 0x40
00479
00480
00481 #define OCM_STAT_CH0_INIT 0x1
00482 #define OCM_STAT_CH0_DONE 0x2
00483 #define OCM_STAT_CH1_INIT 0x4
00484 #define OCM_STAT_CH1_DONE 0x8
00485 #define OCM_FCNT_MSK 0xf0
00486 #define OCM_FCNT_SHFT 4
00487
00488 #define OCM_CONSTANT 0x0c
00489
00490
00491 #endif