Loading aaaa.v +5 −4 Changes for aaaa.v: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ link_address = link; alusel_o = 0; aluop_o = 999; reg1_read_o = branch_flag = 11; branch_target_address = 22; link_address = 33;; aluop_o = 3'b100; reg1_read_o = branch_flag = 111; branch_target_address = 3'b100; link_address = 333;; reg2_read_o = 3; reg1_addr_o = 4; reg2_addr_o = 5; Loading @@ -33,3 +33,4 @@ branch_flag = 11; src/main/java/hk/quantr/verilogcompiler/VerilogHelper.java +2 −4 Changes for src/main/java/hk/quantr/verilogcompiler/VerilogHelper.java: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public class VerilogHelper { } if (parentMacro == null) { System.err.println("ERROR"); System.out.println(ps); System.exit(125); } for (String temp : macroBody.split("\r?\n")) { Loading Loading @@ -285,10 +284,9 @@ public class VerilogHelper { ParseStructure ps = new ParseStructure(); String content = IOUtils.toString(new FileInputStream(file), "utf-8"); String sourceContent = VerilogHelper.getContentReplacedWithMacro(0, content, VerilogHelper.scanMacroDefinitions(file.getParentFile()), ps); System.out.println(" final ".repeat(30)); System.out.println(ps); FileUtils.writeStringToFile(new File("aaaa.v"), sourceContent, "utf-8"); CommonLib.printWithLineNumber(sourceContent); // CommonLib.printWithLineNumber(sourceContent); System.out.println(ps); System.out.println("+".repeat(100)); VerilogLexer lexer = new VerilogLexer(CharStreams.fromString(sourceContent)); CommonTokenStream tokenStream = new CommonTokenStream(lexer); Loading src/main/java/hk/quantr/verilogcompiler/macro/ParseStructure.java +1 −1 Changes for src/main/java/hk/quantr/verilogcompiler/macro/ParseStructure.java: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class ParseStructure { return new ImmutablePair(m, current); } if (!m.children.isEmpty() & deep < maxDeep) { Pair<MacroListing, Integer> p = get(lineNo, current + 1, m.children, deep + 1, maxDeep); Pair<MacroListing, Integer> p = get(lineNo, current, m.children, deep + 1, maxDeep); MacroListing t = p.getLeft(); current = p.getRight(); if (t != null) { Loading Loading
aaaa.v +5 −4 Changes for aaaa.v: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ link_address = link; alusel_o = 0; aluop_o = 999; reg1_read_o = branch_flag = 11; branch_target_address = 22; link_address = 33;; aluop_o = 3'b100; reg1_read_o = branch_flag = 111; branch_target_address = 3'b100; link_address = 333;; reg2_read_o = 3; reg1_addr_o = 4; reg2_addr_o = 5; Loading @@ -33,3 +33,4 @@ branch_flag = 11;
src/main/java/hk/quantr/verilogcompiler/VerilogHelper.java +2 −4 Changes for src/main/java/hk/quantr/verilogcompiler/VerilogHelper.java: 2 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public class VerilogHelper { } if (parentMacro == null) { System.err.println("ERROR"); System.out.println(ps); System.exit(125); } for (String temp : macroBody.split("\r?\n")) { Loading Loading @@ -285,10 +284,9 @@ public class VerilogHelper { ParseStructure ps = new ParseStructure(); String content = IOUtils.toString(new FileInputStream(file), "utf-8"); String sourceContent = VerilogHelper.getContentReplacedWithMacro(0, content, VerilogHelper.scanMacroDefinitions(file.getParentFile()), ps); System.out.println(" final ".repeat(30)); System.out.println(ps); FileUtils.writeStringToFile(new File("aaaa.v"), sourceContent, "utf-8"); CommonLib.printWithLineNumber(sourceContent); // CommonLib.printWithLineNumber(sourceContent); System.out.println(ps); System.out.println("+".repeat(100)); VerilogLexer lexer = new VerilogLexer(CharStreams.fromString(sourceContent)); CommonTokenStream tokenStream = new CommonTokenStream(lexer); Loading
src/main/java/hk/quantr/verilogcompiler/macro/ParseStructure.java +1 −1 Changes for src/main/java/hk/quantr/verilogcompiler/macro/ParseStructure.java: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ public class ParseStructure { return new ImmutablePair(m, current); } if (!m.children.isEmpty() & deep < maxDeep) { Pair<MacroListing, Integer> p = get(lineNo, current + 1, m.children, deep + 1, maxDeep); Pair<MacroListing, Integer> p = get(lineNo, current, m.children, deep + 1, maxDeep); MacroListing t = p.getLeft(); current = p.getRight(); if (t != null) { Loading