Yet another Pulpissimo (on Zedboard) bring-up thread
#3
(12-20-2019, 04:10 PM)bluewww Wrote: While I'm not exactly aware what all the things are that break I know that the sdk and runtime assume a certain pattern in the coreid to figure out if a core is a cluster core (cluster doesn't exist in PULPissimo though) or a fabric controller core. Indeed the lower coreids are used to indicate that we have a cluster id.

You could try to do the bring-up with https://github.com/pulp-platform/pulp-runtime/ which has been recently developed to have a simple bare bones runtime. This could help you with your debugging efforts.

Will do, thanks a lot for the fast reply. BTW I have tried to use the bare option of rt/mode of pulp-sdk with exactly that intent but it seems completely broken in the current build system (cf. pulp_opt_rt.mk).

One more thing I forgot to mention in the original post about rt_user_alloc: GDB (built from the pulp toolchain repository) can't decode an instruction apparently:


Code:
 0x1c008a2c  rt_user_alloc+0  lw    a5,0(a0)
 0x1c008a2e  rt_user_alloc+2  addi    a1,a1,7
 0x1c008a30  rt_user_alloc+4  0xc405b5b3
 0x1c008a34  rt_user_alloc+8  li    a4,0

I did not try to decode it manually but I wonder why this might happen since I am using a "matching" GCC and GDB/binutils specifically for pulp/ri5cy.

pulp-runtime is not working either, but differently :)
It seems to get stuck in pos_soc_init() and unlike with pulp-sdk breaking execution does not work correctly:

Code:
Breakpoint 1, pos_init_start () at .../pulp-runtime/kernel/init.c:59
59      pos_soc_init();
>>> n
^Cunable to halt hart 0
  dmcontrol=0x80000001
  dmstatus =0x00030c82
Could not read registers; remote failure reply 'E0E'
Could not read registers; remote failure reply 'E0E'

I need to start over completely in that case, i.e. re-download the bitstream, restart openocd and gdb.

When looking more closely what happens I reckon there is either a bug or I am not supposed to use pulp-runtime's pulpissimo configuration the way I do.
ARCHI_NB_FLL is set to 2 for pulpissimo. This define is used to define the size of the pos_freq_domains array.
However, in pos_soc_init() the code tries to write to pos_freq_domains[PI_FREQ_DOMAIN_PERIPH] where PI_FREQ_DOMAIN_PERIPH equals 2, i.e. this is out of bounds. *shrug*

The readme of pulp-runtime is unclear to me. I tried following it as follows to create the binary:

  1. set all the environment variables as for pulp-sdk
  2. cd pulp-rt-examples/hello (which has a modified makefile already setting e.g. -g3)
  3. source .../pulp-runtime/configs/fpgas/pulpissimo/genesys2.sh
  4. make clean all (which seems to work as intended, output below)

Code:
RM  .../pulp-rt-examples/hello/build
CC  test.c
CC  .../pulp-runtime/kernel/fll-v1.c
CC  .../pulp-runtime/kernel/freq-domains.c
CC  .../pulp-runtime/kernel/chips/pulpissimo/soc.c
CC  .../pulp-runtime/lib/libc/minimal/io.c
CC  .../pulp-runtime/lib/libc/minimal/fprintf.c
CC  .../pulp-runtime/lib/libc/minimal/prf.c
CC  .../pulp-runtime/lib/libc/minimal/sprintf.c
CC  .../pulp-runtime/kernel/init.c
CC  .../pulp-runtime/kernel/kernel.c
CC  .../pulp-runtime/kernel/alloc.c
CC  .../pulp-runtime/kernel/alloc_pool.c
CC  .../pulp-runtime/kernel/irq.c
CC  .../pulp-runtime/kernel/soc_event.c
CC  .../pulp-runtime/kernel/bench.c
CC  .../pulp-runtime/drivers/uart.c
CC  .../pulp-runtime/kernel/crt0.S
CC  .../pulp-runtime/kernel/irq_asm.S
LD  .../pulp-rt-examples/hello/build/test/test
Reply


Messages In This Thread
RE: Yet another Pulpissimo (on Zedboard) bring-up thread - by stefanct - 12-20-2019, 04:18 PM

Forum Jump: