Questions tagged [xtensa]

Xtensa is a customizable 32-bit RISC ISA found in Tensilica's Xtensa chips, mostly used as DSPs. (Now owned by Cadence). Use [esp32] or [esp8266] for questions about their SDKs.

Use this tag for questions about the Xtensa ISA, assembly language, or Xtensa-specific C/C++ intrinsics.

Use or for questions about their SDKs (like problems compiling with their headers or linking with their libraries).


See https://en.wikipedia.org/wiki/Tensilica

The Xtensa instruction set is a 32-bit architecture with a compact 16- and 24-bit instruction set. The base instruction set has 80 RISC instructions and includes a 32-bit ALU, up to 64 general-purpose 32-bit registers, and six special-purpose registers

The Xtensa architecture offers a user-customizable instruction set through automated customization tools that can extend the Xtensa base instruction set, including SIMD instructions, new register files.

Wikipedia also adds that specific Xtensa chips range from low-power cacheless microcontrollers to "16-way SIMD processors, 3-issue VLIW DSP cores" or "1 TMAC/sec neural network processors" (multiply-accumulate)


Related tag: is the company that now owns Tensilica and their Xtensa architecture. https://ip.cadence.com/. Use [cadence] for questions about the toolchain it provides. (Editor's note: I think that's accurate usage guidance, but not sure.)

Specific hardware / boards using Xtensa-ISA CPUs include many things outside the CPU, and have dev tools, SDKs, and so on which are totally specific to them, not the Xtensa ISA. Those are often C/C++ and toolchain questions specific to that one board and vendor-supplied files, not Xtensa chips in general.


Resources

https://en.wikipedia.org/wiki/Tensilica_Instruction_Extension can customize Xtensa cores. (At design time, not runtime). Extensibility is the literal namesake of Xtensa.


Slides from 2000 from Earl Killian, Tensilica's the lead architect for Xtensa: http://bwrcs.eecs.berkeley.edu/Classes/CS252/Notes/xtensa_022400.pdf including 1. How Tensilica and Xtensa came to be, 2. What Xtensa is, with motivation for the decisions we made

34 questions
1
vote
1 answer

How configure xtensa-lx106-elf to compile c++ code for esp8266 using nonos-sdk?

I'm having difficulties to compile c++ code with xtensa-lx106-elf. The manufacture of the chip I'm using (esp8266) provides a sdk (nonos-sdk). One of the libraries in this sdk implements functions to allocate memory in the chip: os_malloc,…
Oshio
  • 133
  • 4
  • 17
1
vote
0 answers

ESP8266 32-bit aligned memcpy

The ESP8266 is running an xtensa core and to read data from flash storage all accesses must be performed with 32bit words. To perform this I wrote the following method: void memcpy_P(void * dst, const void * src, const unsigned int len) { char …
Geoffrey
  • 10,843
  • 3
  • 33
  • 46
0
votes
0 answers

FreeRTOS error occurring in Xtensa IDE for HiFi_5

I downloaded the XAF code from https://github.com/foss-xtensa/xaf-hostless/tree/master and tried to build it using Xtensa IDE (Windows Platform, HiFi_5 processor, IDE version: Version 8.0.16). I am getting an error fatal error: 'FreeRTOS.h' file not…
rohit
  • 198
  • 1
  • 1
  • 7
0
votes
1 answer

QEMU Virtualization - Custom ESP32-based board

I am working on a project in order to virtualize a custom ESP32-based board and I would appreciate some help from the community! the custom ESP32-based board is connected to external devices through SPI (ADC device, CAN-FD-controller..). I chose to…
obaidch
  • 1
  • 1
0
votes
0 answers

xtensa-esp32-elf-ld error when linking file with linker script

I'm trying to understand how an esp32 works in low level by writing a simple blinking program in c and by compiling and linking it with xtensa tools. But when I get to the linking step i get a linking error. Here are the .c file, its headers and the…
0
votes
0 answers

Python won't recognize .mpy files

I followed a guide online to compile C code to .mpy files for micropython on the esp32. I did this by creating a dockerfile to create my work environment: FROM ubuntu:23.04 RUN apt-get update RUN apt-get -y install git wget flex bison gperf…
JRogerC
  • 598
  • 6
  • 17
0
votes
1 answer

How to interpret this Xtensa exception info?

I am debugging on a Xtensa board. But I don't have enough knowledge or reference materials to interpret below exception info. Could anyone familiar with Xtensa arch shed some light? Or point me to the docs explaining the Xtensa registers. I only…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
0
votes
1 answer

Xtensa Xplorer - Failed to Install Configuration Build

am trying to run for the first time a "Hello world" program on Xtensa Xplorer , but when am trying to install configuration build , it gives me this error saying "Non-interactive mode" Failed to install configuration build
0
votes
1 answer

Why I have issue using arduino portable version with esp32 boards only?

I am trying portable arduino ide, following this tutorial : https://docs.arduino.cc/software/ide-v1/tutorials/PortableIDE if I compile empty sketch for arduino AVR boards, it works, but if I do that for esp32 boards, I have this issue…
0
votes
2 answers

Move the PC into another register with xtensa (lx6) cores

I'm trying to get the current PC value into an assembly routine written for xtensa (lx6) cores. After digging into the instruction set doc, I cannot see really how to achieve this. It looks as if the PC is not mapped into the 16 AR, and I cannot see…
0
votes
1 answer

How to left shift by an amount in a register with Xtensa LX7

What is the correct way to do the following in Xtensa assembly: a4 = ( 1 << a5 ) where a4 and a5 are registers and a5 could contain the value 0 to 3 (could be 0 to 7 in the future, but not too worried about that now.) I'm sure this must be simple…
Realtime Rik
  • 1,632
  • 10
  • 22
0
votes
0 answers

nm results with trailing numbers in symbol names

I have an empty program: int main(int argc, char **argv) { return 0; } When I run nm path/to/exe --format=sysv I get numbers in the symbol names e.g file_mtx_85 and free_fn_89. With different program I can get duplicates like var_101 and…
0
votes
0 answers

Using TFLite model on Xtensa for acceleration of ML algorithms

I was working on CNN acceleration on XTensa by using TFLite models.I used the convolution model of TFlite and imported it into xtensa for building and running the model. However, while building i encountered an error: Assertion failure at line 4373…
0
votes
1 answer

Assembler messages -> Error : register number out of range

I am trying to use the instruction mula.dd.ll.ldinc m3 , a5 , m0 ,m1 in my assembly code on ESP32 which has xtensa LX6 processors. It doesn't produce error for other instructions, but for this particular instruction it is producing register…
0
votes
1 answer

How can I find out the time required to perform of a particular instruction for Xtensa microprocessor for e.g. wsr / rsr?

I am trying to optimize a code on esp32 which uses xtensa LX6 microprocessors , I wanted to know the cost of wsr and rsr instructions which are used to read or wirte in the special registers .