🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by Steve - Happy Hacker! Sat, 07 Nov 1992 20:28
Double-buffered SSI on M56001
#1188
Author: Steve - Happy Hacker!
Date: Sat, 07 Nov 1992 20:28
22 lines
1359 bytes
I am trying to optimize some high-speed audio code for the Motorola
56001 DSP, and it seems that I could save a good amount of time by
writing a better SSI (audio sample) interrupt handler.  Since our
processing is buffer oriented and not per-sample, it would help to
have the incoming samples deposited in a double-buffering system.

Ideally, I would like the ISR to fill up one buffer, set a flag for
the main loop, and then start filling the other buffer.  A main loop
running at lower priority would process each buffer when the flag is
set.

It seems like the kind of thing that would have been done before, but
I haven't seen any code that does this.

If anyone knows of any available code or pointers to literature,
please post or Email.

Thanks!
-Steve

Steve Haehnichen          ---  PGP public key available upon request.  ---
shaehnic@ucsd.edu     (FTP pub/crypt/unix_pgp20.tar.Z from ghost.dsi.unimi.it)
Re: Double-buffered SSI on M56001
#1189
Author: Stephen L Moshier
Date: Sun, 08 Nov 1992 17:15
3 lines
556 bytes
 Use the two-cycle interrupt, not an interrupt handler.  Then check
the pointer regsiter occasionally in a polling loop to see if it
has crossed either the middle or end of the buffer.
Re: Double-buffered SSI on M56001
#1192
Author: Steve - Happy Hacker!
Date: Mon, 09 Nov 1992 16:38
35 lines
2261 bytes
--=}>> On 8 Nov 92 17:15:57 GMT, moshier@world.std.com (Stephen L Moshier) said:

>  Use the two-cycle interrupt, not an interrupt handler.  Then check
> the pointer regsiter occasionally in a polling loop to see if it has
> crossed either the middle or end of the buffer.

I tried to use the two-word interrupt, but I just can't make anything
useful fit into two instruction words.  If you have any examples (Hey,
it's short :-), please post.  I know this fast-interrupt would be
great to use, but one complex instruction takes both words.

The problem with polling in the main loop is that I then have to
guarantee that the main loop runs at least as fast as the SSI
interrupts occur.  If the main loop could run reliably run that fast,
I wouldn't really need the interrupt handler to fetch incoming SSI
data.  The problem is that the main loop does compression and host
communication, so it could very well take a while to loop.

Please, if I am missing something, let me know.

Also, is there an easy way to check if an addressing register has just
wrapped around in a modulo buffer?  (Accumulator compare is
expensive.) Right now, I carefully pick my buffer address and size so
that a single bit in the register will be set when we went "one
address to far".  Of course, this doesn't use modulo addressing at
all, but I manually force the register back to start when the bit is
set.

Is any status flag set on modulo wrap-around?

Thanks!
-Steve

Steve Haehnichen          ---  PGP public key available upon request.  ---
shaehnic@ucsd.edu     (FTP pub/crypt/unix_pgp20.tar.Z from ghost.dsi.unimi.it)
Re: Double-buffered SSI on M56001
#1197
Author: Stephen L Moshier
Date: Tue, 10 Nov 1992 01:52
15 lines
770 bytes
The two instructions are, for example,

  movep x:<<TXRX,y:(r7)+ ;read receiver
  nop

or, to go both ways,

  movep x:<<TXRX,y:(r7)+ ;read receiver
  movep y:(r7)+,x:<<TXRX ;write transmitter

Don't try to do software engineering on a DSP chip.  What you describe
as problems are actually features!
 
 
 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads