-
Notifications
You must be signed in to change notification settings - Fork 415
FPGA Interchange: add constant synthetic tiles #1958
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
FPGA Interchange: add constant synthetic tiles #1958
Conversation
There probably needs to be a way to describe a constant generator in the older architecture XML format too? |
44b094d
to
1405735
Compare
@@ -2103,6 +2252,16 @@ struct ArchReader { | |||
grid_def.loc_defs.emplace_back(std::move(single)); | |||
} | |||
|
|||
// The constant source tile will be placed at (0, 0) |
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.
How are we sure that there is no real tile at (0, 0) ?
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.
There is an empty outer layer surrounding the grid, as all the tiles have been placed with a (1, 1)
offset: https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/master/libs/libarchfpga/src/read_fpga_interchange_arch.cpp#L2095-L2096
|
||
if (consts.getVccNetName().isName()) | ||
arch_->vcc_net = str(consts.getVccNetName().getName()); | ||
arch_->gnd_net = consts.getGndNetName().isName() ? str(consts.getGndNetName().getName()) : "$__gnd_net"; |
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.
Are these hard-coded const net names special in any way? Maybe we could define them as constants somewhere else in the code?
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.
So, in general the const names should be present in the interchange device. This is just a way to allow having them blank. At the moment there is no interchange device validator and there is no rule to determine whether the const GND
and VCC
net need to be defined.
We could opt for erroring out if those are not present
@acomodi Can you give me 2 weeks to review the PR? Sorry for a delay due to my bandwidth problem. |
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.
Basically, the changes look good. Just need some comments so that it is easier for other developers.
type.fc_specs.push_back(fc_spec); | ||
} | ||
pb_type->name = vtr::strdup(const_block_.c_str()); | ||
pb_type->num_pb = 1; |
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 see some attributes of the constant block is hard coded. Is it possible to provide more comments? For example, what are the two ports (VCC & GND)? And what are the naming convention for both pb_type and ports? I believe these information is useful when building a legalizer, e.g., check_arch(). As we support multiple file format, we definitely need a legalizer which tells us if the arch database is good enough for downstream functions.
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 have added a comment on top of the function
1405735
to
cdaac96
Compare
Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
cdaac96
to
724b87e
Compare
I have added more comments on top of the new functions as well as some other. I may open a new PR to increase the comments coverage on the interchange-related functions as well. For now I'll proceed with merging this PR and soon after I'll open the one about the RR graph generation. |
Description
This adds the synthetic tiles for the constant network, improving support for the interchange devices.
The idea is to place a synthetic tile with two subtiles, each for one constant. The synthetic tile will be placed on the edge of the grid, so not to conflict with real tiles.
With the followup RR graph interchange reader, the constant tiles will be connected to the real RR graph based on the information present in the device
Motivation and Context
Constants need to be handled correctly, and fully supported
Types of changes
Checklist: