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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 365
» Latest member: yonden19
» Forum threads: 261
» Forum posts: 800

Full Statistics

Latest Threads
OpenOCD Error with Nexys ...
Forum: PULP General questions
Last Post: NEO
5 hours ago
» Replies: 1
» Views: 1,129
Booting Pulpissimo from S...
Forum: PULP General questions
Last Post: kgf
5 hours ago
» Replies: 1
» Views: 15
how to manipulating of GP...
Forum: PULP General questions
Last Post: zealshah29
04-19-2024, 12:15 PM
» Replies: 6
» Views: 17,724
priviliged interrupts
Forum: PULP General questions
Last Post: tswaehn
04-16-2024, 01:43 PM
» Replies: 0
» Views: 103
Compiling and running CNN...
Forum: PULP General questions
Last Post: NEO
04-11-2024, 12:29 PM
» Replies: 2
» Views: 274
How do I get the files ne...
Forum: PULP General questions
Last Post: AlessioBurrello
04-05-2024, 10:22 AM
» Replies: 1
» Views: 393
Pulpissimo bitstream gene...
Forum: PULP General questions
Last Post: zealshah29
03-28-2024, 06:41 AM
» Replies: 13
» Views: 40,511
Help to run Hello Example
Forum: PULP General questions
Last Post: zealshah29
03-28-2024, 06:31 AM
» Replies: 5
» Views: 10,823
Compiling and running app...
Forum: PULP General questions
Last Post: zealshah29
03-28-2024, 06:13 AM
» Replies: 5
» Views: 18,797
Understanding the TCDM in...
Forum: PULP General questions
Last Post: zealshah29
02-13-2024, 10:34 AM
» Replies: 7
» Views: 15,106

 
  Editor to use with pulpissimo?
Posted by: sake - 04-06-2020, 06:40 AM - Forum: PULP General questions - Replies (5)

Hey,

What kind of setup do you people use to work with pulpissimo?
I would also like to know about editor extensions that might provide auto-completion, jumping to definition and integration with make build errors.

Print this item

  Vsim schematic doesn't work (PULPissimo)
Posted by: Nordic - 04-03-2020, 09:14 AM - Forum: PULP General questions - Replies (8)

Goodmirning everyone Smile 

I was trying to track some signals using che schematic tracer built inside Vsim. I tried to do this using the hello test program inside the pulp-rt-examples repo.

I called the simulation enabling the gui using the commands:

Code:
- make clean all
- make run gui=1


but once vsim gui starts, when i try to send the selected instance to vsim schematic editor (doing Rmouse click on the instance -> Add to -> Schematic) i got the following error:
 
# Debug data file, vsim.dbg, does not exist.

#
# Invoke vsim with -debugDB to create this file.

So, i tried to manually set the command -debugdb inside the script invoked before running.


The vsim options file invoked might be located in: pulpissimo/sim/tcl_files/run.tcl and i changed the label to be:

Code:
set TB "vopt_tb -L models_lib -L vip_lib -debugdb"


i try to run the simulation once again, and i noticed the file vsim.dbg has been created inside the working folder (pulp-rt-examples/hello/build/pulpissimo). However when i try to send the instance inside the schematic tracer again i get the following error:

# Schematic viewing and causality tracing unavailable.

# Possible reasons are :
# 1. vopt was run without -debugdb
# 2. The -novopt option is given with -debugdb which is not allowed.

I tried to manually set vopt that might be invoked from the file located in: pulpissimo/sim/tcl_files/config/vsim.tcl

I modified the related vopt arg list to be something like:

Code:
quietly set vopt_args ""

if {$vopt_acc_ena == "YES"} {
 #+ quietly append vopt_args $vopt_args "+acc=abflmnprstv"
 quietly append vopt_args $vopt_args "+acc=mnprv \
                                      -assertdebug \
                                      -bitscalars \
                                      -fsmdebug \
                                      -debugdb \  //line added by me
                                      -linedebug"

both commands are recognised by vsim inside the gui debug windows, but the error which appears is one more time the latter i have shown:

# Schematic viewing and causality tracing unavailable.

# Possible reasons are :
# 1. vopt was run without -debugdb
# 2. The -novopt option is given with -debugdb which is not allowed.

Have I done the whole process correctly, or there are already some command line options i need to set in order to activate the debugdb?

Thanks for the time you will dedicate to me, and thanks in advance for all the incoming suggestions Smile

Print this item

  PULP-sdk on centOS: error during build + fix
Posted by: Nordic - 04-02-2020, 09:15 AM - Forum: PULP General questions - Replies (1)

Hello, and thanks for let me join inside your community!

I am writing this thread for sharing to all of you the problem I faced building PULP-sdk on a centOS 7 distribution; and how I solved that without let other people to struggle as I did for solving this.

I was trying to recreate and setup the PULPissimo platform due to functionality analysis. I Have installed each of the requested components (gcc, pulp-sdk, pulp-builder, PULPissimo) inside a generic root project folder called  <user_project_folder_path>. Each of those component has been built inside a dedicated folder. In order to be able to simulate the platform, one of the needed steps is to setup and build the sdk. I moved to the PULP sdk main page, and then followed these steps:
Then, I Set the requested env variables, linking the toolchain and vsim paths:

Code:
- export PULP_RISCV_GCC_TOOLCHAIN=<user_project_folder_path>/opt/riscv/bin
- export VSIM_PATH=<user_project_folder_path>/pulpissimo/sim

As suggested form the guide, I first need to download and build the PULPissimo sdk. Since I am running the project on a centOS 7 operating system, then I installed the suggested dependencies:

Code:
- sudo yum install git python36-pip python36-devel gawk texinfo gmp-devel mpfr-devel libmpc-devel swig libjpeg-turbo-devel redhat-lsb-core doxygen python-sphinx sox GraphicsMagick-devel ImageMagick-devel SDL2-devel perl-Switch libftdi-devel cmake cmake3 scons
- sudo python3 -m pip install --upgrade pip
- sudo python2 -m pip install --upgrade pip
- sudo python3 -m pip install artifactory twisted prettytable sqlalchemy pyelftools openpyxl xlsxwriter pyyaml numpy configparser pyvcd
- sudo python2 -m pip install configparser

and after I cloned PULP-sdk repo on branch master 

Code:
- cd <user_project_folder_path>
- git clone https://github.com/pulp-platform/pulp-sdk.git -b master
- cd pulp-sdk
- source configs/pulpissimo.sh
- source configs/platform-rtl.sh
- make all


The make command started the building for a while, but after at a time it gives the following error (showed also inside the attached screenshot):

camera/camera.cpp:24:22:: fatal error: Magick++.h: No such file or directiry
  #include <Magick++.h>
 
compilation terminated.

After double checking all the dependencies I started browsing and comparing the same steps using a fresh 16.04 Ubuntu distribution, with resulting that the whole process worked fine on Ubuntu but not on centOS distribution. After struggling and after a long research, I found that inside the dependencies was missing the development library furnished by Magick++. The related dependence was solved installing:

Code:
- sudo yum install GraphicsMagick-c++-devel

After calling again the build command make all, I’ve been able to complete the whole sdk build and setup process, which let me able to move throught the following steps in the process. I still don’t know if this error come for some kind of lacks inside my system or not. If someone inside the PULP team want to try and replicate the behaviour, would be nice to fix the missing dependence from the git list in order to solve this problem for all the users which are using the same operating system as me. Anyway, I Hope this might be useful for all those people will found the same error: here’s the fix which can help you saving a lot of precious time Smile

Print this item

  Hello example
Posted by: nayan - 03-30-2020, 06:39 AM - Forum: PULP General questions - Replies (1)

How can I view the intermediate trees generated after make clean all run in hello example

Print this item

  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,
LPLA

Print this item

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

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. 


udma_spim_txrx.sv
 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?

Thanks!

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. 

Thanks!

Print this item

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

Hi,
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 :

Code:
#include <stdio.h>

unsigned int sum_output = 0;
int main() {
   unsigned int MEM[][2] = {
   {0x1000,0x1000},
   {0x1000,0x1000},
   {0x1000,0x1000},
   {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
https://github.com/pulp-platform/pulp-riscv-gnu-toolchain/releases/download/v1.0.16/v1.0.16-pulp-riscv-gcc-ubuntu-16.tar.bz2

**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,
mahalakshmi

Print this item