public void Write(EsiSystem sys)
        {
            // Write the header
            // FIXME: Hardcoded ID
            Writer.WriteLine(
                @"####################
#### ESI-compatible auto-generated schema
###########

using ESI = import ""/EsiCoreAnnotations.capnp"";
");

            var CapnpID = BitConverter.ToUInt64(sys.SystemHash, 0) | 0x80000000_00000000;

            WL($"@0x{CapnpID:X};");
            WL();

            sys.Objects.ForEach(obj => {
                switch (obj)
                {
                case EsiStruct st when !string.IsNullOrWhiteSpace(st.Name):
                    Write(st, 0);
                    break;
                }
            });
        }
        public void Write(EsiSystem sys, FileInfo into)
        {
            if (into.Exists)
            {
                into.Delete();
            }

            try
            {
                Writer = new StreamWriter(into.OpenWrite());
                Write(sys);
            } finally {
                Writer.Close();
                Writer = null;
            }
        }
 public EsiSystemVerilogInterfaceWriter(EsiContext ctxt, EsiSystem sys)
 {
     C   = ctxt;
     Sys = sys;
 }