[ixp1200] How to Ensure Microcode Executes in the Correct Order?

Jo Ueyama ueyama at comp.lancs.ac.uk
Tue Feb 17 11:05:46 EST 2004


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



More information about the ixp1200 mailing list