home .. forth .. misc mail list archive ..

Re: Unidentified subject!


On Nov 17,  9:02, Jeff Fox wrote:
|>Next question: since my intended application is off-line signal processing
and
|>other flavors of number crunching, I will need fast multiply operations.  Is
|>there a multiplier in the hardware or will I have to do this in software?
| There is no multiply instruction, but there is a multiply step.  Check out
| the documentation or play with the S21 chip simulator to get a feel of
| the instruction set and the performance.  We have coded many math words
| in CODE on P21FORTH to get performance.  The eForth model only has one
| math word in CODE (UM+) and everything else is high level.  So math is
| very slow in eForth.  We have many standard Forth words 2* 2/ U2/ * UM*
| UM/MOD and many other words in CODE to get better performance.  We also
| have fractional multiply words *. and *_ and a CORDIC function.
|
| Math is the weakest thing on MuP21.  You have to plan code well to get
| the best performance.  Penio has ported some code to the simulator and
| has experimented with optimizing performace.  Dr. Montvelishsky has
| written many of the Math routines in P21FORTH.  There are some good
| examples on the net.
|
| MuP21 is not designed for DSP, it has no multiply accumulator.  (most
| multiply accumulators are bigger than MuP21)  The slowest instruction
| is + (and +*) which can take more than one instruction cycyle.  So
| math must be carefully constructed if speed is an issue.
There are Boolean formulations of a number of important signal and image
processing functions.  CORDIC and related schemes are a given in any fixed-
point environment -- I'm using things like this on my HP100LX now.  It's faster
in general, given multiply and divide, to do a log, say, using a table lookup
to start and a step or two of a continued fraction to get the rest of the bits.
 But in the absence of multiply and divide the bitwise transcendentals are the
only way to go.  My current project was implemented using the bitwise
transcendentals so I could, if needed, backport it to something like an 8-bit
microprocessor, even though using the 8016 multiply and divide is faster.
 Relative to the 7.91 MHz 80186 in my HP the MuP21 will be fast enough if there
is lots of memory for tables.
|
| Chuck says math was not important for OKAD.  He does a few multiply and
| a bunch of adds, but it was not important to this design.
|
| Chuck is in the CUSTOM silicon business, and his idea is attack
| problems with custom hardware and custom instructions and custom
| coprocessors.  MuP21 was not designed to be equally good at all things,
| math is one that needs attention.  Penio or Dr. Montvelishsky might
| have useful advice for what you want to do.
|
| And there are lots of math examples in the eForth or P21FORTH
| implementations.
I suspect a 24-bit multiply/accumulate chip would be a reasonable answer,
although I'm not sure how it would fit in with the bus structure.  There are
too many signal processing chips already -- maybe a better answer is a MuP21
"control processor" and a TI 3x0 "array processor" on a single board.

-- 
M. Edward Borasky (znmeb@plaza.ds.adp.com)

Give me your brains or I'll blow your money out.