-
Notifications
You must be signed in to change notification settings - Fork 57
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
Strict parameter mode concept #346
Comments
Little confused on this statement:
How does a parameter run with defaults if it's not defined? Not sure I follow... On a similar topic, however, I've been bouncing around the idea of adding a default-less parameter macro that allowed the modeler to define a parameter, but provide no default value at all. The parameter has to be set via an architecture file ( Naturally, the framework would die if
|
I was sloppy in my use of the term defined. Maybe set is the correct term. Here is my example:
Your default-less parameter concept would meet my needs, but one couldn't run |
I see. It seems we're on the same page, but with a few changes to behaviors if a default-less parameter were added and a default arch file were provided. Assume a simulator (like in your example) has three parameters:
Thoughts? |
Problem: simulators usually define a default value for parameters. These default values are almost always wrong for a mature simulator. It would be nice if sparta could complain about important parameters that aren't defined, but yet still run with defaults. (It may do this already.)
Deeper problem: "complaining" via a warning in the log is nice, but people don't often look at those logs. In production cases (running thousands of simulations), I'd like to fail soon and fail hard rather than warn.
Suggestion: implement the concept of "strict" mode or
-Werror
to force a sparta-based simulator to assert for parameters that aren't defined. I am not sure if we want this for all params, or to make this a property of a parameter. In other words, by default params are happy assuming a default, but one can set a property on a parameter to assert if not defined when in the "strict" mode.The text was updated successfully, but these errors were encountered: