S?bastien Bourdeauducq wrote:
> Awesome, thanks! When do you sleep? :)

Catnaps :-)

By the way, we have a new toy: FN now has a "pfpu" command (command
line only) that loads register settings and PFPU code, then executes
the code, and dumps the register contents.

This should be useful for debugging math problems.

I've written a little assembler for it, in milkymist.git under
tools/asm/

Example:

/*
 * blabla
 */

r2 = 23.4
r3 = 18.6
r4 = 0
fadd r2, r3 -> r4
nop
nop
nop
nop
vectout r0, r0 -> r0

This PFPU code, so the user has to take care of the scheduling.
The input is passed through cpp, so anything cpp understands,
from comments via macro to scommand-line options, is recognized.
Lower and upper case are accepted but case can't be mixed within
the same name.

This gets translated to:

0x41bb3333      # R2 = 23.400000
0x4194cccd      # R3 = 18.600000
0x00000000      # R4 = 0.000000
00081880        #   0: FADD     R2, R3 -> R4 @ 5
00000000        #   1: NOP
00000000        #   2: NOP
00000000        #   3: NOP
00000000        #   4: NOP
00000384        #   5: VECTOUT  R0, R0          dest R4

There's a script called "pfpu" that runs the assembler and sends the
resulting code to $M1_HOST, with telnet user $M1_USER and password
$M1_PW. The FN session would look like this:

Connection to m1 23 port [tcp/telnet] succeeded!

Welcome to rtems-4.10.99.0(LM32/lm32/milkymist)
COPYRIGHT (c) 1989-2008.
On-Line Applications Research Corporation (OAR).

running on (LM32/lm32)
/dev/pty0 login: foo
Password: 

RTEMS SHELL (Ver.1.0-FRC):/dev/pty0. Jan  4 2012. 'help' to list commands.
[/] # pfpu 23.400000 18.600000 0.000000 00081880 00000000 00000000 00000000 
00000000 00000384 
1: pfpu 23.400000 18.600000 0.000000 00081880 00000000 00000000 00000000 
00000000 00000384 
0x41bb3333 23.4 0x4194cccd 18.6 0x42280000 42
[/] # 

The "pfpu" command prints as many registers as were input. The
first register for input and output is R2.

There's no synchronization with anything else FN does and running
"pfpu" while rendering or even compiling will result in a very
sick PFPU.

- Werner
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode

Reply via email to