Debug functions are controlled via the DEBUG_FLAGS parameter. DEBUG_FLAGS is a 32-bit integer where every bit controls a debug function. There are also symbolic names defined for every debug function in header files.
Recommended: Declare
DEBUG_FLAGS a single time in the test bench, and set the same value for both software and
Verilog hardware model. For software, use the API function
cam_arg_set_debug_flags
. For Verilog hardware, set the DEBUG_FLAGS parameter on
the instance.Debug Flag | Description |
---|---|
CAM_DEBUG_NO_ERROR_MSG | Disable printout of software error messages. |
CAM_DEBUG_ARGS | Software echoes input arguments. |
CAM_DEBUG_VERIFY_WR | Software immediately reads back written data from hardware for verification. Mismatching data is reported with an error message. Intended for the verification of insert, update, and delete operations during hardware bringup. |
CAM_DEBUG_VERIFY_SHADOW | The get_by_response and get_by_key operations read data from hardware and verify it against software shadow data. The get_by_key operation combined with CAM_DEBUG_VERIFY_SHADOW enables software to perform an operation close to a lookup in the CAM hardware (only the matching entry is verified). |
CAM_DEBUG_VERBOSE_VERIFY | Enables printout of all verify operations (not only errors, which are printed by default). Applies to CAM_DEBUG_VERIFY_WR, CAM_DEBUG_VERIFY_SHADOW, and CAM_DEBUG_VERIFY_CONFIG. |
CAM_DEBUG_SKIP_MEM_INIT | Skip memory initialization. Useful for speeding up Verilog simulation. Not intended to be used in the target system. |
CAM_DEBUG_CONFIG | Enable printout of configuration parameters for both software and Verilog hardware simulation. |
CAM_DEBUG_KEY_MASKING | Enable error check for the presence of key value 1 in a masked (wildcarded) bit position. Applies stcam and tcam input arguments. |
CAM_DEBUG_STATS | Enable statistics printout in the bcam_destroy and stcam_destroy functions. |
CAM_DEBUG_SEGMENTS | Software prints segment map for virtualized bcam (vbcam). |
CAM_DEBUG_SKIP_VERIFY_CONFIG | Skip verification of hardware/software configuration parameters. Useful for software development without hardware available. Not intended to be used in the target system. |
CAM_DEBUG_SET_COVER | Software prints heap and set cover information for tcam. |
CAM_DEBUG_CONFIG_ARGS | Software prints the input cam_arg values before creating the instance. |
CAM_DEBUG_HW_WR | Verilog hardware prints write operations. |
CAM_DEBUG_HW_RD | Verilog hardware prints read operations. |
CAM_DEBUG_HW_LOOKUP | Verilog hardware prints lookup operations. |