linien-org / linien

Spectroscopy lock application using RedPitaya
GNU General Public License v3.0
74 stars 19 forks source link

Error building FPGA image #384

Closed Patschke closed 7 months ago

Patschke commented 8 months ago

Thank you for reporting a bug!

Everyone loves complaining about bugs, so that's easy to do

In order to be able to resolve your issue as fast as possible, please provide us with the version of Linien you are using.

I try to build the latest version. The development wiki article instructed me to checkout the develop branch, so that's what I did. I'm on commit 92e15403a4a0f6434df07b0891926062e86a4b74

In the case that you are having trouble with connecting to the linien-server running on the RedPitaya, please try the following first and include any errors and the console output in your bug report:

Nah, I'm fine with that. I know how to setup my lab router to be able to ping my RedPitaya. Though (unrelated with this issue), the advertised option to run a local server (linien-server --remote-rp=root:password@rp-f0xxxx.local) does not seem to be up to date with the latest versions. Not sure if the current linien-server start does accept any additional arguments that are passed down the line. But anyway, that's not my point here.

First check whether you can ping it by executing

ping rp-f0xxxx.local

in a command line. If this works, check whether you can connect via SSH:

ssh rp-f0xxxx.local

on the command line. If this is successful, in order to to check whether the linien-server is running, first confirm that there is a running screen session with the name linien-server by executing screen -ls. If that is the case attach it by running screen -r linien-server. If any errors occurred on the server side, they will be displayed here. Please provide the output in your bug report.

So, what do I want to complain about: For me, building the FPGA image fails. I believe that I installed all required dependencies, but at the end it doesn't work out.

[develop][~/git/linien]$ bash gateware/build_fpga_image.sh
****** Vivado v2023.2 (64-bit)
  **** SW Build 4029153 on Fri Oct 13 20:13:54 MDT 2023
  **** IP Build 4028589 on Sat Oct 14 00:45:43 MDT 2023
  **** SharedData Build 4025554 on Tue Oct 10 17:18:54 MDT 2023
    ** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
    ** Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.

[...]

ERROR: [Place 30-487] The packing of instances into the device could not be obeyed. There are a total of 4400 slices in the device, of which 1954 slices are available, however, the unplaced instances require 2549 slices. Please analyze your design to determine if the number of LUTs, FFs, and/or control sets can be reduced.

Number of control sets and instances constrained to the design
    Control sets: 2854
    Luts: 16613 (combined) 18324 (total), available capacity: 17600 
    Flip flops: 13210, available capacity: 35200
    NOTE: each slice can only accommodate 1 unique control set so FFs cannot be packed to fully fill every slice

ERROR: [Place 30-99] Placer failed with error: 'Detail Placement failed please check previous errors for details.'
Please review all ERROR, CRITICAL WARNING, and WARNING messages during placement to understand the cause for failure.
Ending Placer Task | Checksum: 6d0d3a31

Time (s): cpu = 00:01:02 ; elapsed = 00:00:23 . Memory (MB): peak = 3275.316 ; gain = 0.000 ; free physical = 607 ; free virtual = 4718
ERROR: [Common 17-69] Command failed: Placer could not place all instances
63 Infos, 0 Warnings, 0 Critical Warnings and 3 Errors encountered.
place_design failed
INFO: [Common 17-206] Exiting Vivado at Thu Mar  7 10:48:43 2024...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/patrick/git/linien/gateware/fpga_image_helper.py", line 74, in <module>
    platform.build(root, build_name="top", build_dir=build_dir)
  File "/usr/lib/python3.11/site-packages/migen/build/xilinx/platform.py", line 43, in build
    return self.toolchain.build(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/migen/build/xilinx/vivado.py", line 211, in build
    _run_vivado(build_name)
  File "/usr/lib/python3.11/site-packages/migen/build/xilinx/vivado.py", line 69, in _run_vivado
    raise OSError("Subprocess failed")
OSError: Subprocess failed

full output (2479 lines)

Not sure what additional information is helpful here. I guess I'm just missing some steps? My system is running arch linux 6.7.8-arch1-1, Python 3.11.7 and vivado 2023.2.

Patschke commented 8 months ago

If I downgrade Vivado to version 2020.1, I am able to build the image, so I guess there are some breaking changes in more recent Vivado versions. Perhaps one could add a note to the Development page that 2020.1 is the required version?

bleykauf commented 7 months ago

@Patschke: We have never tested with any Vivado version other than 2020.2. I have added this info in https://github.com/linien-org/linien/wiki/Development.