-
Notifications
You must be signed in to change notification settings - Fork 113
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
Fixed file naming issues when having multiple instances of an IP #58
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5947ed8
Fixed file naming issues when having multiple instances of an IP
ElaHobby 5e22d8b
Merge branch 'master' of https://github.com/Xilinx/RapidWright into Ela
ElaHobby 9d9f4f5
Added support for 7 series RAMB and some Zynq dev
ElaHobby 1bbb5f0
Added possibility to create partial.dcp for unfeasible placement
ElaHobby 765cf5b
Limited Simulated Annealing runtime
ElaHobby 7ad712d
Inserted pull request comments
ElaHobby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,9 @@ proc compile_block_dcp { dcpFile } { | |
puts "RAPIDWRIGHT_PATH=$rwpath" | ||
puts "CLASSPATH=$cpath" | ||
exec java com.xilinx.rapidwright.util.Unzip ${dcpFile} ${unzipDir} | ||
read_xdc ${unzipDir}/${rootDcpFileName}_in_context.xdc | ||
# Avoid naming problems caused by the fact that the files copied into IP_CACHE have different names as the ones expected by RW. Error appears only in designs with multiple IPs with the same ID | ||
set file_name_xdc [glob -directory ${unzipDir} *_in_context.xdc] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like it should work. I'm ok with this change, you can delete the old line as it stays in the history of git. |
||
read_xdc $file_name_xdc | ||
file delete -force ${unzipDir} | ||
# END Work around | ||
|
||
|
@@ -394,6 +396,10 @@ proc prep_for_block_stitcher {} { | |
puts "WILL RUN: $ip_run $name $ip $id $ip_cell" | ||
} | ||
} elseif { [needs_impl_run $cachePath $ip] && ![info exists uniqueImplIPs($id)] } { | ||
# Goal: avoid errors caused by IP names (in case of multiple IPs, files copied into the IP_CACHE might have different names as RW expects. Possible explanation = RW reads IPs in this loop in a different order as it copies the .dcps already generated by vivado ) | ||
if {[get_uniq_ip_name $cachePath $ip]!="none"} { | ||
set ip [get_uniq_ip_name $cachePath $ip] | ||
} | ||
puts "OPT RUN: $ip" | ||
lappend opt_runs_needed $ip | ||
set uniqueImplIPs($id) $ip | ||
|
@@ -662,3 +668,24 @@ proc offset_dsps { count } { | |
puts "Moving $c from $s to $new_site" | ||
} | ||
} | ||
|
||
|
||
# Get name of ip based on the name of the files copied into the directory with the corresponding ID. Useful for designs using multiple IPs, in order to avoid naming errors after copying files into the IP_CACHE | ||
proc get_uniq_ip_name {cachePath ip} { | ||
set cache_id [config_ip_cache -get_id $ip] | ||
set cacheIPDir "${cachePath}[cache_version_dir]/$cache_id" | ||
if { ! [file exists $cacheIPDir] } { | ||
puts "ERROR! No IP in this folder" | ||
return "none" | ||
} | ||
set existingIP [lindex [get_lines_matching instanceName ${cacheIPDir}/${cache_id}.xci] 0] | ||
set existingIP [string map {"<spirit:instanceName>" ""} $existingIP] | ||
set existingIP [string map {"</spirit:instanceName>" ""} $existingIP] | ||
set existingIP [string trim $existingIP] | ||
set ip_return [get_ips $existingIP] | ||
if {$ip_return!={}} { | ||
return $ip_return | ||
} else { | ||
return $ip | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this change looks good. I will follow up later with a better check for BRAMs.