diff options
Diffstat (limited to 'core.j2.c')
| -rw-r--r-- | core.j2.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -62,6 +62,11 @@ char g_asav_pbuf[{{ auto_save_name_len }}]; sqlite3 *g_sim_data; {% endif %} +// Before invoking salis_init(), +// each UI must install its own logger functions +void (*g_info)(const char *fmt, ...); +void (*g_warn)(const char *fmt, ...); + // Forward declarations // Each architecture must define these {% if args.command in ["bench", "new"] and anc_bytes is defined %} @@ -582,12 +587,16 @@ void salis_auto_save() { assert(rem >= 0); assert(rem < {{ auto_save_name_len }}); + g_info("Saving simulation state on step '%#lx'", g_steps); salis_save(g_asav_pbuf); } {% endif %} {% if args.command in ["bench", "new"] %} void salis_init() { + assert(g_info); + assert(g_warn); + uint64_t seed = {{ args.seed }}; for (int i = 0; i < {{ args.cores }}; ++i) { |
