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

Validate tech_name param in compiler/globals.py #210

Open
wants to merge 6 commits into
base: stable
Choose a base branch
from

Conversation

htm23x
Copy link

@htm23x htm23x commented Oct 26, 2023

We need to pre-validate the tech_name param in the config file or python will comply with a non-very-descriptive message that can confuse the user about where's the problem.

We need to pre-validate the tech_name param in the config file or python will comply with a non-very-descriptive message that can confuse the user about where's the problem.
Forgot to add the freepdk45 tech_name in validation
Ooops, I forgot to add the freepdk45 mention in the debug.log string
Copy link
Collaborator

@mguthaus mguthaus left a comment

Choose a reason for hiding this comment

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

People can have a technology that doesn't come with OpenRAM. The only way to check is if there is a directory of the given name in the colon separated OPENRAM_TECH paths.

Fixed incorrect tech_name "scn3m_subm" (correct is "scn3me_subm", note the 3mE).
@htm23x
Copy link
Author

htm23x commented Oct 26, 2023

Oh, very true... let me check if I can modify the code to validate it in that way.

We're now validating the tech_name param specified by the user in the config file listing all the subfolders present in the technology folder. If the technology specified is not present as folder, we will emit an error and quit.
Some tabs/extra spaces were inserted accidentally by GitHub text editor in the tech_name param validation, so has to remove them.
@htm23x
Copy link
Author

htm23x commented Oct 26, 2023

Ok, got it! I changed the code to iterate over all the technology subfolders. If the user tries to specify a technology name not present there, an error will be emit and the execution quits. Please, take a look to my changes in the compiler/globals.py and try to merge it (I tested it, works ok apparently).

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.

None yet

2 participants