# Read 32bit\*1024 Data of BRAM on the PYNQ Linux

**URL:** <https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563>\
**Category:** Support\
**Created:** [January 19, 2022, 2:31am UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563 "2022-01-19T02:31:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![atopet](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@atopet](https://discuss.pynq.io/u/atopet)\
**Post date:** [January 19, 2022, 2:31am UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563/1 "2022-01-19T02:31:39Z")

</div>

I created an BRAM IP and want to read the data stored after my inference via RPC on the pynq Linux.

Can anyone help with a guide, tutorial and methods for reading data either directly or saving to .txt on my Ultrascale board having the pynq image.

Thanks

---

<div class="post-metadata">

**Author:** ![cathalmccabe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cathalmccabe/32/3348_2.png) [@cathalmccabe](https://discuss.pynq.io/u/cathalmccabe)\
**Post date:** [January 19, 2022, 9:25am UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563/2 "2022-01-19T09:25:24Z")

</div>

You can use MMIO to read a AXI BRAM connected to the ARM processor.

Notebook example:  
[Using MMIO with PYNQ](https://github.com/Xilinx/PYNQ_Workshop/blob/master/Session_4/3_mmio.ipynb)  
Video example:  
[Using PYNQ MMIO (Memory Mapped IO)](https://youtu.be/zbumITJQ2Z8)

Cathal

---

<div class="post-metadata">

**Author:** ![atopet](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@atopet](https://discuss.pynq.io/u/atopet)\
**Post date:** [January 20, 2022, 5:13pm UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563/3 "2022-01-20T17:13:22Z")

</div>

Hello Cathal,

Thank you for your reply.

I am actually reading data from save to my BRAM immediately after an inference via rpc. I have looked at the overlay approach and it does not seems to be an appropriate means to read as it picks the bitstream defaults.

Is there any other method that I can read the data stored on my BRAM immediately after an inference via rpc?

Thank you

---

<div class="post-metadata">

**Author:** ![atopet](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@atopet](https://discuss.pynq.io/u/atopet)\
**Post date:** [January 26, 2022, 6:12pm UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563/4 "2022-01-26T18:12:21Z")

</div>

Hi there,

I am still searching for a solution to read BRAM data on linux from my PYNQ FPGA immediately after running inference, probably at an interrupt , can someone please assist with information.

Thanks

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [January 28, 2022, 1:21pm UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563/5 "2022-01-28T13:21:20Z")

</div>

@atopet

Bringing the discussion back to this thread. I suggested you tried this

> [@Accessing an overlay from multiple python interpreters](https://discuss.pynq.io/t/accessing-an-overlay-from-multiple-python-interpreters/3438/2):
>
> Hi, What pynq version are you using? In 2.7 I was able to do this using this piece of code import pynq ol = pynq.Overlay(\<your\_overlay\>.bit, download=False) pynq.Device.active\_device.reset(ol.parser, ol.timestamp, ol.bitfile\_name) Mario

And you said it is not working. I have to differ:

I created a very simple example:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/e/e1bcb449ef3c4797ef3b2f70776d0d05d50c86e7.png)

And then I ran two notebooks, in one I downloaded the bistream and wrote some data to the BRAM, In the another, I just used the download false argument and read the content back.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/b/b552da3df1e844266c29851e2f82415f284acc1e.png)

As you can see the read results are correct.

Can you please try to write a known value to memory and then try to read back?

Mario

---

<div class="post-metadata">

**Author:** ![atopet](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@atopet](https://discuss.pynq.io/u/atopet)\
**Post date:** [June 24, 2022, 12:57pm UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563/7 "2022-06-24T12:57:02Z")

</div>

Hi Mario,

You are right, I think nothing was written to the BRAM and hence I didn’t get any readings, I am still looking deeper into this.

Thanks a lot for taking out time to review this.

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [June 24, 2022, 1:00pm UTC](https://discuss.pynq.io/t/read-32bit-1024-data-of-bram-on-the-pynq-linux/3563/8 "2022-06-24T13:00:57Z")

</div>

Closed on June 24, 2022, 1:00pm UTC


