From 5349a922e4943313b322889e4bbc05b05ef48610 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 12 Jul 2020 23:34:18 +0000 Subject: cxxrtl: expose eval() and commit() via the C API. --- backends/cxxrtl/cxxrtl_capi.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'backends/cxxrtl/cxxrtl_capi.h') diff --git a/backends/cxxrtl/cxxrtl_capi.h b/backends/cxxrtl/cxxrtl_capi.h index 599284898..74257f0da 100644 --- a/backends/cxxrtl/cxxrtl_capi.h +++ b/backends/cxxrtl/cxxrtl_capi.h @@ -55,6 +55,18 @@ cxxrtl_handle cxxrtl_create(cxxrtl_toplevel design); // Release all resources used by a design and its handle. void cxxrtl_destroy(cxxrtl_handle handle); +// Evaluate the design, propagating changes on inputs to the `next` value of internal state and +// output wires. +// +// Returns 1 if the design is known to immediately converge, 0 otherwise. +int cxxrtl_eval(cxxrtl_handle handle); + +// Commit the design, replacing the `curr` value of internal state and output wires with the `next` +// value. +// +// Return 1 if any of the `curr` values, 0 otherwise. +int cxxrtl_commit(cxxrtl_handle handle); + // Simulate the design to a fixed point. // // Returns the number of delta cycles. -- cgit v1.2.3