internal static void VerifyInferTypes(string moduleName, string extension, bool isVerilogVCD, string modulePath) { CircuitGraph graph = VerifyMakeGraph(moduleName, extension, modulePath); using VCD vcd = LoadVCD(moduleName, modulePath); foreach (var variables in vcd.Variables) { foreach (var variable in variables) { ScalarIO varCon = graph.GetConnection(variable, isVerilogVCD); if (varCon == null) { continue; } ref BinaryVarValue actual = ref varCon.GetValue(); if (!varCon.Value.IsInitialized()) { continue; } if (variable.Size != actual.Bits.Length) { Console.WriteLine($"Ref: {variable.Reference}, Expected: {variable.Size}, Actual: {actual.Bits.Length}"); } Assert.AreEqual(variable.Size, actual.Bits.Length); } }