diff --git a/design_dump.cc b/design_dump.cc index e42347bcb..52627302f 100644 --- a/design_dump.cc +++ b/design_dump.cc @@ -145,6 +145,35 @@ ostream& operator << (ostream&o, ivl_switch_type_t val) return o; } +ostream& operator << (ostream&fd, PortType::Enum val) +{ + switch (val) { + case PortType::NOT_A_PORT: + fd << "NOT_A_PORT"; + break; + case PortType::PIMPLICIT: + fd << "PIMPLICIT"; + break; + case PortType::PINPUT: + fd << "PINPUT"; + break; + case PortType::POUTPUT: + fd << "POUTPUT"; + break; + case PortType::PINOUT: + fd << "PINOUT"; + break; + case PortType::PREF: + fd << "PREF"; + break; + default: + fd << "PortType::Enum::?"; + break; + } + + return fd; +} + ostream& ivl_type_s::debug_dump(ostream&o) const { o << typeid(*this).name(); diff --git a/netlist.h b/netlist.h index 6cefc4c15..a373ff018 100644 --- a/netlist.h +++ b/netlist.h @@ -610,6 +610,7 @@ public: static Enum merged( Enum lhs, Enum rhs ); }; +extern std::ostream& operator << (std::ostream&, PortType::Enum); /* * Information on actual ports (rather than port-connected signals) of