Ahh, many thanks Frog for your assistance - I look forward to MMULT another time.SubQMod wrote:Can someone break down and explain the RISC DIV (16.16 part of it) and the MMULT (Matrix Multiply) command for me please, maybe with an example input and output to it (nothing too in depth, just the concept).
Would be most grateful
When you divide 16.16 you need to make sure a bit is set in the GPU
G_DIVCTRL register. What will happen is you execute the
the divider circuit in the JAgur is in parallel with the alu
so you have the GPU executing other instructions
div r0,r1(or what ever registers you want)
do something for 18 cycles
Then you may read the result or divide again. Otherwise if you try to read
it too early, your result may be incorrect as the divide may not have been
completed yet. however you can do a few other instrctions with the GPU
while waitng fo the devide to complete.This is the beauty of the parallel
math units in the Jaguar
Either mode of division leaves a remainder in the G_REMAIN register of the GPU.
both are also unsigned results....positive numbers only.
MMULT another time my friend.
One of the things I have been doing is optimising my GPU/DSP emulation cores with Intel asm ( ). This has given me a great speed increase for the emulation but it reminds me so much of how much I hate x86 assembler - much prefer MIPS or other RISC based systems.