NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Hardware Exceptions Detection
Contents
Hardware Exceptions Detection on C6000 simulators[edit]
Overview[edit]
The exception mechanism in C64x+ and C674x CPUs is intended to support error detection and program redirection to error handling service routines. There are multiple causes for internal exceptions. Examples are illegal opcodes, illegal behavior within an instruction, and resource conflicts. Refer the C64x+ CPU Reference guide for detailed information on the types of exceptions supported and usage details.
Simulation Support[edit]
The C64x+ and C674x simulators provide visibility and control on the hardware exceptions. The simulator could be configured to take any of the following actions on the occurrence of an exception -
- Allow the exception handler to take care of the exception. No additional action taken.
- Allow the exception handler to take care of the exception and also print out warnings on the console indicating the nature of the exception and the PC that caused it.
- Halt the simulation with an error message indicating the nature of the exception and the PC that caused it.
Supported Configurations[edit]
- All C64x+ based configurations
- All C647x based configurations
Supported Exceptions[edit]
Category | Exception | Simulator Support |
---|---|---|
Fetch error | Fetch error (privilege,parity,etc) | No |
Two branches in execute packet | Yes | |
Branch to middle of 32-bit instr | Yes | |
Branch to header | Yes | |
Branch to header | Yes | |
Illegal fetch packets | Reserved fetch packet header | Yes |
Illegal opcode | Specified set of reserved opcodes | Yes |
Header not in word 7 | Yes | |
Privilege violation | Access to restricted control register | No |
Attempt to execute restricted instruction | No | |
Non-secure register access violation | No | |
Register write conflicts | Register write conflicts | Yes |
Multiplier write path conflict | Multiplier write path conflict | No |
SPLOOP buffer exceptions | Unit conflicts | Yes |
Missed (but required) stall | Yes | |
Attempt to enter early-exit in reload while draining | Yes | |
Unexpected SPKERNEL | Yes | |
Write to ILC or RILC in prohibited timing window | Yes | |
Multicycle NOP prior to SPKERNEL or SPKERNELR instruction | Yes |
Enabling HW Exceptions on CCSv4[edit]
- Invoke the right GEL command via Scripts->HW Exceptions based on the action required on the occurrence of the exception.
- EnableHWExceptions : Allow the exception handler to take care of the exception. No additional action taken
- EnableHWExceptionsWithWarning : Allow the exception handler to take care of the exception and also print out warnings on the console indicating the nature of the exception and the PC that caused it.
- EnableHWExceptions WithError : Halt the simulation with an error message indicating the nature of the exception and the PC that caused it.
- If you don’t see the HW Exceptions options in the Script menu, you can manually load the GEL file that provides this option.
- Invoke the GEL window via Tools->GEL Files
- Right-Click on the GEL-Files window and select Load GEL
- Load the GEL file present at <CCS_INSTALL_DIR>\simulation\env\ccs\import\tisim_hwexceptions.gel
- Perform Step 1
- This can be done at any time before or during the program execution and the exceptions would be tracked from that point onwards.
Screenshot for Hardware Exceptions Detection Error on CCSv4:
Enabling HW Exceptions on CCS3.3[edit]
- Invoke the Gel Toolbar from the menu option : View -> Gel Toolbar
- Provide the appropriate GEL command in the GEL Toolbar based on the action required on the occurrence of the exception -
- GEL_DriverString("SIM_EXCEPTION,ON"); : Allow the exception handler to take care of the exception. No additional action taken.
- GEL_DriverString("SIM_EXCEPTION,ON,WARNING"); : Allow the exception handler to take care of the exception and also print out warnings on the console indicating the nature of the exception and the PC that caused it.
- GEL_DriverString("SIM_EXCEPTION,ON,ERROR"); : Halt the simulation with an error message indicating the nature of the exception and the PC that caused it.
- This can be done at any time before or during the program execution and the exceptions would be tracked from that point onwards.
Screenshot for Hardware Exceptions Detection Warning on CCS3.3:
- GEL file to enable HW Exceptions via GEL Menu - tisim_hwexceptions.gel