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

From Texas Instruments Wiki
Jump to: navigation, search

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 -

  1. Allow the exception handler to take care of the exception. No additional action taken.
  2. 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.
  3. Halt the simulation with an error message indicating the nature of the exception and the PC that caused it.

Supported Configurations[edit]

  1. All C64x+ based configurations
  2. All C647x based configurations

Supported Exceptions[edit]

List of supported Exceptions
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]

  1. Invoke the right GEL command via Scripts->HW Exceptions based on the action required on the occurrence of the exception.
    1. EnableHWExceptions : Allow the exception handler to take care of the exception. No additional action taken
    2. 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.
    3. EnableHWExceptions WithError : Halt the simulation with an error message indicating the nature of the exception and the PC that caused it.
  2. If you don’t see the HW Exceptions options in the Script menu, you can manually load the GEL file that provides this option.
    1. Invoke the GEL window via Tools->GEL Files
    2. Right-Click on the GEL-Files window and select Load GEL
    3. Load the GEL file present at <CCS_INSTALL_DIR>\simulation\env\ccs\import\tisim_hwexceptions.gel
    4. Perform Step 1
Hw Exceptions Gel Menu
  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:

Exceptions wiki error v4.JPG

Enabling HW Exceptions on CCS3.3[edit]

  1. Invoke the Gel Toolbar from the menu option : View -> Gel Toolbar
  2. Provide the appropriate GEL command in the GEL Toolbar based on the action required on the occurrence of the exception -
    1. GEL_DriverString("SIM_EXCEPTION,ON"); : Allow the exception handler to take care of the exception. No additional action taken.
    2. 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.
    3. 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.
    4. 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:
Exceptions wiki warning v3.JPG

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Hardware Exceptions Detection here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Hardware Exceptions Detection here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Hardware Exceptions Detection here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Hardware Exceptions Detection here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Hardware Exceptions Detection here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Hardware Exceptions Detection here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Hardware Exceptions Detection here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Hardware Exceptions Detection here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Hardware Exceptions Detection here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity