i was using the vu0 in macromode only so far and would like to use vcallms for some algorithms where i just move some values directly into vu0-registers (using the lqc2 instruction) and then start a subroutine from vu0-micromem. after the subroutine is finished i would store the value with sqc2 in main memory.
i saw an example that looked like this:
lqc2 vf4,0x0(%0)
lqc2 vf5,0x0(%1)
vcallms %2
sqc2 vf4, 0x0(%0)
since there is no code that waits for the end of the subroutine,
does that mean the vcallms-instruction is waiting until the subroutine is finished or does the following sqc2-instruction stall until its finished?
2nd would be better since i could do something else in the meantime.
thanks for any help
vcallms
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
The only opcodes that does any interlocking with vu0 is qmfc2 and qmtc2, so they are the only ones actually waiting for a microprogram to finish after vcallms/vcallmsr,
lqc2 and sqc2 doesnt do any interlocking so they will just load/store the values at the time of execution. if you want to do stuff in the meantime of a mpg check the status register for vu0 when you want to fetch the result.
lqc2 and sqc2 doesnt do any interlocking so they will just load/store the values at the time of execution. if you want to do stuff in the meantime of a mpg check the status register for vu0 when you want to fetch the result.
Kung VU
thanks blackdroid
so if qmfc2 interlocks with vu0 then i dont need a loop where i read the status register and check if vu0 is still running, one qmfc2 instruction would suffice before writing the rest to memory?
for example:
so if qmfc2 interlocks with vu0 then i dont need a loop where i read the status register and check if vu0 is still running, one qmfc2 instruction would suffice before writing the rest to memory?
for example:
Code: Select all
...
vcallms %0
/* ...doing something else... */
qmfc2 $1,vf01 /* wait / interlock(?) */
sqc2 vf01,0x0(%1)
sqc2 vf02,0x10(%1)
sqc2 vf03,0x20(%1)
infj
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
You may want to see this earlier VU topic thread which discusses the issue of interlock:
http://forums.ps2dev.org/viewtopic.php?t=494
http://forums.ps2dev.org/viewtopic.php?t=494