Accessing BRAM data from /dev/mem of RedPitaya

Applications, development tools, FPGA, C, WEB
adiana007
Posts: 21
Joined: Mon Jun 05, 2023 11:44 am

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by adiana007 » Tue Jun 13, 2023 3:48 pm

Hi Pavel,

Thanks for the links provided.
Can you kindly valdiate the approach to run adc_test project.
  • Validate RedPitaya bootup, ssh and wifi configurations
  • Use the command

    Code: Select all

    make NAME=adc_test bit
    on the Redpitaya, for generating the bitstream
  • Upload the bitstream using cat command
  • Modify the adc-test-server.c for triggered acquisition (I hope we don't have to use Vitis for this, and can directly run it after compilation).
Kindly let me know if I'm missing any of the procedure.

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by pavel » Tue Jun 13, 2023 4:04 pm

I cannot provide this level of support. If my code examples and instructions do not work for you, then I am afraid I cannot help you more than that. Since you are working on a commercial project, I would suggest hiring an expert who would help you solve all the problems.

adiana007
Posts: 21
Joined: Mon Jun 05, 2023 11:44 am

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by adiana007 » Thu Jun 15, 2023 8:48 am

Dear Pavel,

I understand your point. Thanks for the help. I will limit my questions only to your project and implementation as you might have absolute clarity on the building and implementation methodology.

I used an SD card that has the Latest Stable Image for StemLab provided by RedPitaya. I unmounted the partition /dev/sdc. Then I used Gparted to format the partition to fat32. Upon copy pasting the contents from .zip file provided by you and powering up the RedPitaya, I find only the Blue, Green LED being constant (The yellow LED comes up in the start for ~5 seconds, then goes off). Note that the SD card has 2 partitions, one that was formatted as Fat32 partition and other uses w95 Fat16 partition. I tried multiple combination of formatting the first partition also, but the behaviour remined unchanged.

I followed the commands later from your troubleshooting steps from the link http://pavel-demin.github.io/red-pitaya-notes/alpine/, and upon copy pasting the folder contents into newly formatted single partitioned Fat32 SD card, I find that only the green LED indicating power remained ON.

Kindly request your suggestions on booting up using your Alpine Linux image. Thanks in advance

adiana007
Posts: 21
Joined: Mon Jun 05, 2023 11:44 am

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by adiana007 » Thu Jun 15, 2023 8:48 am

Dear Pavel,

I understand your point. Thanks for the help. I will limit my questions only to your project and implementation as you might have absolute clarity on the building and implementation methodology.

I used an SD card that has the Latest Stable Image for StemLab provided by RedPitaya. I unmounted the partition /dev/sdc. Then I used Gparted to format the partition to fat32. Upon copy pasting the contents from .zip file provided by you and powering up the RedPitaya, I find only the Blue, Green LED being constant (The yellow LED comes up in the start for ~5 seconds, then goes off). Note that the SD card has 2 partitions, one that was formatted as Fat32 partition and other uses w95 Fat16 partition. I tried multiple combination of formatting the first partition also, but the behaviour remined unchanged.

I followed the commands later from your troubleshooting steps from the link http://pavel-demin.github.io/red-pitaya-notes/alpine/, and upon copy pasting the folder contents into newly formatted single partitioned Fat32 SD card, I find that only the green LED indicating power remained ON.

Kindly request your suggestions on booting up using your Alpine Linux image. Thanks in advance

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by pavel » Thu Jun 15, 2023 9:24 am

I do not see any problem. I think that your Red Pitaya board is booting well.

adiana007
Posts: 21
Joined: Mon Jun 05, 2023 11:44 am

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by adiana007 » Thu Jun 15, 2023 9:53 am

Dear Pavel,
I followed the commands later from your troubleshooting steps from the link http://pavel-demin.github.io/red-pitaya-notes/alpine/, and upon copy pasting the folder contents into newly formatted single partitioned Fat32 SD card, I find that only the green LED indicating power remained ON.
Using this approach, only the green LED stays ON, but other LEDs were off, thus, neither bitstream was uploaded successfully nor the heartbeat was blinking
I used an SD card that has the Latest Stable Image for StemLab provided by RedPitaya. I unmounted the partition /dev/sdc. Then I used Gparted to format the partition to fat32. Upon copy pasting the contents from .zip file provided by you and powering up the RedPitaya, I find only the Blue, Green LED being constant (The yellow LED comes up in the start for ~5 seconds, then goes off). Note that the SD card has 2 partitions, one that was formatted as Fat32 partition and other uses w95 Fat16 partition. I tried multiple combination of formatting the first partition also, but the behaviour remined unchanged.
Using this approach, from LED I see that bitstream was uploaded, but the heartbeat was still off, thus stopping me from accessing the system.

In the meantime, I'm currently trying to follow the procedure provided by you from project http://pavel-demin.github.io/red-pitaya ... d-blinker/ to make a bootable SD card (I'm using Ubuntu 22.04) as my host machine, debugging some issues with file extraction and some files not being found while using make command, but will get back to you with updates on the same). Thank you!

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by pavel » Thu Jun 15, 2023 10:16 am

