mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-13 01:16:16 +00:00
cxxrtl: Add debug items for state with private names
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
4f7ea38b49
commit
45a6940f40
3 changed files with 8 additions and 2 deletions
|
@ -2429,8 +2429,6 @@ struct CxxrtlWorker {
|
||||||
inc_indent();
|
inc_indent();
|
||||||
for (auto wire : module->wires()) {
|
for (auto wire : module->wires()) {
|
||||||
const auto &debug_wire_type = debug_wire_types[wire];
|
const auto &debug_wire_type = debug_wire_types[wire];
|
||||||
if (!wire->name.isPublic())
|
|
||||||
continue;
|
|
||||||
count_public_wires++;
|
count_public_wires++;
|
||||||
switch (debug_wire_type.type) {
|
switch (debug_wire_type.type) {
|
||||||
case WireType::BUFFERED:
|
case WireType::BUFFERED:
|
||||||
|
@ -2438,6 +2436,9 @@ struct CxxrtlWorker {
|
||||||
// Member wire
|
// Member wire
|
||||||
std::vector<std::string> flags;
|
std::vector<std::string> flags;
|
||||||
|
|
||||||
|
if (!wire->name.isPublic())
|
||||||
|
flags.push_back("GENERATED");
|
||||||
|
|
||||||
if (wire->port_input && wire->port_output)
|
if (wire->port_input && wire->port_output)
|
||||||
flags.push_back("INOUT");
|
flags.push_back("INOUT");
|
||||||
else if (wire->port_output)
|
else if (wire->port_output)
|
||||||
|
|
|
@ -200,6 +200,10 @@ enum cxxrtl_flag {
|
||||||
// node, such as inputs and dangling wires.
|
// node, such as inputs and dangling wires.
|
||||||
CXXRTL_UNDRIVEN = 1 << 4,
|
CXXRTL_UNDRIVEN = 1 << 4,
|
||||||
|
|
||||||
|
// Generated correspond to netlist nodes that correspond to state with an internal name, that
|
||||||
|
// need to be saved, but wouldn't otherwise have a debug item generated.
|
||||||
|
CXXRTL_GENERATED = 1 << 5,
|
||||||
|
|
||||||
// More object flags may be added in the future, but the existing ones will never change.
|
// More object flags may be added in the future, but the existing ones will never change.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1294,6 +1294,7 @@ struct debug_item : ::cxxrtl_object {
|
||||||
DRIVEN_SYNC = CXXRTL_DRIVEN_SYNC,
|
DRIVEN_SYNC = CXXRTL_DRIVEN_SYNC,
|
||||||
DRIVEN_COMB = CXXRTL_DRIVEN_COMB,
|
DRIVEN_COMB = CXXRTL_DRIVEN_COMB,
|
||||||
UNDRIVEN = CXXRTL_UNDRIVEN,
|
UNDRIVEN = CXXRTL_UNDRIVEN,
|
||||||
|
GENERATED = CXXRTL_GENERATED,
|
||||||
};
|
};
|
||||||
|
|
||||||
debug_item(const ::cxxrtl_object &object) : cxxrtl_object(object) {}
|
debug_item(const ::cxxrtl_object &object) : cxxrtl_object(object) {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue