3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00
yosys/tests/fmt/always_full_tb.cc
Catherine b74d33d1b8 fmt: rename TIME to VLOG_TIME.
The behavior of these format specifiers is highly specific to Verilog
(`$time` and `$realtime` are only defined relative to `$timescale`)
and may not fit other languages well, if at all. If they choose to use
it, it is now clear what they are opting into.

This commit also simplifies the CXXRTL code generation for these format
specifiers.
2024-01-19 15:12:05 +00:00

15 lines
348 B
C++

#include "yosys-always_full.cc"
int main()
{
struct : public performer {
int64_t vlog_time() const override { return 1; }
void on_print(const std::string &output, const cxxrtl::metadata_map &) override { std::cerr << output; }
} performer;
cxxrtl_design::p_always__full uut;
uut.p_clk.set(!uut.p_clk);
uut.step(&performer);
return 0;
}