mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
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.
15 lines
348 B
C++
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;
|
|
}
|