ET_ILLEGAL_INSTRUCTION, Unable to decode instruction Topic is solved

If you have a simple question and just want an answer.
slava
Member
Posts: 8
Joined: Mon Sep 29, 2014 9:36 am

ET_ILLEGAL_INSTRUCTION, Unable to decode instruction

Postby slava » Tue Dec 06, 2016 5:49 pm

Hi,

I am trying to run some PWM code (assembly version from sc_pwm forked from XMOS) on xCORE-200 architecture and facing the following error:

Code: Select all

xrun: Program received signal ET_ILLEGAL_INSTRUCTION, Unable to decode instruction.
      [Switching to tile[1] core[0] (dual issue)]
      pwm_op_inv () at <*>/sc_pwm/module_pwm_symmetrical/src/server/pwm_op_inv.S:53

      53		entsp 13
      Current language:  auto; currently asm
Is there any specifics of using assembly that was developed for the old architecture on the new architecture?

Thanks,
Slava
View Solution
User avatar
Thomas
Experienced Member
Posts: 66
Joined: Fri Feb 05, 2010 12:34 pm

Postby Thomas » Tue Dec 06, 2016 5:58 pm

I suspect the problem is that xCORE-200 is in dual issue mode when your function is called.
Because you are using the 16-bit version of entsp, the next 16-bit in memory are half of a 32-bit instruction.
16-bit aligned 32-bit instructions are not allowed in dual issue mode so this caused ET_ILLEGAL_INSTRUCTION.

Try using the 32 bit version of entsp: ENTSP_lu6

This should not cause ET_ILLEGAL_INSTRUCTION and change to single issue mode.
Then the rest of the assembly function should execute in single issue mode as normal.

Further Infos about Single/Dual issue are in Chapter 5.2 Single and Dual Issue in
http://www.xmos.com/published/xs2-isa-specification

If this post solves your problem, please mark it "Solved" by clicking the green check icon.

Who is online

Users browsing this forum: No registered users and 0 guests