# Problem to upload the .bit file

**URL:** <https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001>\
**Category:** Support\
**Created:** [December 7, 2022, 5:44pm UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001 "2022-12-07T17:44:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![symbole](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@symbole](https://discuss.pynq.io/u/symbole)\
**Post date:** [December 7, 2022, 5:44pm UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001/1 "2022-12-07T17:44:33Z")

</div>

Hi everyone,

I am using the PYNQ Z2.  
I created a folder in this folder I put 3 files :  
design\_2.bit  
design\_2.hwh  
design\_2.tcl

I created a python fil and coded :

**from pynq import Overlay**  
**overlay=Overlay(‘/home/xilinx/jupyter\_notebooks/Radar\_Project/design\_2.bit’)**

I have this error :

CacheMetadataError Traceback (most recent call last)  
File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/embedded\_device.py:252, in BitstreamHandler.get\_parser(self, partial)  
251 try:  
 → 252 parser = self.\_get\_cache()  
253 except CacheMetadataError:

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/embedded\_device.py:228, in BitstreamHandler.\_get\_cache(self)  
227 else:  
 → 228 raise CacheMetadataError(f"No cached metadata present")

CacheMetadataError: No cached metadata present

During handling of the above exception, another exception occurred:

IndexError Traceback (most recent call last)  
Input In [1], in \<cell line: 2\>()  
1 from pynq import Overlay  
----\> 2 overlay=Overlay(‘/home/xilinx/jupyter\_notebooks/Radar\_Project/design\_2.bit’)

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py:319, in Overlay. **init** (self, bitfile\_name, dtbo, download, ignore\_version, device, gen\_cache)  
315 super(). **init** (bitfile\_name, dtbo, partial=False, device=device)  
317 self.\_register\_drivers()  
 → 319 self.device.set\_bitfile\_name(self.bitfile\_name)  
320 self.parser = self.device.parser  
322 self.ip\_dict = (  
323 self.gpio\_dict  
324 ) = (  
325 self.interrupt\_controllers  
326 ) = self.interrupt\_pins = self.hierarchy\_dict = dict()

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/device.py:118, in Device.set\_bitfile\_name(self, bitfile\_name)  
116 def set\_bitfile\_name(self, bitfile\_name: str) → None:  
117 self.bitfile\_name = bitfile\_name  
 → 118 self.parser = self.get\_bitfile\_metadata(self.bitfile\_name)  
119 self.mem\_dict = self.parser.mem\_dict  
120 self.ip\_dict = self.parser.ip\_dict

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/embedded\_device.py:690, in EmbeddedDevice.get\_bitfile\_metadata(self, bitfile\_name, partial)  
689 def get\_bitfile\_metadata(self, bitfile\_name:str, partial:bool=False):  
 → 690 parser = \_get\_bitstream\_handler(bitfile\_name).get\_parser(partial=partial)  
691 if parser is None:  
692 raise RuntimeError(“Unable to find metadata for bitstream”)

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/embedded\_device.py:254, in BitstreamHandler.get\_parser(self, partial)  
252 parser = self.\_get\_cache()  
253 except CacheMetadataError:  
 → 254 parser = RuntimeMetadataParser(Metadata(input=self.\_filepath.with\_suffix(“.hwh”)))  
255 except:  
256 raise RuntimeError(f"Unable to parse metadata")

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/metadata/runtime\_metadata\_parser.py:52, in RuntimeMetadataParser. **init** (self, md)  
50 self.dtbo\_data = None  
51 self.systemgraph = self.md  
—\> 52 self.ps\_name = list(md.get\_processing\_systems().keys())[0]  
53 self.ps = md.get\_processing\_systems()[self.ps\_name]  
54 self.family\_ps = self.ps.ps\_name

IndexError: list index out of range

I followed the documentation, some tutorials… I don’t understand.

Thanks for your help guys !  
Regards

---

<div class="post-metadata">

**Author:** ![stf](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/stf/32/2724_2.png) [@stf](https://discuss.pynq.io/u/stf)\
**Post date:** [December 7, 2022, 6:53pm UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001/2 "2022-12-07T18:53:44Z")

</div>

Hi @symbole,

Welcome to the community!

Could you share your design\_2.hwh file so I can take a look? It looks like it’s struggling to find the processing system in your design.

All the best,  
Shane

---

<div class="post-metadata">

**Author:** ![symbole](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@symbole](https://discuss.pynq.io/u/symbole)\
**Post date:** [December 7, 2022, 7:44pm UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001/3 "2022-12-07T19:44:15Z")

</div>

Hi stf,  
Thanks a lot for your reply !

[design\_2.hwh](https://discuss.pynq.io/uploads/short-url/ktpXBUMK7aaGOLgbTVhgLzoQuOc.hwh) (84.8 KB)

Regards

---

<div class="post-metadata">

**Author:** ![stf](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/stf/32/2724_2.png) [@stf](https://discuss.pynq.io/u/stf)\
**Post date:** [December 7, 2022, 8:14pm UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001/4 "2022-12-07T20:14:18Z")

</div>

No problem at all @symbole 🙂

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

Looking at the modules in your HWH file it looks like you’re missing the Zynq Processing system IP block, which explains why Pynq couldn’t find it.

When building your block diagram in Vivado you need to make sure that you add a Zynq 7000 processing system IP to the block design.

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

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

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

Make sure to run “Run Block Automation” once you’ve added the processing system to you block diagram.

If you want to be able to access the AXI registers of various IP from within PYNQ you’ll need to connect them up to the processing system in Vivado.

All the best,  
Shane

---

<div class="post-metadata">

**Author:** ![symbole](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@symbole](https://discuss.pynq.io/u/symbole)\
**Post date:** [December 7, 2022, 8:42pm UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001/5 "2022-12-07T20:42:42Z")

</div>

Wow ! Thanks a lot. It was a question that I asked to myself few days ago. Because when I simulate the system in the “Open hardware Manager” it works. But when I export the design and the bitstream it doesn’t work on jupyter.

When I will add the ZYNQ processor IP and I will click on the “Run Block Automation” the wired between the processor and the hdmi diagram will be automatic ?

Thanks a lot,  
Lucas

---

<div class="post-metadata">

**Author:** ![stf](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/stf/32/2724_2.png) [@stf](https://discuss.pynq.io/u/stf)\
**Post date:** [December 8, 2022, 9:11am UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001/6 "2022-12-08T09:11:03Z")

</div>

Ah great, glad to hear that explained the issue.

No, unfortunately, connecting up the rest of the system to the processing system wont be done in the block automation. The block automation looks for presets for the board you’ve specified, such as DDR width/speed etc, and applies that to the processing system block.

There is another wizard that you could try the “Run Connection Automation” which can be used to connect up bus interfaces in block design. [More details here](https://docs.xilinx.com/r/2020.2-English/ug995-vivado-ip-subsystems-tutorial/Step-5-Running-Connection-Automation)

All the best,  
Shane

---

<div class="post-metadata">

**Author:** ![symbole](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@symbole](https://discuss.pynq.io/u/symbole)\
**Post date:** [February 27, 2023, 3:40pm UTC](https://discuss.pynq.io/t/problem-to-upload-the-bit-file/5001/7 "2023-02-27T15:40:09Z")

</div>

Hi @stf ,

Thanks for your last answer.

I did what you said. My model does include zynq now. I don’t have any errors in my modele in Vivado and I exported the bitstream.

As you can see on the pictures below I followed the documentation.  
I have new errors “Could not find IP or hierarchy video in overlay”. I searched on many websites but can’t find the source of the problem.

Can you help me ?

Thanks a lot,  
Regards

 ![328876619_1839617786393941_1734596190652147865_n](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/3/3b9fab93ce1866264f713e8bc9cab736b54966fe.png)  
 ![333118491_735770384822134_2951579335770864508_n](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/2/229478b1717c498af45e4176998eb877325f24af.png)  
 ![333981075_3298333773830509_8749902598130171190_n](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/8/8976c8544320d68d08ed1a211ad8ae1aefe635f9.png)  
 ![334021253_873766383813178_8054813874450948089_n](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/d/db6d9e959143cdb9dfbb3c613a3fb6c518208adc.png)
