Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 474
» Latest member: Raj
» Forum threads: 136
» Forum posts: 461

Full Statistics

Latest Threads
Modifications of the HERO...
Forum: PULP General questions
Last Post: Olivier
1 hour ago
» Replies: 0
» Views: 4
32bit data loading
Forum: PULP General questions
Last Post: RiscV
07-03-2020, 09:53 AM
» Replies: 0
» Views: 31
udma memory to memory dat...
Forum: PULP General questions
Last Post: RiscV
06-30-2020, 04:15 AM
» Replies: 2
» Views: 89
Running programs on Zedbo...
Forum: PULP General questions
Last Post: Raj
06-29-2020, 02:33 PM
» Replies: 2
» Views: 117
Data relocation when usin...
Forum: PULP General questions
Last Post: LPLA
06-29-2020, 02:20 PM
» Replies: 4
» Views: 394
Questions regarding Runti...
Forum: PULP General questions
Last Post: heavySea
06-29-2020, 01:00 PM
» Replies: 2
» Views: 183
Target options for PULP R...
Forum: PULP General questions
Last Post: mehrdad
06-06-2020, 12:44 AM
» Replies: 2
» Views: 499
Some questions about the ...
Forum: PULP General questions
Last Post: Olivier
06-04-2020, 03:38 PM
» Replies: 0
» Views: 272
Pulpissimo prepare standa...
Forum: PULP General questions
Last Post: bluewww
06-03-2020, 03:08 PM
» Replies: 3
» Views: 868
The status of Ariane ARA ...
Forum: PULP General questions
Last Post: kgf
05-26-2020, 08:51 AM
» Replies: 1
» Views: 458

  Pulpissimo: Using JTAG and Flash for larger sets of data
Posted by: LPLA - 03-06-2020, 05:24 PM - Forum: PULP General questions - Replies (2)

I couldn't think of a more descriptive title so let me please explain what i am trying to achieve.

I'm using a hardware accelerator and have quite some amount of data (weights, inputs, etc) that i need to send to the accelerator.
The idea was to use the SPI flash model to store the flash_stim (and the other data) in the flash memory, without using the UserPreload feature.
Now there are a few things that aren't clear to me which i couldn't resolve by reading the issues on github or reading the forum.

Here is my approach so far:

First i wrote an application to send data to the flash memory, similar to the send example.
I created an array that contains some data with the intend of having this array contain the data from the flash_stim.slm file (without the addresses).
This worked for smaller data sets where i defined an array with random sample data to send to the flash.
At some point the array (and therefore the whole code) was simply too big to fit in the Pri banks of the L2 memory and i was stuck in "Waiting for end of computation".

So now i am using JTAG to load my data into the non Pri banks of the L2 memory.
The goal is to send this data to the flash memory, effectively making the flash memory contain the same data as if i had been using the UserPreload feature of the S25FS256S model.
Sending data to the L2 via JTAG of course works fine but also raises the first question.
There are different stimuli files for either JTAG (stim.txt) or STANDALONE (flash_stim.slm).
Effectively they should both do the same thing in the end, but are different in size and format.
For example i can't use readmemh to load the flash_stim.slm into the stimuli array.

As far as i understand there is no way to directly load the flash memory via JTAG because it's not memory mapped, correct?
If this is true, then would the correct way to do this be:
1) Use JTAG to load the image (in this case the stim.txt) into L2 just as you would do when booting from L2 but use a different address (e.g. 0x1C030000).
2) Use SPI to transfer that data to the flash memory (this i do by code, similar to the send example i mentioned, using pulp_read32 to get the data from L2, but this seems rather inefficient).
3) Now i should be able to boot from ROM even tho i didn't use the UserPreload feature.

What i am wondering about are the following things:
- Is the way i described above the correct or rather most efficient way to do this?
- Is there a way to load the flash_stim.sml to flash without using the UserPreload feature or converting the format so readmemh can be used?
- This issue mentions the way to do this would be to write data from JTAG to L2 (like i am doing too) and then to engage the udma to transfer this data to the flash. Unfortunately i'm not sure how you would do this and i couldn't find a documentation or guide on this.

Thank you for your help,

Print this item

  using axi from rtl and C code
Posted by: sake - 03-05-2020, 07:36 PM - Forum: PULP General questions - Replies (3)

Hi, I'm trying to add hardware accelerator to the system that would connect with axi-lite slave to pulpissimo.
The system already has master there that I can access from CPU?
I have skimmed through pulpissimo datasheet and bit of the code but I'm lost here.
Got any pointers?

Print this item

  Regarding uDMA SPI Master
Posted by: gaumzi - 03-04-2020, 06:01 PM - Forum: PULP General questions - Replies (1)

I have been looking into using udma_qpsi (https://github.com/pulp-platform/udma_qspi) logic in SPI_STD mode. I noticed that when in SPI_STD mode for sampling data_rx in udma_spim_txrx module, spi_sdi1_i is used instead of spi_sdi0_i. 

 line 264: s_data_rx[s_bit_index] = spi_sdi1_i;

However for data_tx spi_sdo0 is used

line 234: s_spi_sdo0 = r_tx_shift_reg[s_bit_index];

Was this intentional? If so, is there a reason behind it?


Print this item

  FPGA - Booting (.bit + .elf) from flash or SD card
Posted by: AhmedZaky - 02-18-2020, 07:37 AM - Forum: PULP General questions - No Replies

Hi All,

I am trying to pre-load the pulpissimo bitstream along with the application on a Genesys 2 to run the application directly without connecting it to PC. This is mainly to be done either using the SD card or SPI flash. 

Does anyone have an idea on how to merge the .bit and .elf file together to be loaded upon powering the FPGA? All the sources I found were talking about Microblaze based systems. 

Any help will be highly appreciated. 


Print this item

  Compiler behaves unexpectedly
Posted by: ian - 02-13-2020, 03:55 PM - Forum: PULP General questions - No Replies

There are some problems encountered here. During the calculation of the unsign memory load behavior, it was found that the behavior of the compiler may be wrong through the analysis of the assembly.
Related C code test.c :

#include <stdio.h>

unsigned int sum_output = 0;
int main() {
   unsigned int MEM[][2] = {
   {0x1000,0x1000}, };
   for (unsigned char data = 0x7F; data < 0xFF; data ++) {
       for (unsigned int i = 0; i < sizeof(MEM) / 4 / 2; i++) {
           volatile unsigned char *address = (unsigned char *)MEM[i][0];
           for (unsigned int j = 0; j < (MEM[i][1] - MEM[i][0]) / sizeof(unsigned char) + 1; j++) {
               asm volatile("nop;nop;"); asm volatile("nop;nop;");
               sum_output += address[j];
               asm volatile("nop;nop;"); asm volatile("nop;nop;");
    return 0;

Compiler Version : Release Label v1.0.16-pulp-riscv-gcc

**The analysis process is as follows:
Step 1(original) :
riscv32-unknown-elf-gcc -O2 -march=rv32IMCXpulpv2 -Wa,-march=rv32IMCXpulpv2 -Wextra -Wall -Wno-unused-function -fmerge-all-constants -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -fdiagnostics-color=always -fstack-usage -nostartfiles -fsigned-char -Wno-pointer-sign -Wl,--no-check-sections -Wl,--gc-sections -Wall -Werror -Wno-shift-negative-value -Wno-unused-but-set-variable -Wno-unused-variable -msave-restore -c test.c -o test.o
[Image: 74311607-d6199000-4daa-11ea-96af-69702d21c2c7.png]

Note : I used "unsigned char *" assigned to memory, but assembly use 'p.lb' not 'p.lbu' This instruction has a sign extension behavior, so use the instruction will cause a1 register value error, when value >= 0x80, because 0x80 will sign extension to 0xFFFF_FF80,The next operation(add/sub....) will cause an error result.
Step 2 ("unsigned char *" modify to "unsigned short *") :
riscv32-unknown-elf-gcc -O2 -march=rv32IMCXpulpv2 -Wa,-march=rv32IMCXpulpv2 -Wextra -Wall -Wno-unused-function -fmerge-all-constants -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -fdiagnostics-color=always -fstack-usage -nostartfiles -fsigned-char -Wno-pointer-sign -Wl,--no-check-sections -Wl,--gc-sections -Wall -Werror -Wno-shift-negative-value -Wno-unused-but-set-variable -Wno-unused-variable -msave-restore -c test.c -o test.o
[Image: 74312400-9a7fc580-4dac-11ea-8e63-6b0a7272b5a3.png]

Note : Assembly behaves as expected use 'p.lhu'
Step 3 (change -march to original RISCV32) :
riscv32-unknown-elf-gcc -O2 -march=rv32IMC -Wa,-march=rv32IMC -Wextra -Wall -Wno-unused-function -fmerge-all-constants -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -fdiagnostics-color=always -fstack-usage -nostartfiles -fsigned-char -Wno-pointer-sign -Wl,--no-check-sections -Wl,--gc-sections -Wall -Werror -Wno-shift-negative-value -Wno-unused-but-set-variable -Wno-unused-variable -msave-restore -c test.c -o test.o
[Image: 74312762-3a3d5380-4dad-11ea-81ab-e0fb35f75e4f.png]

Note : Assembly behaves as expected use 'lbu'
Conclusion :
Through the above three experiments, can find Compiler behaves unexpectedly on above programming method.

Please help clarify whether this situation is correct

2020/2/13 :

**The analysis process is as follows:
Step 4 (use Compiler dumping at various stages of processing the intermediate language tree to a file) :
riscv32-unknown-elf-gcc -O2 -march=rv32IMCXpulpv2 -Wa,-march=rv32IMCXpulpv2 -Wextra -Wall -Wno-unused-function -fmerge-all-constants -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -fdiagnostics-color=always -fstack-usage -nostartfiles -fsigned-char -Wno-pointer-sign -Wl,--no-check-sections -Wl,--gc-sections -Wall -Werror -Wno-shift-negative-value -Wno-unused-but-set-variable -Wno-unused-variable -msave-restore -c test.c -o test.o -fdump-tree-all

Note : 

1. ("unsigned char *") I observed test.c.259r.combine stage, memory unsigned load operation have been replace to 'loadqi_ind_reg_reg'(define in gcc/config/riscv/riscv.md) cause subsequent assembly code conversion errors.

fork issue from : https://github.com/pulp-platform/pulp-ri.../issues/18

Print this item

  regarding GPIO
Posted by: HariniM - 01-30-2020, 09:51 AM - Forum: PULP General questions - Replies (2)

hi all,

I tried integrating GPIO in pulp environment. after integrating I was able to run testcase but I am not able to get received data.
i.e) this the the output I got after simulating:

warning: NUMERIC_STD."=": metavalue detected, returning FALSE
#    Time: 0 ps  Iteration: 0  Instance: /tb/top_i/peripherals_i/apb_uart_i/UART_RXFF
# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
#    Time: 0 ps  Iteration: 0  Instance: /tb/top_i/peripherals_i/apb_uart_i/UART_TXFF
# Using MEMLOAD method: PRELOAD
# Using      ri5cy core
# [SPI] Enabling QPI mode
# [adv_dbg_if] AXI4 WRITE         32 burst @1a107008 for           4 bytes.
# Preloading memory
# Preloading instruction memory from slm_files/l2_stim.slm
# Preloading data memory from slm_files/tcdm_bank0.slm
# [TRACER] Output filename is: trace_core_00_0.log
# RX string: Successfully enabled func 2 on PIN_MSPI_CSN1                                                                                                                                               # RX string: Successfully set out dir on PIN_MSPI_CSN2                                                 # RX string: Done!!! 

Can anyone please help me to  know why this occurs and let me know what mistake I have done.
thanks and regards,

Print this item

  GCC Compiler output
Posted by: HariniM - 01-14-2020, 11:29 AM - Forum: PULP General questions - No Replies

Can anyone help me to find the output file(executable binary file)/folder of the C compiler when we try to execute the testcase files (testUART.c , testI2C.c, testGPIO.c).

Print this item

  Monitoring Memory Request
Posted by: masoud - 01-08-2020, 09:02 PM - Forum: PULP General questions - No Replies


I need to monitor and the connectivity and signal transitions from the processor to the TCDM when there is a memory request, to understand the timing and how communication works.

On this page :

For hardware debugging, it asks to copy the generated .slm files. I have no .slm files nor the folder " build/system-bigpulp*/ in after installing the pulp SDK and running OpenMP examples.


I would be thankful to get some help.

Print this item

  Problems with the bootrom
Posted by: Jakob - 01-07-2020, 03:07 PM - Forum: PULP General questions - No Replies

Hello, I did some changes to the Ariane core (mainly in the frontend) and tried to boot the provided Linux version again. Unfortunately, the bootrom does not work anymore, such that I don't get the first 'Hello World!' output.

But if I build the bootrom (with the provided makefile) and load the resulting bootrom.elf in gdb, then everything works just fine and in the simulation it also looks quite good. Without the changes to the Ariane core Linux boots as well.

Any idea why this happens? I currently don't have any idea where to begin searching for the problem.

I made significant changes to frontend.sv, instr_queue.sv and instr_scan.sv and minor changes to branch_unit.sv and controller.sv. Neither of these changes should affect the fetching of the first instruction.

Thank you very much!

Print this item

  Problem in building Pulp-SDK("make all" error)
Posted by: ziang87 - 12-28-2019, 06:58 AM - Forum: PULP General questions - Replies (3)


I'm going to create the pulp platform.When I followed the instructions to building the SDK, an error occurred.I found on the forums that some people had similar problems, but their solutions didn't solve mine.
I started by installing the new Ubuntu 16.04, in the sequence of steps:

1.root@cp1-VirtualBox:/home/cp1# mkdir riscv
2.root@cp1-VirtualBox:/home/cp1/riscv# git clone https://github.com/pulp-platform/pulp
3.Connecting to GitHub with SSH successfully
4.sudo apt install git python3-pip python-pip gawk texinfo libgmp-dev libmpfr-dev libmpc-dev swig3.0 libjpeg-dev lsb-core doxygen python-sphinx sox graphicsmagick-libmagick-dev-compat libsdl2-dev libswitch-perl libftdi1-dev cmake scons libsndfile1-dev
5.sudo pip3 install artifactory twisted prettytable sqlalchemy pyelftools openpyxl xlsxwriter pyyaml numpy configparser pyvcd
6.sudo pip2 install configparser
root@cp1-VirtualBox:/home/cp1# pip --versionpip 19.3.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)
root@cp1-VirtualBox:/home/cp1# python3 --versionPython 3.5.2
7.root@cp1-VirtualBox:/home/cp1/riscv# git clone --recursive https://github.com/pulp-platform/pulp-ri...-toolchain
8.sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev
9.root@cp1-VirtualBox:/home/cp1/riscv/pulp-riscv-gnu-toolchain# ./configure --prefix=/opt/riscv --with-arch=rv32imc --with-cmodel=medlow --enable-multilib
11.root@cp1-VirtualBox:/home/cp1/riscv/pulp-riscv-gnu-toolchain# export PULP_RISCV_GCC_TOOLCHAIN=/home/cp1/riscv/pulp-riscv-gnu-toolchain
12.root@cp1-VirtualBox:/home/cp1/riscv/pulp# export VSIM_PATH=/home/cp1/riscv/pulp/sim
13.root@cp1-VirtualBox:/home/cp1/riscv# git clone https://github.com/pulp-platform/pulp-sdk.git -b master
14.export PULP_GITHUB_SSH=1
15.root@cp1-VirtualBox:/home/cp1/riscv/pulp-sdk# source configs/platform-rtl.sh
16.make all

Submodule path 'pulp-tools': checked out 'aa9ad5cd9f6fa75b80cbc91a4c2c8e5db737d7ce'
source init.sh && ./pulp-tools/bin/plpbuild --p sdk checkout build env --stdout
Configuring Pulp project at /home/cp1/riscv/pulp-sdk
Traceback (most recent call last):
  File "./pulp-tools/bin/plpbuild", line 3, in <module>
    import plptools as plp
  File "/home/cp1/riscv/pulp-sdk/pulp-tools/bin/plptools.py", line 27, in <module>
    from plpobjects import *
  File "/home/cp1/riscv/pulp-sdk/pulp-tools/bin/plpobjects.py", line 32, in <module>
    from openpyxl import Workbook
  File "/usr/local/lib/python3.5/dist-packages/openpyxl/__init__.py", line 6, in <module>
    from openpyxl.workbook import Workbook
  File "/usr/local/lib/python3.5/dist-packages/openpyxl/workbook/__init__.py", line 4, in <module>
    from .workbook import Workbook
  File "/usr/local/lib/python3.5/dist-packages/openpyxl/workbook/workbook.py", line 7, in <module>
    from openpyxl.worksheet.worksheet import Worksheet
  File "/usr/local/lib/python3.5/dist-packages/openpyxl/worksheet/worksheet.py", line 392
    return f"{get_column_letter(min_col)}{min_row}:{get_column_letter(max_col)}{max_row}"
SyntaxError: invalid syntax
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 1

Thank you so much for your prompt answer.
best wishes,

Print this item