RE: [ixp1200] How to Ensure Microcode Executes in the Correct Ord er?
Hello Jo,
From: Jo Ueyama [mailto:ueyama@comp.lancs.ac.uk] Sent: Tuesday, February 17, 2004 5:06 PM
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?
You must use a signal to wait for the read to be done. More specifically:
#include "stdmac.uc"
.local zero gpr1 $xfer
.sig sig_scratch
immed32[gpr1, 0x1100AB88] immed32[zero, 0x0]
scratch[read, $xfer, zero, 0, 1], ctx_swap, defer[1]
;; replace above line with: scratch[read, $xfer, zero, 0, 1], sig_done[sig_scratch] ctx_arb[sig_scratch] ;; after that point, you'll be sure that read is done
alu[$xfer, $xfer, +, gpr1] scratch[write, $xfer, zero, 0, 1], ctx_swap .endlocal
I've not compiled that code, so I may I made a typo or forgotten something.
Signals are used at length in Intel microcode. You should absolutely read
Intel manuals if you want to do serious IXP programming. Look at Intel
Programmers Reference, sect. 2.8, registers & signals.
Yours,
david
--
David Mentré
participants (1)
-
David Mentre