Page 2 of 2

Re: Example: In-line maths calculation, in internal memory

PostPosted: Tue Jun 25, 2013 9:09 am
by Dr.BeauWebber
Thanks, no, as I say this was not the "compile for real hardware" version, just an aplcc compile to e-run.
I will now create a "real hardware version" on a Raspberry Pi - I have aplc running there, and I have built the latest gcc toolchain there, but not yet built an aplc to use that tool-chain.
Hopefully later today, but I still have urgent jobs for last Sunday still to do.

Re: Example: In-line maths calculation, in internal memory

PostPosted: Tue Jun 25, 2013 12:11 pm
by ysapir
So... could you do the same analysis on the version that took you 10s to run on the real board?

Re: Example: In-line maths calculation, in internal memory

PostPosted: Tue Jun 25, 2013 4:19 pm
by Dr.BeauWebber
OK, that is done :
As I no longer have access to the Parallella hardware :
I have built the latest gcc tool-chain on a Raspberry Pi, and copied on esdk.4.13.03.30.

Two things :
Firstly : this tool-chain allows me to generate a.out files that emit output on the arm :
$ /home/jbww/Src/Git/INSTALL/bin/e-run a.out
2.718146
(with the older sdk installation on the Parallella board, there is no output from the arm code using e-run)

Secondly, with the addition of links to the esdk, this installation builds the Epiphanny run time code.
I attach the requested dump and trace files.
The trace file all appears to be in low memory, here is a short section :
Code: Select all
0x000234 ---   _epiphany_star  mov.l r1,0x4960   - registers <- 0x4960
0x000238 ---   _epiphany_star  movt r1,0x0       - registers <- 0x4960
0x00023c ---   _epiphany_star  mov.b r2,0x0      - registers <- 0x0
0x00023e ---   _epiphany_star  mov.b r3,0x0      - registers <- 0x0
0x000240 ---   _epiphany_star  strd r2,[r0],+0x1 - memaddr <- 0x46f0, memory <- 0x0, memaddr <- 0x46f4, memory <- 0x0, registers <- 0x46f8
0x000244 ---   _epiphany_star  sub r5,r1,r0      - cbit <- 0x1, vbit <- 0x0, vsbit <- 0x0, registers <- 0x268, zbit <- 0x0, nbit <- 0x0
0x000246 ---   _epiphany_star  bne.s 0x00000240  - pc <- 0x240
0x000240 ---   _epiphany_star  strd r2,[r0],+0x1 - memaddr <- 0x46f8, memory <- 0x0, memaddr <- 0x46fc, memory <- 0x0, registers <- 0x4700
0x000244 ---   _epiphany_star  sub r5,r1,r0      - cbit <- 0x1, vbit <- 0x0, vsbit <- 0x0, registers <- 0x260, zbit <- 0x0, nbit <- 0x0
0x000246 ---   _epiphany_star  bne.s 0x00000240  - pc <- 0x240
0x000240 ---   _epiphany_star  strd r2,[r0],+0x1 - memaddr <- 0x4700, memory <- 0x0, memaddr <- 0x4704, memory <- 0x0, registers <- 0x4708
0x000244 ---   _epiphany_star  sub r5,r1,r0      - cbit <- 0x1, vbit <- 0x0, vsbit <- 0x0, registers <- 0x258, zbit <- 0x0, nbit <- 0x0
0x000246 ---   _epiphany_star  bne.s 0x00000240  - pc <- 0x240

This uses aplc.ldf, which is based on fast.ldf
cheers, Beau