Custom Instructions
steddyman
Posts: 91
Is there a tutorial or guide anywhere that explains how one would go about adding custom instructions in PropGCC to support changes to the verilog for the P1V?
I can see various references to custom instructions in this forum but no explanation of how GCC is modified to support them.
I can see various references to custom instructions in this forum but no explanation of how GCC is modified to support them.
Comments
New instructions can be included using a LONG directive.
I think the Spin interpreter can be easy modified to make use of mul.
New instruction can be added not only with long. There is modified openspin (there is a topic in this subforum) that supports them so you can use propeller ide with this modified openspin.
Then there is the propeller tool. It recognizes mul so you don't have to use long for multiplication.
It wasn't just instructions, but the target platform I want to change. For example putting 16k of Cog ram into each cog (just as an example).
I presume that your 'custom instructions' are referring to standard and non-standard library functions.
Cog Ram doesn't have 16K of ram. At the most, it has 2K of ram minus the 16 32bit special registers. The Hubram has a total of 32K bytes available. Some of your confusion is that you are unclear on the archiecture and working with imaginary resources.
Steadyman has modified the P1v and loaded it into an FPGA. While they may seem to be imaginary resources in a real Propeller, they are real resources in his new virtual Propeller. He wants to be able to generate the 32 bit values for his new instructions and access his new memory. All perfectly valid expectations!