Re: TPU assembler question
Eric McRae <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Hi Attila,
This is interesting. I don't know if the assembler is being fooled by
the apparent sequence of :
au chan_reg = something.
chan write_mer.
That sequence is a known problem which causes contention. Since you
preceed it with a call, no_flush however, those two instructions won't
be executed in sequence. Is there a chance that the first instruction
of your called subroutine writes ERT or MER? Probably not but that
would still qualify as an error.
However, there is another problem in this code snippit. Doing a neg_MRL
and TDL in the last instruction of a timeslot in which the channel
register has been changed is a known problem - not detected by the
assembler.
In any case, could you do this?
au chan_reg := chan_reg + sr. (* goto other channel *)
call X_TimeLH, flush.
qty154 wrote:
>I have the following TPU code snifflet:
>
>...
>if N = 0 then goto L_PXT00, flush.
>
>call X_TimeLH, no_flush.
>
>au chan_reg := chan_reg + sr. (* goto other channel *)
>
>au ert := a;
>chan write_mer, (* set up match again *)
> neg_MRL,
> neg_TDL;
>end.
>
>...
>The subroutine is more than 3 instructions long.
>
>I guess there is nothing spurious in this code, but tpumasm (ver 4.04
>ess release) gives an error message because of the write_mer.
>I think the error is incorrectly raised so is there an update or
>secret command-line switch of the compiler so that it generates the
>S19 file?
>I don't want to happily rewrite my otherwise highly optimised code.
>
>
--
Eric McRae, Electro-Logic Machines, Inc.
511 Root St., Port Townsend WA, 98368
Phone/Fax: 360.379.0969, http://www.elmi.com
-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/