blackhawk_tsc_prbs.h (23773B)
1 /*********************************************************************************** 2 *********************************************************************************** 3 * * 4 * Revision : * 5 * * 6 * Description : Interface functions targeted to IP user * 7 * * 8 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 9 * 10 * Copyright 2007-2019 Broadcom Inc. All rights reserved. * 11 * No portions of this material may be reproduced in any form without * 12 * the written permission of: * 13 * Broadcom Corporation * 14 * 5300 California Avenue * 15 * Irvine, CA 92617 * 16 * * 17 * All information contained in this document is Broadcom Corporation * 18 * company private proprietary, and trade secret. * 19 */ 20 21 /** @file blackhawk_tsc_prbs.h 22 * PRBS test functions provided to IP User 23 */ 24 25 #ifndef BLACKHAWK_TSC_API_PRBS_H 26 #define BLACKHAWK_TSC_API_PRBS_H 27 28 #include "blackhawk_tsc_ipconfig.h" 29 #include "common/srds_api_enum.h" 30 #include "common/srds_api_err_code.h" 31 #include "common/srds_api_types.h" 32 #include "blackhawk_tsc_usr_includes.h" 33 34 #define PRBS_VERBOSE 0 35 /*------------------------------*/ 36 /* Shared TX Pattern Generator */ 37 /*------------------------------*/ 38 /** Configure Shared TX Pattern API. 39 * An input string (hex, binary or PAM4 format) and pattern length are taken in as inputs, based on which the Pattern Generator registers 40 * are programmed to the appropriate values to generate that pattern. \n 41 * NOTE: blackhawk_tsc_tx_shared_patt_gen_en() API should be called to enable the Pattern generator for that particular lane. \n\n 42 * 43 * For NRZ mode, the input pattern should be provided in either hex or binary. \n 44 * - eg: For a repeating pattern "0000010110101111", input_pattern = "0000010110101111" or "0x05AF" and patt_length = 16\n\n 45 * For PAM4 mode, the input pattern should be provided in PAM4 format, as described below. \n 46 * - PAM4 format uses four symbols - 0, 1, 2 or 3 (corresponding to voltage levels -3,-1,+1 and +3). \n 47 * - The input should be preceded by "p" to indicate a PAM4 format. The input could be spaced with "_" for better readability \n 48 * - Since each symbol is equivalent to 2 bits, the pattern_length = 2 * number of symbols in the pattern \n 49 * - eg: For a repeating pattern of "-3-3-1-1+1+1+3+3", input_pattern = "p0011_2233" and patt_length = 16 50 * 51 * @param sa__ is an opaque state vector passed through to device access functions. 52 * @param patt_length Pattern length 53 * @param pattern Input Pattern - Can be in hex (eg: "0xB055") or in binary (eg: "011011") 54 * @return Error Code generated by invalid input pattern or pattern length (returns ERR_CODE_NONE if no errors) 55 */ 56 err_code_t blackhawk_tsc_config_shared_tx_pattern(srds_access_t *sa__, uint8_t patt_length, const char pattern[]); 57 58 /** Configure TX to JP03B Pattern 59 * @param sa__ is an opaque state vector passed through to device access functions. 60 * @param enable Enable JP03B fixed pattern (1 = Enable; 0 = Disable) 61 * @return Error Code generated by invalid input pattern or pattern length (returns ERR_CODE_NONE if no errors) 62 */ 63 err_code_t blackhawk_tsc_config_tx_jp03b_pattern(srds_access_t *sa__, uint8_t enable); 64 65 /** Configure TX Linearity Pattern 66 * @param sa__ is an opaque state vector passed through to device access functions. 67 * @param enable Enable TX Linearity pattern (1 = Enable; 0 = Disable) 68 * @return Error Code generated by invalid input pattern or pattern length (returns ERR_CODE_NONE if no errors) 69 */ 70 err_code_t blackhawk_tsc_config_tx_linearity_pattern(srds_access_t *sa__, uint8_t enable); 71 72 /**************************************************/ 73 /* LANE Based APIs - Required to be used per Lane */ 74 /**************************************************/ 75 76 /*----------------------------*/ 77 /* Enable Pattern Generator */ 78 /*----------------------------*/ 79 /** Enable/Disable Shared TX pattern generator. 80 * Note: The patt_length input to the function should be the value sent to the blackhawk_tsc_config_shared_tx_pattern() function 81 * @param sa__ is an opaque state vector passed through to device access functions. 82 * @param enable Enable shared fixed pattern generator (1 = Enable; 0 = Disable) 83 * @param patt_length length of the pattern used in blackhawk_tsc_config_shared_tx_pattern() 84 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 85 */ 86 err_code_t blackhawk_tsc_tx_shared_patt_gen_en(srds_access_t *sa__, uint8_t enable, uint8_t patt_length); 87 88 /*----------------------------*/ 89 /* Configure PRBS Functions */ 90 /*----------------------------*/ 91 /** Configure PRBS Generator. 92 * Once the PRBS generator is configured, to enable PRBS use the blackhawk_tsc_tx_prbs_en() API. 93 * @param sa__ is an opaque state vector passed through to device access functions. 94 * @param prbs_poly_mode PRBS generator mode select (selects required PRBS polynomial) 95 * @param prbs_inv PRBS invert enable 96 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 97 */ 98 err_code_t blackhawk_tsc_config_tx_prbs(srds_access_t *sa__, enum srds_prbs_polynomial_enum prbs_poly_mode, uint8_t prbs_inv); 99 100 /** Get PRBS Generator Configuration. 101 * @param sa__ is an opaque state vector passed through to device access functions. 102 * @param *prbs_poly_mode PRBS generator mode select (selects required PRBS polynomial) 103 * @param *prbs_inv PRBS invert enable 104 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 105 */ 106 err_code_t blackhawk_tsc_get_tx_prbs_config(srds_access_t *sa__, enum srds_prbs_polynomial_enum *prbs_poly_mode, uint8_t *prbs_inv); 107 108 /** PRBS Generator Enable/Disable. 109 * @param sa__ is an opaque state vector passed through to device access functions. 110 * @param enable Enable PRBS Generator (1 = Enable; 0 = Disable) 111 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 112 */ 113 err_code_t blackhawk_tsc_tx_prbs_en(srds_access_t *sa__, uint8_t enable); 114 115 /** Get PRBS Generator Enable/Disable. 116 * @param sa__ is an opaque state vector passed through to device access functions. 117 * @param *enable returns the value of Enable PRBS Generator (1 = Enable; 0 = Disable) 118 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 119 */ 120 err_code_t blackhawk_tsc_get_tx_prbs_en(srds_access_t *sa__, uint8_t *enable); 121 122 /** PRBS Generator Single Bit Error Injection. 123 * @param sa__ is an opaque state vector passed through to device access functions. 124 * @param enable (1 = error is injected; 0 = no error is injected) 125 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 126 */ 127 err_code_t blackhawk_tsc_tx_prbs_err_inject(srds_access_t *sa__, uint8_t enable); 128 129 /** Configure PRBS Checker. 130 * Once the PRBS checker is configured, use the blackhawk_tsc_rx_prbs_en() API to enable the checker. 131 * @param sa__ is an opaque state vector passed through to device access functions. 132 * @param prbs_poly_mode PRBS checker mode select (selects required PRBS polynomial) 133 * @param prbs_checker_mode Checker Mode to select PRBS LOCK state machine 134 * @param prbs_inv PRBS invert enable 135 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 136 */ 137 err_code_t blackhawk_tsc_config_rx_prbs(srds_access_t *sa__, enum srds_prbs_polynomial_enum prbs_poly_mode, enum srds_prbs_checker_mode_enum prbs_checker_mode, uint8_t prbs_inv); 138 139 /** Get PRBS Checker congifuration. 140 * @param sa__ is an opaque state vector passed through to device access functions. 141 * @param *prbs_poly_mode PRBS checker mode select (selects required PRBS polynomial) 142 * @param *prbs_checker_mode Checker Mode to select PRBS LOCK state machine 143 * @param *prbs_inv PRBS invert enable 144 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 145 */ 146 err_code_t blackhawk_tsc_get_rx_prbs_config(srds_access_t *sa__, enum srds_prbs_polynomial_enum *prbs_poly_mode, enum srds_prbs_checker_mode_enum *prbs_checker_mode, uint8_t *prbs_inv); 147 148 /** PRBS Checker Enable/Disable. 149 * @param sa__ is an opaque state vector passed through to device access functions. 150 * @param enable Enable PRBS Checker (1 = Enable; 0 = Disable) 151 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 152 */ 153 err_code_t blackhawk_tsc_rx_prbs_en(srds_access_t *sa__, uint8_t enable); 154 155 /** Get PRBS Checker Enable/Disable. 156 * @param sa__ is an opaque state vector passed through to device access functions. 157 * @param *enable returns with the value of Enable PRBS Checker (1 = Enable; 0 = Disable) 158 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 159 */ 160 err_code_t blackhawk_tsc_get_rx_prbs_en(srds_access_t *sa__, uint8_t *enable); 161 162 /** PRBS Checker LOCK status (live status). 163 * @param sa__ is an opaque state vector passed through to device access functions. 164 * @param *chk_lock Live lock status read by API 165 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 166 */ 167 err_code_t blackhawk_tsc_prbs_chk_lock_state(srds_access_t *sa__, uint8_t *chk_lock); 168 169 /** PRBS Error Count and Lock Lost status. 170 * Error count and lock lost read back as a single 32bit value. Bit 31 is lock lost and [30:0] is error count. 171 * @param sa__ is an opaque state vector passed through to device access functions. 172 * @param *prbs_err_cnt 32bit value returned by API ([30:0] = Error Count; [31] = Lock lost) 173 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 174 */ 175 err_code_t blackhawk_tsc_prbs_err_count_ll(srds_access_t *sa__, uint32_t *prbs_err_cnt); 176 177 /** PRBS Error Count and Lock Lost status. 178 * Error count and lock lost read back on separate variables 179 * @param sa__ is an opaque state vector passed through to device access functions. 180 * @param *prbs_err_cnt 32bit Error count value 181 * @param *lock_lost Lock Lost status (1 = if lock was ever lost) 182 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 183 */ 184 err_code_t blackhawk_tsc_prbs_err_count_state(srds_access_t *sa__, uint32_t *prbs_err_cnt, uint8_t *lock_lost); 185 186 /** PRBS checker' hardware configuartion Struct */ 187 struct prbs_chk_hw_timer_ctrl_st { 188 /** PRBS checker burst error count mode enable */ 189 uint8_t prbs_chk_burst_err_cnt_en; 190 /** prbs_chk_en timer mode */ 191 uint8_t prbs_chk_en_timer_mode; 192 /** PRBS timer timeout value */ 193 uint8_t prbs_chk_en_timeout; 194 }; 195 196 /** Get PRBS hardware timers configuration. 197 * @param sa__ is an opaque state vector passed through to device access functions. 198 * @param *prbs_chk_hw_timer_ctrl_bak Structure to store PRBS checker's hardware timers configuration 199 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 200 */ 201 err_code_t blackhawk_tsc_get_prbs_chk_hw_timer_ctrl(srds_access_t *sa__, struct prbs_chk_hw_timer_ctrl_st * const prbs_chk_hw_timer_ctrl_bak); 202 203 /** Set PRBS hardware timers configuration. 204 * @param sa__ is an opaque state vector passed through to device access functions. 205 * @param *prbs_chk_hw_timer_ctrl_bak Structure to be used to restore PRBS checker's hardware timers configuration 206 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 207 */ 208 err_code_t blackhawk_tsc_set_prbs_chk_hw_timer_ctrl(srds_access_t *sa__, struct prbs_chk_hw_timer_ctrl_st const * const prbs_chk_hw_timer_ctrl_bak); 209 210 /** Configure PRBS checker's hardware timers. 211 * @param sa__ is an opaque state vector passed through to device access functions. 212 * @param time_ms is the amount of time to delay for BER calculation 213 * @param time_ms_adjusted is the amount of time delay that will be used for BER calculation 214 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 215 */ 216 err_code_t blackhawk_tsc_config_prbs_chk_hw_timer(srds_access_t *sa__, uint16_t time_ms, uint16_t *time_ms_adjusted); 217 218 /** Toggle PRBS checker enable. 219 * @param sa__ is an opaque state vector passed through to device access functions. 220 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 221 */ 222 err_code_t blackhawk_tsc_prbs_chk_en_toggle(srds_access_t *sa__); 223 224 /** Header display for detailed PRBS display function 225 * This can be displayed once and then several cores and lanes after each showing one line 226 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 227 */ 228 err_code_t blackhawk_tsc_display_detailed_prbs_state_hdr(void); 229 230 /** Display detailed PRBS data per lane including Burst Error 231 * 232 * @param sa__ is an opaque state vector passed through to device access functions. 233 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 234 */ 235 err_code_t blackhawk_tsc_display_detailed_prbs_state(srds_access_t *sa__); 236 237 extern const char* blackhawk_tsc_e2s_prbs_mode_enum[17]; 238 239 /*---------------------------------*/ 240 /* PRBS Error Analyzer Functions */ 241 /*---------------------------------*/ 242 243 #define BLACKHAWK_TSC_PRBS_FEC_FRAME_SIZE_MULTIPLIER 320 244 #define BLACKHAWK_TSC_PRBS_FEC_FRAME_SIZE_ROUND_UP 240 /* 3/4th of difference b/w configurable fec_size's (320) */ 245 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_FEC_SIZE_MIN ( 6 * BLACKHAWK_TSC_PRBS_FEC_FRAME_SIZE_MULTIPLIER) 246 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_FEC_SIZE_MAX (63 * BLACKHAWK_TSC_PRBS_FEC_FRAME_SIZE_MULTIPLIER) 247 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_ERR_THRESH_MIN 1 248 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_ERR_THRESH_MAX 15 249 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_HIST_ERR_THRESH_MIN 1 250 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_HIST_ERR_THRESH_MAX 8 251 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_FRAME_OVERLAP_FACTOR 8 252 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_LINEARITY_ADJUST 1.0 253 #define BLACKHAWK_TSC_PRBS_ERR_ANALYZER_NUM_COUNTERS 8 254 255 /** PRBS Error Analyzer Error Count Struct */ 256 typedef struct { 257 /** prbs_errcnt[i] - Num of FEC frames with N+i errors (N = "histogram_error_thresh"; i = 0 to 7) ; 258 ** prbs_errcnt[8] - Num of FEC frames with atleast X errors (X = "error_count_threshold") */ 259 uint32_t prbs_errcnt[9]; 260 /** hist_errcnt_thresh - historgram error count threshold */ 261 uint8_t hist_errcnt_thresh; 262 /** prbs_errcnt_thresh - PRBS error count threshold */ 263 uint8_t prbs_errcnt_thresh; 264 } blackhawk_tsc_prbs_err_analyzer_errcnt_st; 265 266 267 /** PRBS Error Analyzer Struct used to report Projection data */ 268 typedef struct { 269 /** Projected BER values (Equivalent projected post-FEC BER for t=15) */ 270 USR_DOUBLE proj_ber; 271 /** Projected BER Invalid (0 -> valid, +1 -> BER greater than; -1 -> BER less than) */ 272 int8_t ber_proj_invalid; 273 /** Number of Measured BER points available for extrapolation */ 274 uint8_t delta_n; 275 } blackhawk_tsc_prbs_err_analyzer_report_st; 276 277 /** Configure PRBS Error Analyzer 278 * NOTE: This feature is enabled only if PRBS Checker is configured and enabled 279 * @param sa__ is an opaque state vector passed through to device access functions. 280 * @param prbs_err_fec_size Defines the size of the FEC frames in bits 281 * @param prbs_errcnt_thresh Error Count Threshold (range [1-15]). FEC frame considered bad if error_cnt in frame >= threshold 282 * @param hist_errcnt_thresh Histogram Error Threshold (range [1-7]). Counts the number of errors in frames for x, x+1,..,x+7 errors in the FEC frames 283 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 284 */ 285 err_code_t blackhawk_tsc_prbs_error_analyzer_config(srds_access_t *sa__, uint16_t prbs_err_fec_size, uint8_t prbs_errcnt_thresh, uint8_t hist_errcnt_thresh); 286 287 /** Get PRBS Error Analyzer configuration 288 * @param sa__ is an opaque state vector passed through to device access functions. 289 * @param *prbs_err_fec_size Defines the size of the FEC frames in bits 290 * @param *prbs_errcnt_thresh Error Count Threshold (range [1-15]). FEC frame considered bad if error_cnt in frame > threshold 291 * @param *hist_errcnt_thresh Histogram Error Threshold (range [1-8]). Counts the number of errors in frames for x, x+1,..,x+7 errors in the FEC frames 292 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 293 */ 294 err_code_t blackhawk_tsc_get_prbs_error_analyzer_config(srds_access_t *sa__, uint16_t *prbs_err_fec_size, uint8_t *prbs_errcnt_thresh, uint8_t *hist_errcnt_thresh); 295 296 /** Display PRBS Error Analyzer configuration 297 * @param sa__ is an opaque state vector passed through to device access functions. 298 * @param prbs_errcnt_thresh Error Count Threshold (range [1-15]). FEC frame considered bad if error_cnt in frame > threshold 299 * @param hist_errcnt_thresh Histogram Error Threshold (range [1-8]). Counts the number of errors in frames for x, x+1,..,x+7 errors in the FEC frames 300 * @param timeout_s Time (in seconds) for which the PRBS errors are accumulated 301 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 302 */ 303 err_code_t blackhawk_tsc_display_prbs_error_analyzer_config(srds_access_t *sa__, uint8_t prbs_errcnt_thresh, uint8_t hist_errcnt_thresh, uint32_t timeout_s); 304 305 /** Get PRBS Error Analyzer Error Count 306 * @param sa__ is an opaque state vector passed through to device access functions. 307 * @param *err_analyzer PRBS Error Analyzer Error Count & Thresholds (includes total FEC Frame errors and also FEC frame errors with > x, x+1,..,x+7 errors) 308 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 309 */ 310 err_code_t blackhawk_tsc_prbs_error_analyzer_err_count(srds_access_t *sa__, blackhawk_tsc_prbs_err_analyzer_errcnt_st *err_analyzer); 311 312 /** PRBS Error Analyzer Accumulate Error Count 313 * Reads out the PRBS error counters and accumulates the error count in #blackhawk_tsc_prbs_err_analyzer_errcnt_st. 314 * @param sa__ is an opaque state vector passed through to device access functions. 315 * @param *err_analyzer PRBS Error Analyzer Error Count & Thresholds (includes total FEC Frame errors and also FEC frame errors with > x, x+1,..,x+7 errors) 316 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 317 */ 318 err_code_t blackhawk_tsc_prbs_error_analyzer_accumulate_err_count(srds_access_t *sa__, blackhawk_tsc_prbs_err_analyzer_errcnt_st *err_analyzer); 319 320 /** Optimize the histogram error count threshold for use in PRBS Error Analyzer 321 * The functoin updates histogram error count threshold register (== X errors) & PRBS error count threshold register (>X errors) 322 * @param sa__ is an opaque state vector passed through to device access functions. 323 * @param *err_analyzer PRBS Error Analyzer Error Count & Thresholds (includes total FEC Frame errors and also FEC frame errors with > x, x+1,..,x+7 errors) 324 * @param timeout_check Time (in seconds) for which the PRBS Error Analyzer data structure (passed to this function) has accumulated the data 325 * @param timeout_s Time (in seconds) for which the PRBS errors are going to be accumulated for (full test time) 326 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 327 */ 328 err_code_t blackhawk_tsc_optimize_hist_errcnt_thresh(srds_access_t *sa__, blackhawk_tsc_prbs_err_analyzer_errcnt_st *err_analyzer, uint32_t timeout_check, uint32_t timeout_s); 329 330 /** Display the Error counts accumulated by the PRBS Error Analyzer 331 * @param sa__ is an opaque state vector passed through to device access functions. 332 * @param err_analyzer PRBS Error Analyzer Error Count & Thresholds (includes total FEC Frame errors and also FEC frame errors with > x, x+1,..,x+7 errors) 333 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 334 */ 335 err_code_t blackhawk_tsc_display_prbs_error_analyzer_err_count(srds_access_t *sa__, blackhawk_tsc_prbs_err_analyzer_errcnt_st err_analyzer); 336 337 /** Display PRBS Error Analyzer Projection 338 * The Error Analyzer Projection API observes the number of frame errors generated based on hist_threshold value programmed for the given time duration, 339 * and then projects it to t=15 errors. \n 340 * NOTE: This feature is enabled only if PRBS Checker is configured and enabled 341 * @param sa__ is an opaque state vector passed through to device access functions. 342 * @param prbs_err_fec_size Defines the size of the FEC frames in bits 343 * @param hist_errcnt_thresh Histogram Error Threshold (range [1-8]). Counts the number of errors in frames for x, x+1,..,x+7 errors in the FEC frames 344 * @param timeout_s Time (in seconds) for which the PRBS errors are accumulated 345 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 346 */ 347 err_code_t blackhawk_tsc_display_prbs_error_analyzer_proj(srds_access_t *sa__, uint16_t prbs_err_fec_size, uint8_t hist_errcnt_thresh, uint32_t timeout_s); 348 349 /** Display PRBS Error Analyzer Projection with automatic threshold adjusting 350 * The Error Analyzer Projection API automatically adjusts the threshold based on counting errors for 5% of timeout 351 * and then projects it to t=15 errors. 352 * NOTE: This feature is enabled only if PRBS Checker is configured and enabled 353 * @param sa__ is an opaque state vector passed through to device access functions. 354 * @param prbs_err_fec_size Defines the size of the FEC frames in bits 355 * @param timeout_s Time (in seconds) for which the PRBS errors are accumulated 356 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 357 */ 358 err_code_t blackhawk_tsc_display_prbs_error_analyzer_proj_auto_threshold(srds_access_t *sa__, uint16_t prbs_err_fec_size, uint32_t timeout_s); 359 360 /** Report PRBS Error Analyzer Projection results 361 * @param sa__ is an opaque state vector passed through to device access functions. 362 * @param err_analyzer PRBS Error Analyzer Error Count & Thresholds (includes total FEC Frame errors and also FEC frame errors with > x, x+1,..,x+7 errors) 363 * @param timeout_s Time (in seconds) for which the PRBS errors are accumulated 364 * @param *err_analyzer_report Report results of PRBS Error Analyzer projection 365 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 366 */ 367 err_code_t blackhawk_tsc_prbs_error_analyzer_report_proj(srds_access_t *sa__, blackhawk_tsc_prbs_err_analyzer_errcnt_st err_analyzer, uint32_t timeout_s, blackhawk_tsc_prbs_err_analyzer_report_st *err_analyzer_report); 368 369 /** Compute PRBS Error Analyzer Projection results 370 * @param sa__ is an opaque state vector passed through to device access functions. 371 * @param err_analyzer PRBS Error Analyzer Error Count & Thresholds (includes total FEC Frame errors and also FEC frame errors with > x, x+1,..,x+7 errors) 372 * @param timeout_s Time (in seconds) for which the PRBS errors are accumulated 373 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 374 */ 375 err_code_t blackhawk_tsc_prbs_error_analyzer_compute_proj(srds_access_t *sa__, blackhawk_tsc_prbs_err_analyzer_errcnt_st err_analyzer, uint32_t timeout_s); 376 377 /** Reads prbsfb status and checks for done_once flag. 378 * prbsfb tuning occurs once immediately after the pmd lock, it requires prbs checker to be enabled and locked 379 * Note: Recommend a 6s timeout between pmd lock and prbsfb completion 380 * @param sa__ is an opaque state vector passed through to device access functions. 381 * @param done_once a pointer to user variable where prbsfb status bit done_once is returned 382 * @return Error Code generated by API (ERR_CODE_NONE if no errors) 383 */ 384 err_code_t blackhawk_tsc_get_prbsfb_status(srds_access_t *sa__, uint8_t *done_once); 385 386 387 #endif