How to Ensure Microcode Executes in the Correct Order?
![](https://secure.gravatar.com/avatar/95ad87ec3c062f4acc81f7608e26359d.jpg?s=120&d=mm&r=g)
Hi All, I am trying to run a Microcode program (code below) that reads one value stored in a *specific* address of the scratch memory and adds this value to anohter one (e.g. 0x1100AB88), storing its result on the same address of the same scratchpad. In 90% of the executions it runs alright, HOWEVER in 10% of the cases it jumps straightly to the write scratch instruction (without performing the alu operation). My question is: What instruction/switch do I need to add in order to ensure that instructions in microcode are carried in the correct order? In the code below the alu instruction MUST be performed *after* scratch read finishes AND *before* write scratch is carried out. Any ideas? Many thanks? -Jo' #include "stdmac.uc" .local zero gpr1 $xfer immed32[gpr1, 0x1100AB88] immed32[zero, 0x0] scratch[read, $xfer, zero, 0, 1], ctx_swap, defer[1] alu[$xfer, $xfer, +, gpr1] scratch[write, $xfer, zero, 0, 1], ctx_swap .endlocal
![](https://secure.gravatar.com/avatar/4638e911aa2217d441d421e059c28155.jpg?s=120&d=mm&r=g)
hi,all I use SDK quad_gbeth_2401 simulation mode have error, who used it can you help me? --------------------------------- Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want.
participants (2)
-
Jo Ueyama
-
Liang Jian