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

dfflibmap: Add a -dont_use flag to ignore cells #4219

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Conversation

rovinski
Copy link
Contributor

This is an alternative to setting the dont_use property in lib. This brings dfflibmap in parity with the abc pass for -dont_use.

This feature is extremely useful in the case where Liberty files are not easily modifiable, such as when they are stored on a read-only network drive.

This is my first PR here, so I am very open to feedback!

This is an alternative to setting the dont_use property in lib. This brings
dfflibmap in parity with the abc pass for dont_use.

Signed-off-by: Austin Rovinski <[email protected]>
@rovinski
Copy link
Contributor Author

I (hopefully) fixed compilation on Windows and also added a simple test case.

@QuantamHD
Copy link
Contributor

QuantamHD commented Feb 19, 2024

@nakengelhardt This one would be useful to us, and @rovinski is a known collaborator of the OpenROAD project.

Depending on the WIN32 compilation mode, PathMatchSpec may expect a LPCSTR or
LPCWSTR argument. char* is only convertable to LPCSTR, so use that
implementation

Signed-off-by: Austin Rovinski <[email protected]>
@rovinski
Copy link
Contributor Author

Windows build issue resolved - all tests pass now.

@mmicko mmicko merged commit bc8a3a5 into YosysHQ:master Feb 20, 2024
16 checks passed
@@ -115,7 +122,15 @@ static bool parse_pin(LibertyAst *cell, LibertyAst *attr, std::string &pin_name,
return false;
}

static void find_cell(LibertyAst *ast, IdString cell_type, bool clkpol, bool has_reset, bool rstpol, bool rstval)
static int glob_match(const char *pattern, const char *string) {
Copy link
Member

Choose a reason for hiding this comment

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

Please use patmatch from kernel/yosys.cc for this, if possible

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see this got already merged. We should change this. @rovinski do you see any regression from switching to patmatch? See

bool patmatch(const char *pattern, const char *string)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't see that, thanks. Opened #4223.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants