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

David Mentre Mentre at tcl.ite.mee.com
Tue Feb 17 11:27:04 EST 2004


Hello Jo,

> From: Jo Ueyama [mailto:ueyama at 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é <mentre at tcl.ite.mee.com> - Research engineer (Ph.D.)
Mitsubishi Electric ITE-TCL / European Telecommunication Research Lab
Phone: +33 2 23 45 58 29 / Fax: +33 2 23 45 58 59 
http://www.mitsubishi-electric-itce.fr


More information about the ixp1200 mailing list