PULP Community
Pulp GNU ToolChain Not throwing L2 Overflowed Error - Printable Version

+- PULP Community (https://pulp-platform.org/community)
+-- Forum: PULP's Community forum (https://pulp-platform.org/community/forumdisplay.php?fid=1)
+--- Forum: PULP General questions (https://pulp-platform.org/community/forumdisplay.php?fid=2)
+--- Thread: Pulp GNU ToolChain Not throwing L2 Overflowed Error (/showthread.php?tid=247)



Pulp GNU ToolChain Not throwing L2 Overflowed Error - vignajeth - 03-12-2021

Hi,
   I am currently working with L2 Memories. I notice that even though the size of the stimuli file I have is larger than the total size of L2 private memory (0x1c010000). The compiler does not throw l2 overflowed by ... bytes error. i have not changed the /my-path/pulp-sdk/pkg/sdk/dev/install/rules/pulpissimo/link.ld file. 

This the command the make file of hello example uses to compile my code


/my_path/project/gnu_toolchain/bin/riscv32-unknown-elf-gcc -march=rv32imfcxpulpv2 -mfdiv -D__riscv__ -MMD -MP -o /my_path/pulp-rt-examples/hello/build/pulpissimo/test/test /my_path/pulp-rt-examples/hello/build/pulpissimo/test/fc/test.o /my_path/pulp-rt-examples/hello/build/pulpissimo/test/fc//my_path/pulp-rt-examples/hello/build/pulpissimo/rt_conf.o /my_path/pulp-rt-examples/hello/build/pulpissimo/test/fc//my_path/pulp-rt-examples/hello/build/pulpissimo/rt_pad_conf.o  -nostartfiles -nostdlib -Wl,--gc-sections -L/my_path/untouched/pulpissimo/pulp-sdk/pkg/sdk/dev/install/rules -Tpulpissimo/link.ld -L/my_path/untouched/pulpissimo/pulp-sdk/pkg/sdk/dev/install/lib/pulpissimo -L/my_path/untouched/pulpissimo/pulp-sdk/pkg/sdk/dev/install/lib/pulpissimo/pulpissimo -lrt -lrtio -lrt -lgcc

pulp-run --config-file=pulpissimo@config_file=chips/pulpissimo/pulpissimo.json  --config-opt=platform=rtl --dir=/my_path/pulp-rt-examples/hello/build/pulpissimo --binary=test/test prepare
pulp-run --config-file=pulpissimo@config_file=chips/pulpissimo/pulpissimo.json  --config-opt=platform=rtl --dir=/my_path/pulp-rt-examples/hello/build/pulpissimo --binary=test/test
Launching simulator with command:


I notice the pulp_tap exceeding the maximum address of the L2 memory
 [pulp_tap_if] WRITE32 burst @1c00f800 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c00fc00 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c010000 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c010400 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c010800 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c010c00 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c011000 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c011400 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c011800 for        1024 bytes.
# [pulp_tap_if] WRITE32 burst @1c011c00 for        1024 bytes.



Any idea why the pulp_gnu_toolchain did not throw any error. does the pulp_gnu_toolchain should be rebuilt because i am playing by extending the Private memory sizes although the above error was produced with no change in the pulpissimo or pulp-sdk code


RE: Pulp GNU ToolChain Not throwing L2 Overflowed Error - meggiman - 03-18-2021

Hi vignajeth,
The linker script for PULPissimo is written in a manner such that it preferably places read-only data, the stack, and other data in private bank 0 and the text section (your code) in private bank 1. However, if the sections do not fit they will be placed in the much larger shared memory (interleaved memory banks) which by default is 512 KiB. This is the reason why you don't see an error from the linker. If you want to change this behavior or increase the size of the private banks, you will have to adjust the linker script.
Best,
Manuel


RE: Pulp GNU ToolChain Not throwing L2 Overflowed Error - vignajeth - 03-18-2021

Thanks for your reply

one more doubt, if the private bank 0 becomes full and exceeded the max address 0x 1c00 8000. Then the data written beyond the address 0x 1c00 8000 is stored in interleaved banks or written in private mem 1 since private mem starts from 0x 1c00 8000 and ends at address 0x 1c01 0000

Vignajeth


RE: Pulp GNU ToolChain Not throwing L2 Overflowed Error - meggiman - 03-22-2021

If I am not mistaken it should end up in private bank 1.