Dear SDCC users and developers, in recent weeks, there was a bit of hype surrounding the small semiconductor company Padauk, which makes extremly cheap, small and simple µCs. In particular, their low-end devices tend to be available at 0.02$ to 0.03$ each even in small quantities. Another very interesting aspect is hardware support for simultaneous multithreading (similar to Intel's hyperthreading the ALU is shared) in such low-end devices.
The smallest devices have just 60B of RAM and 2 KB of OTP-ROM. Larger devices have up to 256B of RAM and 8 KB of Flash. The architecture looks much nicer than pic14, but not as nice as stm8 or z80, maybe on par with mcs51. Unfortunately, some limitations, such as lack of an sp-relative addressing mode and general-purose or index registers are a serious issue for multithreading. After all one can't just use a few memory locations as pseudo-registers, when these would be accessed by multiple threads. There currently is no C compiler for this architecture. The manufacturer provides a "Mini-C" IDE, in which one can use a mix of assembler and a simple C-like language. Would there be interest in having an SDCC backend for this? If yes, I'd suggest: 0) Assembler, linker and simulator support. 1) A backend suitable for the single-threaded case (uses some memory locations as pseudo-registers - we need those locations for pointer access). Reentrant functions would be somewhat inefficent, but doable. 2) Maybe add an option for use of some extended (i.e. not available on all devices) instructions - 8x8-bit multiplication, read data from ROM. 3) Add an option for code suitable for multithreading - requires spinlocks around use of pseudo-registers, severly restricts functionality available in interrupt handlers. 4) Implement library support for mutexes, etc? Philipp P.S.: The instruction set looks as if designed without sufficiently considering the hardware parallelism and C support. But spinlocks can be implemented in a reasonably efficient, and from there other primitives, such as mutexes follow. But the lack of an sp-relative addressing mode and general-purpose or index registers are a huge problem. _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user