Re: TPU assembler question
"qty154" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Hi Eric, My subroutine changes the chan_reg but it switches back to the original channel. After it, the ert and TDL/MRL is set to the original channel, I hope, with no problem. I had no other workaround in my mind just what you wrote, I put the channel reg. instruction before the call. I think and strongly recommend to Motorola, that these kind of error checks built into the tpumasm should actually be warnings. The reason is obvious, my case showed it why. Being it only a warning, tpumasm still could generate the microcode, and - hopefully - the code would work as expected. Best regards Attila --- In [email protected], Eric McRae <eric@e...> wrote: > 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/