mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #2263 from whitequark/cxxrtl-capi-eval-commit
cxxrtl: expose eval() and commit() via the C API
This commit is contained in:
commit
38b814b525
|
@ -43,6 +43,14 @@ void cxxrtl_destroy(cxxrtl_handle handle) {
|
||||||
delete handle;
|
delete handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cxxrtl_eval(cxxrtl_handle handle) {
|
||||||
|
return handle->module->eval();
|
||||||
|
}
|
||||||
|
|
||||||
|
int cxxrtl_commit(cxxrtl_handle handle) {
|
||||||
|
return handle->module->commit();
|
||||||
|
}
|
||||||
|
|
||||||
size_t cxxrtl_step(cxxrtl_handle handle) {
|
size_t cxxrtl_step(cxxrtl_handle handle) {
|
||||||
return handle->module->step();
|
return handle->module->step();
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,18 @@ cxxrtl_handle cxxrtl_create(cxxrtl_toplevel design);
|
||||||
// Release all resources used by a design and its handle.
|
// Release all resources used by a design and its handle.
|
||||||
void cxxrtl_destroy(cxxrtl_handle 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.
|
// Simulate the design to a fixed point.
|
||||||
//
|
//
|
||||||
// Returns the number of delta cycles.
|
// Returns the number of delta cycles.
|
||||||
|
|
Loading…
Reference in New Issue