Using this approach, only the green LED stays ON, but other LEDs were off, thus, neither bitstream was uploaded successfully nor the heartbeat was blinking
This is exactly how my SD card image behaves.

I feel like in all my comments in this thread, I am desperately trying to convince you that the functionality you have been expecting for some reason is not available:
  • you expect the simplest of my examples to work much faster than it normally does
  • you expect the SD card controller to have a much faster data rate (64 MB/s) than it does (25 MB/s)
  • you expect my SD card image to have functionality (bitstream programming, blinking LED) that it does not
Could you please adjust your expectations to make them more realistic? I think this will simplify your work on this project and the discussion in this thread.

adiana007
Posts: 21
Joined: Mon Jun 05, 2023 11:44 am

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by adiana007 » Thu Jun 15, 2023 5:02 pm

Hi Pavel,

Extremely sorry for my misunderstanding. I completely agree with the benchmark and the data rate calculations, because of which I was interested in the adc_test project and TCP streaming.
you expect the simplest of my examples to work much faster than it normally does
I was trying out the led_blinker project for test purpose only.

There was a misunderstanding from my side, as I was following on the LED pattern provided by the RedPitaya, but now I'm clear and also able to ssh and setup

I was also able to follow the procedure for generating the Vivado project and bitstream for adc_test project, additionally to test the capture functionality and benchmark the transfer, I added a binary counter into the PL design (instead of adc_data ports). I copied the files under https://github.com/pavel-demin/red-pita ... est/server into RedPitaya and tried compiling the C code using "make" first and then "gcc", but it seems like the packages weren't available (apt wasn't available too).

Can you provide me suggestions for running the adc_test project along with methodologies for running a custom c code. If the functionality isn't available with the current SD card image, request you to kindly help me on procedures for running the custom C code (as I had to modify and add some sections from PL and PS for my operation). Thanks in advance

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by pavel » Thu Jun 15, 2023 5:25 pm

tried compiling the C code using "make" first and then "gcc", but it seems like the packages weren't available (apt wasn't available too).
Here are the commands to install make and gcc:

Code: Select all

apk add make gcc
lbu commit -d

adiana007
Posts: 21
Joined: Mon Jun 05, 2023 11:44 am

Re: Accessing BRAM data from /dev/mem of RedPitaya

Post by adiana007 » Fri Jun 16, 2023 8:36 am

Hey Pavel,

Thanks for the command, I was able to successfully install make, but system hangs and crashes when I try with gcc (stops at 40%). I was figuring out debugging approaches for installing gcc for Alpine Linux, but still the issue persisted. When I tried using the command

Code: Select all

apk add build-base
the system again hangs at installation of

Code: Select all

Installing gcc (10.3.1_git20210424-r2)
I tried freeing up some cache using command

Code: Select all

sync; echo 1 > /proc/sys/vm/drop_caches
I found the installation crossed the gcc step but hung up and crashed at g++, so I tried freeing up cache using the same command and ran the command

Code: Select all

apk add gcc
Now the installation went uptil 86% and crashed. Request you to kindly help me out.
When I used the command

Code: Select all

free -m
the total memory shows up as 495 and free memory shows up as 414 after freeing up the cache.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 110 guests