Skip to content

Vpr constraints parsing #1600

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

Merged
merged 5 commits into from
Dec 2, 2020
Merged

Vpr constraints parsing #1600

merged 5 commits into from
Dec 2, 2020

Conversation

sfkhalid
Copy link
Contributor

Description

All the changes made on this branch were to facilitate parsing vpr constraints files. An option called "--read_vpr_constraints" was created and the uxsdcxx library was used to generate parsing files based on an XML schema called vpr_constraints.xsd

Types of changes

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

Checklist:

  • [x ] 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

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Nov 24, 2020
#include "constraints_load.h"
#include "vtr_log.h"
#include "globals.h" //for the g_vpr_ctx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have a block comment at the top explaining which functions go with read functionality, and which go with write functionality, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can point to the rr_graph tutorial for more info

virtual void finish_load() final {
}

//temp data for loads
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment what all of these are

virtual inline void set_add_atom_name_pattern(const char* name_pattern, void*& /*ctx*/) final {
auto& atom_ctx = g_vpr_ctx.atom();
std::string atom_name = name_pattern;
atom_id_ = atom_ctx.nlist.find_block(name_pattern);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have a warning if you encounter name_pattern that doesnt match anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment what happens when invalid

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for regex -> atom_id_ to a vector of atom ids because you may get multiple atom ids that match a regular expression

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Check for invalid names, check that in. --> Merge after this
  2. Check for signal names, check in. --> new branch off master
  3. Check for wildcard names, check in.

* <xs:attribute name="subtile" type="xs:int" />
* </xs:complexType>
*/
virtual inline int get_add_region_subtile(void*& /*ctx*/) final {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for functions that are stubbed out, comment

loaded_partition.set_name(name);
}

virtual inline void preallocate_partition_add_atom(void*& /*ctx*/, size_t /*size*/) final {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

called when processing atoms, but not used

constraints_.add_partition(loaded_partition);

num_partitions_++;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add a space

@sfkhalid sfkhalid merged commit b0223dc into master Dec 2, 2020
@sfkhalid sfkhalid deleted the vpr_constraints_parsing branch December 2, 2020 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant