mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Add --clk and related optimizations, msg1533.
This commit is contained in:
+24
-1
@@ -157,12 +157,27 @@ bool V3Options::isFuture(const string& flag) const {
|
||||
bool V3Options::isLibraryFile(const string& filename) const {
|
||||
return m_libraryFiles.find(filename) != m_libraryFiles.end();
|
||||
}
|
||||
|
||||
void V3Options::addLibraryFile(const string& filename) {
|
||||
if (m_libraryFiles.find(filename) == m_libraryFiles.end()) {
|
||||
m_libraryFiles.insert(filename);
|
||||
}
|
||||
}
|
||||
bool V3Options::isClocker(const string& signame) const {
|
||||
return m_clockers.find(signame) != m_clockers.end();
|
||||
}
|
||||
void V3Options::addClocker(const string& signame) {
|
||||
if (m_clockers.find(signame) == m_clockers.end()) {
|
||||
m_clockers.insert(signame);
|
||||
}
|
||||
}
|
||||
bool V3Options::isNoClocker(const string& signame) const {
|
||||
return m_noClockers.find(signame) != m_noClockers.end();
|
||||
}
|
||||
void V3Options::addNoClocker(const string& signame) {
|
||||
if (m_noClockers.find(signame) == m_noClockers.end()) {
|
||||
m_noClockers.insert(signame);
|
||||
}
|
||||
}
|
||||
void V3Options::addVFile(const string& filename) {
|
||||
// We use a list for v files, because it's legal to have includes
|
||||
// in a specific order and multiple of them.
|
||||
@@ -798,6 +813,14 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
|
||||
shift;
|
||||
V3Options::addLibraryFile(parseFileArg(optdir,argv[i]));
|
||||
}
|
||||
else if ( !strcmp (sw, "-clk") && (i+1)<argc ) {
|
||||
shift;
|
||||
V3Options::addClocker(argv[i]);
|
||||
}
|
||||
else if ( !strcmp (sw, "-no-clk") && (i+1)<argc ) {
|
||||
shift;
|
||||
V3Options::addNoClocker(argv[i]);
|
||||
}
|
||||
else if ( !strcmp (sw, "-V") ) {
|
||||
showVersion(true);
|
||||
exit(0);
|
||||
|
||||
Reference in New Issue
Block a user