mirror of https://github.com/YosysHQ/yosys.git
Error detection for co-simulation
This commit is contained in:
parent
6db23de7b1
commit
c0a156bcb4
|
@ -26,6 +26,8 @@ FstData::FstData(std::string filename) : ctx(nullptr)
|
||||||
{
|
{
|
||||||
const std::vector<std::string> g_units = { "s", "ms", "us", "ns", "ps", "fs", "as", "zs" };
|
const std::vector<std::string> g_units = { "s", "ms", "us", "ns", "ps", "fs", "as", "zs" };
|
||||||
ctx = (fstReaderContext *)fstReaderOpen(filename.c_str());
|
ctx = (fstReaderContext *)fstReaderOpen(filename.c_str());
|
||||||
|
if (!ctx)
|
||||||
|
log_error("Error opening '%s'\n", filename.c_str());
|
||||||
int scale = (int)fstReaderGetTimescale(ctx);
|
int scale = (int)fstReaderGetTimescale(ctx);
|
||||||
timescale = pow(10.0, scale);
|
timescale = pow(10.0, scale);
|
||||||
timescale_str = "";
|
timescale_str = "";
|
||||||
|
|
|
@ -961,6 +961,9 @@ struct SimWorker : SimShared
|
||||||
log_assert(top == nullptr);
|
log_assert(top == nullptr);
|
||||||
fst = new FstData(sim_filename);
|
fst = new FstData(sim_filename);
|
||||||
|
|
||||||
|
if (scope.empty())
|
||||||
|
log_error("Scope must be defined for co-simulation.\n");
|
||||||
|
|
||||||
top = new SimInstance(this, scope, topmod);
|
top = new SimInstance(this, scope, topmod);
|
||||||
|
|
||||||
std::vector<fstHandle> fst_clock;
|
std::vector<fstHandle> fst_clock;
|
||||||
|
|
Loading…
Reference in New Issue