From a351a4de16bad06ead0369ae9c98784ee4572f05 Mon Sep 17 00:00:00 2001 From: Germain Haugou Date: Thu, 18 Nov 2021 20:11:08 +0100 Subject: [PATCH] Minor fixes --- engine/include/vp/clock/clock_event.hpp | 2 ++ engine/src/vp.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/engine/include/vp/clock/clock_event.hpp b/engine/include/vp/clock/clock_event.hpp index dabcc0f..7efe79a 100644 --- a/engine/include/vp/clock/clock_event.hpp +++ b/engine/include/vp/clock/clock_event.hpp @@ -59,6 +59,8 @@ namespace vp { int64_t get_cycle() { return cycle; } + void exec() { this->meth(this->_this, this); } + private: uint8_t payload[CLOCK_EVENT_PAYLOAD_SIZE]; void *args[CLOCK_EVENT_NB_ARGS]; diff --git a/engine/src/vp.cpp b/engine/src/vp.cpp index 168d5c3..de17d0b 100644 --- a/engine/src/vp.cpp +++ b/engine/src/vp.cpp @@ -2022,6 +2022,16 @@ int sc_main(int argc, char *argv[]) #endif +void vp::fatal(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + if (vfprintf(stderr, fmt, ap) < 0) {} + va_end(ap); + abort(); +} + + extern "C" void *gv_chip_pad_bind(void *handle, char *name, int ext_handle) { vp::component *instance = (vp::component *)handle;