-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException during stitching #1124
Comments
Unfortunately, the It looks like there are issues with handling the logical netlist, of which we have had many substantial changes and improvements in recent years so there might just need some corresponding updates in |
First of all, thanks for your reply! I used the latest master version with the latest release. I was curious to see what changed in the past year in the PBlock generator & stitcher. I looked over the pre-implemented flow documentation and I saw the flow was still through the rapid_compile_ipi script. That's why I assumed this is still the current way to go for running the flow with pre-implemented modules. Sadly, due to confidentiality issue I can not share my current design. But I'll do a simpler one and re-run the flow to reproduce the issue. |
BlockStitcher was not maintained in latest versions: is there an alternative flow for rapid prototyping with pre-implemented blocks we should use? Or is it just that this part of RW was not maintained in newer versions? I think I have locally a working version from 2021 and then I would use it if it's the later case 😊 |
The problem we had was less around the Since the Perhaps if you can share additional details about what you are trying to do, we might be able to help in another way? |
Thanks for the infos. Indeed, I previously saw the DynaRapid paper (interesting work!) The project I am using is very large & I'm not sure I am allowed to put it on git. But I created another dummy project which leads to the same errors (not a smart application scenario, but just to replicate the issue): Vivado version used: 2024.2 How I run it:
But slowly, it smells like Christmas & I don't want to bother you with such issues, so whenever you have the time after your Holidays, I'd appreciate your help! |
Thank you for the example. Unfortunately, after spending a considerable amount of time, I was not able to update the flow to reproduce the issues you were seeing. There have been several changes over the many Vivado releases since we originally built this flow and there are a number of issues that need to be addressed. With time, I think we could get the flow to work again, but its utility would be limited to a very niche subset of use cases. Most of the problem is trying to synchronize the Vivado and RapidWright interfacing steps. Are you able to provide all the inputs to the BlockStitcher for this example? Perhaps I can debug just the Java portion? |
Tools version
How to reproduce it easier Java portion with issue:
Error:
I suppose 537 & 539 should be deleted, but then I get another error, at the same java code line. It looks like flow does not support block designs with two instances of the same Vivado IP, where the IP parameters differ. But if deleting those 2 lines is the correct way to go, then at least EDIFNetlist is not close source, so I can debug it on my side from here.
|
I am using the same version of Vivado and RapidWright that you have mentioned. However, my environment might still be different. Could you try reproducing the issue in a separate environment from your own? For example, what are the exact steps needed from a clean checkout of RapidWright and a download of git clone https://github.com/Xilinx/RapidWright.git
cd RapidWright
git checkout f803bdc8749c085c95ad939309119e04bd37152b
# Any other changes to the RapidWright code base?
./gradlew compileJava
export PATH=`pwd`/bin:$PATH
export CLASSPATH=`pwd`/bin:`pwd`/jars/*
mkdir debugRW
cd debugRW
wget https://github.com/ElaHobby/debugRW/raw/refs/heads/main/RW.zip
unzip RW.zip
wget https://github.com/ElaHobby/debugRW/raw/refs/heads/main/IPCache.zip
unzip IPCache.zip
cd ..
# What other commands, environment settings, etc?
java com.xilinx.rapidwright.ipi.BlockStitcher # <what are the parameters being used?> Are you able to identify the parameters that are being passed to the |
For example, what are the exact steps needed from a clean checkout of RapidWright? Any other changes to the RapidWright code base? What other commands, environment settings, etc?
Are you able to identify the parameters that are being passed to the BlockStitcher? Where does your flow stop? If it still doesn't run with the info above, don't invest more time in it. I think removing the code lines 537 & 539 should do the trick and then I'll debug the |
I believe I faced the second exception some time ago and managed to work around it. My local fork of RapidWright is quite far removed from upstream (I refactored I think at some point upstream's My changes should more or less boil down to changing this area: RapidWright/src/com/xilinx/rapidwright/ipi/BlockStitcher.java Lines 571 to 581 in 6d7db5c
Move the call Set<String> uniqifiedNetlists = new HashSet<>();
for (Entry<ModuleInst,EDIFNetlist> e : miMap.entrySet()) {
//System.out.println(" MAPPINGS: " + e.getKey() + " " + e.getValue() + " " + stitcher.instNameToInst.get(e.getKey().getName()) );
if (uniqifiedNetlists.contains(e.getValue().getName())) continue;
uniqifiedNetlists.add(e.getValue().getName());
stitched.repopulateNetlistOfModuleInst(e.getKey(), e.getValue());
}
stitcher.stitchDesign(stitched, constraints); Hope this helps. |
Thanks @jakobwenzel for your input. I attempted to make this change, unfortunately, I did not see any meaningful improvement in the output. I have a set of changes that appear to resolve the NPE and allow a DCP to be loaded in Vivado. Here are the set of steps in order to run the test case with the fix (in Linux): git clone https://github.com/Xilinx/RapidWright.git --branch block_stitcher
cd RapidWright
./gradlew compileJava
export PATH=`pwd`/bin:$PATH
export CLASSPATH=`pwd`/bin:`pwd`/jars/*
mkdir debugRW
cd debugRW
wget https://github.com/ElaHobby/debugRW/raw/refs/heads/main/RW.zip
unzip RW.zip
wget https://github.com/ElaHobby/debugRW/raw/refs/heads/main/IPCache.zip
unzip IPCache.zip
cd ..
java com.xilinx.rapidwright.ipi.BlockStitcher debugRW debugRW/Debug/design_1.edf debugRW/Debug/design_1_ips.txt
vivado -source debugRW/Debug/design_1_placed_load.tcl Note that the design contains encrypted cells and thus we need to use a Tcl script to correctly reload the design into Vivado (unfortunately, the |
Thanks, @jakobwenzel and @clavin-xlnx ! Yuhuuu, this fixes the issue also on my side. Thanks a lot!! It's a great Christmas present, 'cause I wanted to use the flow with pre-implemented blocks also for my next project. From my side we can close the issue. |
Hi,
I have an issue in the BlockStitcher and would appreciate your help. I am running rapid_compile_ipi, I generated all routed.dcp files based on the PBlock and the flow stops in the BlockStitcher as described below.
The line which throws error (in rapidwright.ipi.BlockStitcher):
It starts going through modules (loop for (Entry<String,String> e : ipNames.entrySet()) ) but stops at the first one and throws:
The problem is: Device class is closed source, so I can not debug it to figure out what is wrong. Seems like netlist is empty? But isn't this expected due to code line before :" stitched.setNetlist(null); "? If I comment that line, it goes through a few modules without complaining (compared to above where it stops at the first one), but then it throws another error at another module later on...
Because the code is closed source, it's difficult to debug it & to be able to say what is wrong here. I am a bit stuck and would appreciate a hint.
The text was updated successfully, but these errors were encountered: