Add more options and time handling
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user