# MMIO crashes kernel

**URL:** <https://discuss.pynq.io/t/mmio-crashes-kernel/5844>\
**Category:** Support\
**Created:** [July 17, 2023, 9:20pm UTC](https://discuss.pynq.io/t/mmio-crashes-kernel/5844 "2023-07-17T21:20:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ak123](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@ak123](https://discuss.pynq.io/u/ak123)\
**Post date:** [July 17, 2023, 9:20pm UTC](https://discuss.pynq.io/t/mmio-crashes-kernel/5844/1 "2023-07-17T21:20:09Z")

</div>

Hi, I’m using an RFSoC 4x2 board. I’m trying to write to two registers in an IP designed in Verilog. Through Vivado’s address editor, I can see that the start address is 0x9000\_0000, and the respective register address offsets are 0x04 and 0x08. Ideally, I should be able to use code similar to this to view the contents in that memory location:

```auto
IP_BASE_ADDRESS = 0x9000_0000
ADDRESS_RANGE = 0x12
ADDRESS_OFFSET = 0x04

mmio = MMIO(IP_BASE_ADDRESS, ADDRESS_RANGE)

# data = 0
# mmio.write(ADDRESS_OFFSET, data)
result = mmio.read(ADDRESS_OFFSET)
print(result)

```

However, this immediately crashes the Jupyter notebook kernel. Anyone have any ideas as to why? 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:** [July 18, 2023, 8:08am UTC](https://discuss.pynq.io/t/mmio-crashes-kernel/5844/2 "2023-07-18T08:08:21Z")

</div>

Dear @ak123,

Can you please share an image of the block design?  
Does the IP show in the `ip_dict`?

Have you verified that your IP handles read/write as specified by the standard?

It looks like the IP is not responding, hence triggering a timeout. Or, you are trying to access a range of memory that is out of bounds for the PS.

Mario

---

<div class="post-metadata">

**Author:** ![ak123](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@ak123](https://discuss.pynq.io/u/ak123)\
**Post date:** [July 18, 2023, 1:24pm UTC](https://discuss.pynq.io/t/mmio-crashes-kernel/5844/3 "2023-07-18T13:24:52Z")

</div>

Yes, the IP shows up in ip\_dict with physical address 0x90000000.

How do I verify that the IP handles read/write as by the standard? I am attempting to use the AXI interface to do read/write operations.

I do not think that I am trying to access an out of bounds memory range, as I can view memory contents at higher addresses.

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

---

<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:** [July 18, 2023, 1:45pm UTC](https://discuss.pynq.io/t/mmio-crashes-kernel/5844/4 "2023-07-18T13:45:29Z")

</div>

Is there any Xilinx IP that is connected to the same interconnect? Can you read/write from that one?

Can you please share an image of the full block design?

> [@ak123](#):
>
> How do I verify that the IP handles read/write as by the standard? I am attempting to use the AXI interface to do read/write operations.

Through simulation or formal verification, this part is outside of the scope of this forum.

Mario

---

<div class="post-metadata">

**Author:** ![ak123](https://avatars.discourse-cdn.com/v4/letter/a/ee59a6/32.png) [@ak123](https://discuss.pynq.io/u/ak123)\
**Post date:** [July 19, 2023, 6:51pm UTC](https://discuss.pynq.io/t/mmio-crashes-kernel/5844/5 "2023-07-19T18:51:03Z")

</div>

Hi, I fixed the issue. There was an address mismatch.
