CDC: --cdc now implies early exit, to allow eventual set_logic_0/1 on sigs
This commit is contained in:
parent
d651063749
commit
d46074e0ad
|
|
@ -314,9 +314,9 @@ Specifies C++ without SystemC output mode; see also --sc and --sp.
|
|||
=item --cdc
|
||||
|
||||
Experimental. Perform some clock domain crossing checks and issue related
|
||||
warnings. Additional warning information is written to the file
|
||||
{prefix}__cdc.txt. Generally used with --lint-only. Enables CDCRSTLOGIC
|
||||
warning.
|
||||
warnings (CDCRSTLOGIC) and then exit; if warnings other than CDC warnings
|
||||
are needed make a second run with --lint-only. Additional warning
|
||||
information is also written to the file {prefix}__cdc.txt.
|
||||
|
||||
Currently only checks some items that other CDC tools missed; if you have
|
||||
interest in adding more traditional CDC checks, please contact the authors.
|
||||
|
|
|
|||
|
|
@ -356,6 +356,8 @@ void process () {
|
|||
// Clock domain crossing analysis
|
||||
if (v3Global.opt.cdc()) {
|
||||
V3Cdc::cdcAll(v3Global.rootp());
|
||||
V3Error::abortIfErrors();
|
||||
return;
|
||||
}
|
||||
|
||||
// Reorder assignments in pipelined blocks
|
||||
|
|
@ -527,6 +529,8 @@ void process () {
|
|||
// Makefile must be after all other emitters
|
||||
V3EmitMk::emitmk(v3Global.rootp());
|
||||
}
|
||||
|
||||
// Note early return above when opt.cdc()
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
|
@ -550,8 +554,11 @@ int main(int argc, char** argv, char** env) {
|
|||
if (v3Global.opt.coverage() && !v3Global.opt.systemPerl() && !v3Global.opt.lintOnly()) {
|
||||
v3fatal("Unsupported: Coverage analysis requires --sp output.");
|
||||
}
|
||||
if (!v3Global.opt.outFormatOk() && !v3Global.opt.preprocOnly() && !v3Global.opt.lintOnly()) {
|
||||
v3fatal("verilator: Need --cc, --sc, --sp, --lint-only or --E option");
|
||||
if (!v3Global.opt.outFormatOk()
|
||||
&& !v3Global.opt.preprocOnly()
|
||||
&& !v3Global.opt.lintOnly()
|
||||
&& !v3Global.opt.cdc()) {
|
||||
v3fatal("verilator: Need --cc, --sc, --sp, --cdc, --lint-only or --E option");
|
||||
}
|
||||
// Check environment
|
||||
V3Options::getenvSYSTEMC();
|
||||
|
|
@ -566,6 +573,7 @@ int main(int argc, char** argv, char** env) {
|
|||
if (v3Global.opt.skipIdentical()
|
||||
&& !v3Global.opt.preprocOnly()
|
||||
&& !v3Global.opt.lintOnly()
|
||||
&& !v3Global.opt.cdc()
|
||||
&& V3File::checkTimes(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__verFiles.dat", argString)) {
|
||||
UINFO(1,"--skip-identical: No change to any source files, exiting\n");
|
||||
exit(0);
|
||||
|
|
@ -593,10 +601,11 @@ int main(int argc, char** argv, char** env) {
|
|||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("final.tree",99));
|
||||
V3Error::abortIfWarnings();
|
||||
|
||||
if (!v3Global.opt.lintOnly() && v3Global.opt.makeDepend()) {
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.cdc()
|
||||
&& v3Global.opt.makeDepend()) {
|
||||
V3File::writeDepend(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__ver.d");
|
||||
}
|
||||
if (!v3Global.opt.lintOnly()
|
||||
if (!v3Global.opt.lintOnly() && !v3Global.opt.cdc()
|
||||
&& (v3Global.opt.skipIdentical() || v3Global.opt.makeDepend())) {
|
||||
V3File::writeTimes(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__verFiles.dat", argString);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||
# Version 2.0.
|
||||
|
||||
compile (
|
||||
v_flags => ['--cdc --lint-only'],
|
||||
v_flags => ['--cdc'],
|
||||
verilator_make_gcc => 0,
|
||||
fails => 1,
|
||||
expect=>
|
||||
|
|
|
|||
Loading…
Reference in New Issue