SEM IP on zcu104 board with pynq image ICAP OK is not displayed at terminal

Dear all,

I am using sem ip for my ultrascale plus board ZCU104 with pynq 2.6.0 imag running in it.

I have ported the design from application note fo sem ip for zcu102

initially i tried bare-metal application on zcu104 similiar to zcu102 example and this is functioning fine.



SC 01

FS 04

AF 01




SC 02


here is my design attached.

But afterwards, i have loaded the sem ip bitstream using overlay on zcu104 board. I have initialized the bufgce enabled and cap gnt enabled. I cannot see the ICAP OK Message.



SC 01

FS 04

AF 01


KIndly suggest me.

Kind Regards,


Hi Harish,

I’ve never used the UART SEM interface, but I have used the AXI one in the past. Could it be something like the UART buffers are not being flushed in the second case, so you are not seeing the full status being printed? Does the UART interface accept commands? Have you tried sending commands to it?

One thing you could try is building an image with the AXI interface to see if it is working correctly. I know that there is a “TMR Soft Error Mitigation Interface” IP where you can choose either an AXI or a UART interface to the SEM core. So you could perhaps use that selecting the AXI interface and using the MMIO class to interact with the registers to control the SEM IP.

Hope that helps a little,

Not sure this could help just forward the links here:
Hardware and Software Setup

Even this is on PYNQ the base of any design are still FPGA HDL.
So this reference should not be a huge different.

Dear @briansune ,

Thanks for the info.I have checked the same as you mentioned and found the error more than 2%. In order to reduce the error, i have used 125 MHz and V_Enable 68 . Still there no further improvement to the output and its the same.

Kind Regards,

Dear @stf ,

I have one more design which used AXI uart connected to GP ports of PS. I have tried the same and found only printing the following:
Init Report:

SC 01
FS 04
AF 01

and jupyter kernel is struct here.

Also one more information i need is :
I tried to access the Pcap cntrl register and checked the value and its already cleared. I am confused here because in baremetal application, I accessed and found 1 and then I cleared to 0. But in case Pynq, after overlay has been loaded and access the register and checked its already 0.
kindly suggest me.

code to access reg :

dev_ctrl = allocate(shape=(1,), dtype=‘u4’)
registers.Register(BASE_ADDRESS, buffer=dev_ctrl)
print(“the value of PCAP_PR is :”,dev_ctrl[0])

kindly let me know any suggestions.

Kind Regards,

Hi Harish,

I’m not entirely sure you are reading the register when using the allocated buffer. For me, when I try and use the Register class to access the PCAP_CTRL register in the CSU directly the kernel hangs.

reg = Register(BASE_ADDRESS)

I created a simple C version to try and see if I could spot anything.

int main() {
        uint32_t* pcap_pr = get_vaddr(0xFFCA3008);
        uint32_t value = *pcap_pr & 0x00000001;
        fprintf(stdout, "pcap_pr=%u\n", value);
        return 0;

This basically does the same as above, it grabs a virtual address for the PCAP_CTRL reg with get_vaddr() (just a simple userspace driver using /dev/mmap), and then it tries to dereference the register and read off the value.

When I run this instead of the kernel hanging I get:


It looks like we don’t have access. What is probably the issue here is that in baremetal you have the highest privileges over the entire system. But under Linux you don’t.

There are supposed to be some methods to access these registers using /sys/firmware/zynqmp/config_reg. see here
However, when I tried this I did not have much luck either:

However, It looks like it is the same permissions issue.

To solve the permissions issue it appears that you need to change some parameters in the PMU firmware. In particular I think the SECURE_ACCESS_VAL flag in xpfw_config.h needs to be changed from 0 to 1. To change this requires a petalinux recipe to batch and to rebuild the .elf for the PMU firmware in the boot files, there is a bit more info in this forum post here. Unfortunately, I’m not very familiar with this flow so I can’t really guide you any further. However, you might have more luck asking on the embedded linux Xilinx forums.

Hope this helps,

Dear Shane,

Thanks for the inputs , It was really helpful for me. I have more clarity on the issue now. But before I can proceed further to generate the pynq image on my own for ZCU104. I would kindly request you guide me with a standard procedure to generate the same. In online, I have found different procedures but they do not work of Ultrascale plus devices, as these procedures are made for Pynq z2 boards.

It would be really helpful for me, If you can provide me the standard procedure and roofs file for generating 2.6 image.

Thanking you,

Kind Regards,
K Harish

Hi Harish,

No problem at all.

Shawn does a great job of discussing a 2.6 build here that might be helpful for you. We already ship the 104, so instead of BOARDDIR, you’d just need BOARDS=ZCU104. We’d encourage you to switch to 2.7 if possible, but I remember you saying before that you had a dependency on 2.6.

Hope this helps a bit.

All the best,

Dear Shane,

Thanks for your inputs. I was able to successfully generate an petalinux image and access the register via root mode. Now i have used the same boot images BOOT.BIN, image.ub and boot.scr and replaced in the image pynq 2.6 and i found that the image boots up but i am getting following error message

xilinx@pynq:~$ sudo echo 0xffca3008 > /sys/firmware/zynqmp/config_reg
-bash: /sys/firmware/zynqmp/config_reg: Permission denied

Kindly suggest me with your inputs

Kind regards
K Harish