ghidra icon indicating copy to clipboard operation
ghidra copied to clipboard

Add Xilinx PicoBlaze KCPSM3 processor

Open CUB3D opened this issue 1 week ago • 0 comments

This adds support for the Xilinx PicoBlaze KCPSM3 processor, as specified here as well as here

Example programs can be found here

Tested with the opbasm assember, which can be found here

By default binaries consist of 18-bit instructions, this plugin assumes instructions have been padded to 24-bit due to SLEIGH token alignment requirements which can be done like so:

opbasm <file>.psm -3 -x # assemble to HEX file
sed -i -e 's/^/0/' <file>.hex # pad each line with 0
xxd -r -p <file>.hex <out>.bin # convert to bin

Currently, as documented in the slaspec the 10-bit PC wraparound is not implemented as Ghidra doesn't support non byte-sized spaces.

Additionally, the rom space is defined as type ram_space as while documented here the rom_space type is not actually supported by the lexer here

CUB3D avatar Feb 16 '25 00:02 CUB3D