Commit 6c6804a7 authored by Peter's avatar Peter
Browse files

fixed

1. single file multiple module
2. added predefinedModules.json
parent 3097ff21
Loading
Loading
Loading
Loading
Loading
+4 −2
Changes for src/main/java/hk/quantr/verilogcompiler/listener/AllModuleListener.java: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ public class AllModuleListener extends VerilogParserBaseListener {
		String wireName = ctx.list_of_net_identifiers() == null ? "null" : /*CommonLib.randomString(6, true, false, false) + "_" + */ ctx.list_of_net_identifiers().getText();
//		System.out.println("wireName=" + wireName);
		String wireType = ctx.range_() == null ? "null" : ctx.range_().getText();
//		System.out.println(wireName);
		System.out.println("exitNet_declaration: " + wireName + ", " + wireType);
		wires.put(wireName, new Wire(wireName, wireType));
//		} catch (OptionErrorException ex) {
//			Logger.getLogger(AllModuleListener.class.getName()).log(Level.SEVERE, null, ex);
@@ -147,6 +147,9 @@ public class AllModuleListener extends VerilogParserBaseListener {
	public void exitModule_instantiation(VerilogParser.Module_instantiationContext ctx) {
		moduleName = ctx.module_identifier().getText();
		System.out.println("exitModule_instantiation=" + moduleName);
		if (moduleName.equals("SB_SPRAM256KA")){
			System.out.println("");
		}
		try {
			for (Module_instanceContext module_instance : ctx.module_instance()) {
				hk.quantr.verilogcompiler.structure.Module module = supportingModule.get(moduleName);
@@ -184,5 +187,4 @@ public class AllModuleListener extends VerilogParserBaseListener {
		}
	}

	
}