3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Add more options and time handling

This commit is contained in:
Miodrag Milanovic 2022-01-28 10:18:02 +01:00
parent ccc3e3d13a
commit 3e35de2be1
3 changed files with 106 additions and 2 deletions

View file

@ -24,6 +24,7 @@ USING_YOSYS_NAMESPACE
FstData::FstData(std::string filename) : ctx(nullptr)
{
ctx = (fstReaderContext *)fstReaderOpen(filename.c_str());
timescale = pow(10.0, (int)fstReaderGetTimescale(ctx));
extractVarNames();
}

View file

@ -58,6 +58,7 @@ class FstData
void recalc_time_offsets(fstHandle signal, std::vector<uint64_t> time);
fstHandle getHandle(std::string name);
double getTimescale() { return timescale; }
private:
void extractVarNames();
@ -72,6 +73,7 @@ private:
std::vector<uint64_t> sample_times;
size_t sample_times_ndx;
std::map<fstHandle, std::string> current;
double timescale;
};
YOSYS_NAMESPACE_END