From 0955a603c889e3ce86ca65cf59ec3ca5650c6517 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 10 Jun 2020 14:39:45 +0000 Subject: cxxrtl: disambiguate values/wires and their aliases in debug info. With this change, it is easier to see which signals carry state (only wire<>s appear as `reg` in VCD files) and to construct a minimal checkpoint (CXXRTL_WIRE debug items represent the canonical smallest set of state required to fully reconstruct the simulation). --- backends/cxxrtl/cxxrtl_capi.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'backends/cxxrtl/cxxrtl_capi.h') diff --git a/backends/cxxrtl/cxxrtl_capi.h b/backends/cxxrtl/cxxrtl_capi.h index 46aa662b2..8bd906ea4 100644 --- a/backends/cxxrtl/cxxrtl_capi.h +++ b/backends/cxxrtl/cxxrtl_capi.h @@ -89,7 +89,14 @@ enum cxxrtl_type { // always NULL. CXXRTL_MEMORY = 2, - // More object types will be added in the future, but the existing ones will never change. + // Aliases correspond to netlist nodes driven by another node such that their value is always + // exactly equal, or driven by a constant value. + // + // Aliases can be inspected via the `curr` pointer. They cannot be modified, and the `next` + // pointer is always NULL. + CXXRTL_ALIAS = 3, + + // More object types may be added in the future, but the existing ones will never change. }; // Description of a simulated object. @@ -123,7 +130,7 @@ struct cxxrtl_object { uint32_t *curr; uint32_t *next; - // More description fields will be added in the future, but the existing ones will never change. + // More description fields may be added in the future, but the existing ones will never change. }; // Retrieve description of a simulated object. -- cgit v1.2.3