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

Canary checks for simulations in CI #284

Merged
merged 16 commits into from
Jan 12, 2024
Merged

Conversation

chetanyagoyal
Copy link
Collaborator

No description provided.

@chetanyagoyal
Copy link
Collaborator Author

@msaligane Can you please look through this?

@chetanyagoyal chetanyagoyal marked this pull request as ready for review December 14, 2023 04:58
@msaligane
Copy link
Member

Do you have a description of what is happening?

Comment on lines 58 to 62
errors = {
'frequency': { 'max': 1, 'min': 0.5 },
'power': { 'max': 1000, 'min': 1000 },
'error': { 'max': 100, 'min': 50 },
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@msaligane this dict of dicts stores the max and min allowable deviations (in percent) for each frequency, power and error results from the simulations. This is stored in generators/common so that all generators have access to it and there's no code redundancy.

The rest of the logic checks the deviation of the results in the currently generated file from the template file

  1. if it lies between max and min, amber alert (throws a soft warning)
  2. if it's greater than the max allowable deviation, red alert (raises a ValueErrorr)
  3. if it's less than the minimum allowable dev., green alert (nothing raised)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It also incorporates the ngspice version into the warnings so that the maintainers can be notified if the simulation results are wildly different because of an ngspice version mismatch

Copy link
Member

Choose a reason for hiding this comment

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

thanks, but my point is this needs to be a readme.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've already added function descriptions as docstrings. I'll make a README in generators/common for the entire folder then

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Resolved, can this be merged now?

.github/README.md Outdated Show resolved Hide resolved
openfasoc/generators/common/README.md Show resolved Hide resolved
openfasoc/generators/ldo-gen/tools/compare_files.py Outdated Show resolved Hide resolved
@msaligane msaligane merged commit 95be8d3 into idea-fasoc:main Jan 12, 2024
7 of 8 checks passed
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.

3 participants