Skip to content
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

Initial place matrix serialization/deserialization support. #989

Merged

Conversation

litghost
Copy link
Collaborator

@litghost litghost commented Oct 2, 2019

Description

Bind --read_placement_delay_lookup and --write_placement_delay_lookup to SerDes (implemented using Cap’n Proto).

Motivation and Context

See justification in #707

This PR has predecessor PRs:

How Has This Been Tested?

Unit testing on SerDes, and some integration testing with Symbiflow.

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

- Adds library for handling capnp files and generic NdMatrix support.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
@probot-autolabeler probot-autolabeler bot added build Build system docs Documentation external_libs lang-cpp C/C++ code lang-make CMake/Make code tests VPR VPR FPGA Placement & Routing Tool labels Oct 2, 2019
@litghost litghost mentioned this pull request Oct 2, 2019
7 tasks
Copy link
Contributor

@kmurray kmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. I like how it is all controlled via the VTR_ENABLE_CAPNP define.

I've got a couple of comments below.

libs/libvtrcapnproto/README.md Show resolved Hide resolved
libs/libvtrcapnproto/matrix.capnp Show resolved Hide resolved
VPR_THROW(VPR_ERROR_ROUTE, "DeltaDelayModel::write unimplemented");
void read(const std::string& file) override;
void write(const std::string& file) const override;
const vtr::Matrix<float>& delays() const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to expose this implementation detail? Part of the motivation for making the PlaceDelayModel interface was to hide details like this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason was ease of implementation of OverrideDelayModel serialization, see #989 (comment)

I know how to remove this method if needed, but it is really about what to do about #989 (comment) that changes what the "solution" is here.

private:
std::unique_ptr<PlaceDelayModel> base_delay_model_;
std::unique_ptr<DeltaDelayModel> base_delay_model_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to change this from the abstract PlaceDelayModel to DeltaDelayModel? The idea was that any (potentially non-delta delay model) could be combined with this class to provide fix-up overrides.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serialization would require a mirroring of the inner model type. We could create a string registry of types, and then serialize the string. However, I didn't want to take that additional complexity right now given how few models we have.

Do we want to add such a registry now?

libs/libvtrcapnproto/ndmatrix_serdes.h Outdated Show resolved Hide resolved
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
@kmurray
Copy link
Contributor

kmurray commented Oct 25, 2019

@litghost Thanks for addressing all the comments!

@kmurray kmurray merged commit 4066c79 into verilog-to-routing:master Oct 25, 2019
@litghost litghost deleted the place_matrix_serdes_rebase2 branch June 24, 2020 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system docs Documentation external_libs lang-cpp C/C++ code lang-make CMake/Make code tests VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants