diff options
Diffstat (limited to 'frontends/verific')
| -rw-r--r-- | frontends/verific/README | 2 | ||||
| -rw-r--r-- | frontends/verific/verific.cc | 27 | ||||
| -rw-r--r-- | frontends/verific/verificsva.cc | 15 | 
3 files changed, 39 insertions, 5 deletions
| diff --git a/frontends/verific/README b/frontends/verific/README index c76cdd637..89584f2e8 100644 --- a/frontends/verific/README +++ b/frontends/verific/README @@ -21,7 +21,7 @@ Then run in the following command in this directory:  	sby -f example.sby -This will generate approximately one page of text outpout. The last lines +This will generate approximately one page of text output. The last lines  should be something like this:  	SBY [example] summary: Elapsed clock time [H:MM:SS (secs)]: 0:00:00 (0) diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index 94138cdd6..c412cd3a3 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -1855,6 +1855,13 @@ struct VerificPass : public Pass {  		log("  -autocover\n");  		log("    Generate automatic cover statements for all asserts\n");  		log("\n"); +		log("  -chparam name value \n"); +		log("    Elaborate the specified top modules (all modules when -all given) using\n"); +		log("    this parameter value. Modules on which this parameter does not exist will\n"); +		log("    cause Verific to produce a VERI-1928 or VHDL-1676 message. This option\n"); +		log("    can be specified multiple times to override multiple parameters.\n"); +		log("    String values must be passed in double quotes (\").\n"); +		log("\n");  		log("  -v, -vv\n");  		log("    Verbose log messages. (-vv is even more verbose than -v.)\n");  		log("\n"); @@ -1920,6 +1927,10 @@ struct VerificPass : public Pass {  			// WARNING: instantiating unknown module 'XYZ' (VERI-1063)  			Message::SetMessageType("VERI-1063", VERIFIC_ERROR); +#ifndef DB_PRESERVE_INITIAL_VALUE +#  warning Verific was built without DB_PRESERVE_INITIAL_VALUE. +#endif +  			set_verific_global_flags = false;  		} @@ -2105,6 +2116,7 @@ struct VerificPass : public Pass {  			bool mode_autocover = false;  			bool flatten = false, extnets = false;  			string dumpfile; +			Map parameters(STRING_HASH);  			for (argidx++; argidx < GetSize(args); argidx++) {  				if (args[argidx] == "-all") { @@ -2143,6 +2155,15 @@ struct VerificPass : public Pass {  					mode_autocover = true;  					continue;  				} +				if (args[argidx] == "-chparam"  && argidx+2 < GetSize(args)) { +                                        const std::string &key = args[++argidx]; +                                        const std::string &value = args[++argidx]; +					unsigned new_insertion = parameters.Insert(key.c_str(), value.c_str(), +									           1 /* force_overwrite */); +					if (!new_insertion) +						log_warning_noprefix("-chparam %s already specified: overwriting.\n", key.c_str()); +					continue; +				}  				if (args[argidx] == "-V") {  					mode_verific = true;  					continue; @@ -2176,7 +2197,7 @@ struct VerificPass : public Pass {  				if (vhdl_lib) vhdl_libs.InsertLast(vhdl_lib);  				if (veri_lib) veri_libs.InsertLast(veri_lib); -				Array *netlists = hier_tree::ElaborateAll(&veri_libs, &vhdl_libs); +				Array *netlists = hier_tree::ElaborateAll(&veri_libs, &vhdl_libs, ¶meters);  				Netlist *nl;  				int i; @@ -2213,7 +2234,7 @@ struct VerificPass : public Pass {  				}  				log("Running hier_tree::Elaborate().\n"); -				Array *netlists = hier_tree::Elaborate(&veri_modules, &vhdl_units); +				Array *netlists = hier_tree::Elaborate(&veri_modules, &vhdl_units, ¶meters);  				Netlist *nl;  				int i; @@ -2312,7 +2333,7 @@ struct ReadPass : public Pass {  	}  	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE  	{ -		if (args.size() < 2) +		if (args.size() < 2 || args[1][0] != '-')  			log_cmd_error("Missing mode parameter.\n");  		if (args.size() < 3) diff --git a/frontends/verific/verificsva.cc b/frontends/verific/verificsva.cc index 6681115df..8ea8372d3 100644 --- a/frontends/verific/verificsva.cc +++ b/frontends/verific/verificsva.cc @@ -1666,7 +1666,20 @@ struct VerificSvaImporter  				log("  importing SVA property at root cell %s (%s) at %s:%d.\n", root->Name(), root->View()->Owner()->Name(),  						LineFile::GetFileName(root->Linefile()), LineFile::GetLineNo(root->Linefile())); -			RTLIL::IdString root_name = module->uniquify(importer->mode_names || root->IsUserDeclared() ? RTLIL::escape_id(root->Name()) : NEW_ID); +			bool is_user_declared = root->IsUserDeclared(); + +			// FIXME +			if (!is_user_declared) { +				const char *name = root->Name(); +				for (int i = 0; name[i]; i++) { +					if (i ? (name[i] < '0' || name[i] > '9') : (name[i] != 'i')) { +						is_user_declared = true; +						break; +					} +				} +			} + +			RTLIL::IdString root_name = module->uniquify(importer->mode_names || is_user_declared ? RTLIL::escape_id(root->Name()) : NEW_ID);  			// parse SVA sequence into trigger signal | 
