-
Notifications
You must be signed in to change notification settings - Fork 408
Override edge attributes in RR graph #2930
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
base: master
Are you sure you want to change the base?
Conversation
…and pass the correct argument to load_rr_file
@petergrossmann21 I'd apprecite any feedback on this |
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.
Overall, this looks good to me. I’ve added several small comments, mainly related to adding comments. :)
One more thing—I think it would be good to add a test for this PR. As we discussed, testing this requires additional functionality beyond what the current infrastructure provides. I suggest creating an issue to track it, and we can implement it in a separate PR.
VTR_LOG_ERROR("Failed to open the RR edge override file: %s\n", filename.data()); | ||
} | ||
|
||
std::unordered_map<t_rr_switch_inf, RRSwitchId, t_rr_switch_inf_hash, t_rr_switch_inf_equal> unique_switch_info; |
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.
I also needed to do something similar when creating edges while collapsing RR Node chains in the flat router. If you could create an issue to remind me to implement a function for this, that would be helpful.
RRSwitchId new_switch_id; | ||
auto it = unique_switch_info.find(switch_override_info); | ||
if (it == unique_switch_info.end()) { | ||
new_switch_id = rr_graph_builder.add_rr_switch(switch_override_info); |
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.
Now that I think about it, I'm pretty sure I wrote a function that retrieves switch info, searches the RR Node switches for one with similar characteristics, and, if none is found, creates a new one and returns the corresponding RR switch ID (I think the name was something like get_or_create_rr_switch_id). In the issue I mentioned, if you could reference this function, I'll update this part of the code myself.
@soheilshahrouz Some initial thoughts:
I think the file size analysis above is sufficient to motivate implementing some method of shorthand in the file format so that the architect can express when multiple edges have the same delay parameter. My first instinct is that some kind of relationship between the physical tile definitions and the graph edges can help with this. Currently, the way that I do that is by relating switches in the An aside: Note that in automatic place and route flows for ASICs, the R and C values are either not generated at all (because the wire delay is lumped with the "intrinsic" delay of the logic gates and so the VPR model will set all the RC values to 0) OR the intrinsic delay is captured independently of the RC values and thus it's convenient to annotate them separately anyway. |
@soheilshahrouz one additional thought: if the delay annotation is to be performed as a standalone step, having a dedicated executable utility to run it will be helpful--this will avoid having to call vpr for this step and having to pass in an arbitrary blif file. |
… given src/sink nodes
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.
LGTM, thanks!
I'd like to beef up the error-handling on the file input though. Try to make sure any invalid file you can detect gives an error message.
Also, you should update the documentation.
- File format (give the format, but also the motivation / use cases)
- Command line option
Adds a new command line option to override attributes of specific edges in the RR graph.
Description
The user can pass a text file using --read_rr_edge_override, which modifies the delay of selected edges. The expected file format:
The first line must start with
#
and is always ignored by the parser.Each following line must include an RR edge ID and delay (Tdel). Other attributes (resistance, capacitances) are optional. Edges can also be specified using source/sink node pairs.
How Has This Been Tested?
By manual inspection of generated RR graph files to see if the edge attributes are overridden correctly.
Types of changes
Checklist: