forked from github/verilator
Internals: Move option checks to notify().
This commit is contained in:
parent
bd89c71694
commit
e1e45cf13c
@ -522,6 +522,20 @@ string V3Options::getenvVERILATOR_ROOT() {
|
|||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//######################################################################
|
||||||
|
// V3 Options notification methods
|
||||||
|
|
||||||
|
void V3Options::notify() {
|
||||||
|
// Notify that all arguments have been passed and final modification can be made.
|
||||||
|
if (!outFormatOk()
|
||||||
|
&& !preprocOnly()
|
||||||
|
&& !lintOnly()
|
||||||
|
&& !xmlOnly()
|
||||||
|
&& !cdc()) {
|
||||||
|
v3fatal("verilator: Need --cc, --sc, --cdc, --lint-only, --xml_only or --E option");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
// V3 Options accessors
|
// V3 Options accessors
|
||||||
|
|
||||||
|
@ -257,6 +257,7 @@ class V3Options {
|
|||||||
void addNoClocker(const string& signame);
|
void addNoClocker(const string& signame);
|
||||||
void addVFile(const string& filename);
|
void addVFile(const string& filename);
|
||||||
void addForceInc(const string& filename);
|
void addForceInc(const string& filename);
|
||||||
|
void notify();
|
||||||
|
|
||||||
// ACCESSORS (options)
|
// ACCESSORS (options)
|
||||||
bool preprocOnly() const { return m_preprocOnly; }
|
bool preprocOnly() const { return m_preprocOnly; }
|
||||||
|
@ -585,14 +585,9 @@ int main(int argc, char** argv, char** env) {
|
|||||||
string argString = V3Options::argString(argc-1, argv+1);
|
string argString = V3Options::argString(argc-1, argv+1);
|
||||||
v3Global.opt.parseOpts(new FileLine(FileLine::commandLineFilename()),
|
v3Global.opt.parseOpts(new FileLine(FileLine::commandLineFilename()),
|
||||||
argc-1, argv+1);
|
argc-1, argv+1);
|
||||||
if (!v3Global.opt.outFormatOk()
|
|
||||||
&& !v3Global.opt.preprocOnly()
|
|
||||||
&& !v3Global.opt.lintOnly()
|
|
||||||
&& !v3Global.opt.xmlOnly()
|
|
||||||
&& !v3Global.opt.cdc()) {
|
|
||||||
v3fatal("verilator: Need --cc, --sc, --cdc, --lint-only, --xml_only or --E option");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Validate settings (aka Boost.Program_options)
|
||||||
|
v3Global.opt.notify();
|
||||||
V3Error::abortIfErrors();
|
V3Error::abortIfErrors();
|
||||||
|
|
||||||
// Can we skip doing everything if times are ok?
|
// Can we skip doing everything if times are ok?
|
||||||
|
Loading…
Reference in New Issue
Block a user