private static GraphFIR.IO.FIRIO VisitType(VisitHelper helper, FIRRTL.Dir direction, string name, FIRRTL.IFIRType type, bool forcePassive)
 {
     if (type is FIRRTL.BundleType bundle)
     {
         return(VisitBundle(helper, direction, name, bundle, forcePassive));
     }
     else if (type is FIRRTL.VectorType vec)
     {
         return(VisitVector(helper, direction, name, vec, forcePassive));
     }
     else if (direction == FIRRTL.Dir.Input)
     {
         return(new GraphFIR.IO.Input(null, name, type));
     }
     else if (direction == FIRRTL.Dir.Output)
     {
         return(new GraphFIR.IO.Output(null, name, type));
     }
     else
     {
         throw new NotImplementedException();
     }
 }
 private static GraphFIR.IO.FIRIO VisitTypeAsPassive(VisitHelper helper, FIRRTL.Dir direction, string name, FIRRTL.IFIRType type)
 {
     return(VisitType(helper, direction, name, type, true));
 }