Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to synthesise XDF nested actors: failed to compile: NullPointerException, null #1

Open
robstewart57 opened this issue Feb 26, 2015 · 3 comments

Comments

@robstewart57
Copy link

When trying to compile an XDF network to Verilog with Xronos, where one node in the network is itself and XDF network of actors, the compiler complains:

7:32:03 PM: Compiling instance: nested_actor1 (9/14)
7:32:03 PM SEVERE:   - failed to compile: NullPointerException, null
7:32:03 PM SEVERE: -------------------------------------------------------------------------------
7:32:03 PM SEVERE: NOTE: 1 actor failed to compile
7:32:03 PM SEVERE: -------------------------------------------------------------------------------

Given that Xronos uses the NetworkFlattener transform before network generation on line 135, this is surprising.

That said, I've inspected buildLim in DesignEngine on line 96 when Orcc fails to generate Verilog for nested_actor1. The global network variable is null, so the design variable is not assigned to with networkToDesign.buildDesign(), hence the NullPointerException above as design is returned as null on line 141.

Is it assumed that Xronos does not support nested networks? Or, should I be using it differently to coerce its nested network support?

@endrix
Copy link
Member

endrix commented Feb 27, 2015

Could you please provide me what the call stack before the NullPointerException in the First eclipse

@robstewart57
Copy link
Author

Sure. Adding Arrays.toString(ex.getStackTrace()) to the NullPointerException catch in printInstance gives:

org.xronos.orcc.design.util.ModuleUtil.absoluteMemoryRead(ModuleUtil.java:94),
org.xronos.orcc.design.visitors.ComponentCreator.caseInstLoad(ComponentCreator.java:692),
org.xronos.orcc.design.visitors.ComponentCreator.caseInstLoad(ComponentCreator.java:1),
net.sf.orcc.ir.util.IrSwitch.doSwitch(IrSwitch.java:839),
org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53),
net.sf.orcc.ir.util.AbstractIrVisitor.doSwitch(AbstractIrVisitor.java:214),
net.sf.orcc.ir.util.AbstractIrVisitor.visitInstructions(AbstractIrVisitor.java:281),
org.xronos.orcc.design.visitors.ComponentCreator.caseBlockBasic(ComponentCreator.java:218),
org.xronos.orcc.design.visitors.ComponentCreator.caseBlockBasic(ComponentCreator.java:1),
net.sf.orcc.ir.util.IrSwitch.doSwitch(IrSwitch.java:775),
org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53),
net.sf.orcc.ir.util.AbstractIrVisitor.doSwitch(AbstractIrVisitor.java:214),
net.sf.orcc.ir.util.AbstractIrVisitor.visitBlocks(AbstractIrVisitor.java:244),
net.sf.orcc.ir.util.AbstractIrVisitor.doSwitch(AbstractIrVisitor.java:224),
net.sf.orcc.ir.util.AbstractIrVisitor.caseProcedure(AbstractIrVisitor.java:206),
org.xronos.orcc.design.visitors.ComponentCreator.caseProcedure(ComponentCreator.java:874),
org.xronos.orcc.design.visitors.ComponentCreator.caseProcedure(ComponentCreator.java:1),
net.sf.orcc.ir.util.IrSwitch.doSwitch(IrSwitch.java:748),
org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53),
net.sf.orcc.ir.util.AbstractIrVisitor.doSwitch(AbstractIrVisitor.java:214),
org.xronos.orcc.design.visitors.DesignActor.caseAction(DesignActor.java:132),
net.sf.orcc.df.util.DfSwitch.doSwitch(DfSwitch.java:181),
org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53),
net.sf.orcc.df.util.DfVisitor.doSwitch(DfVisitor.java:234),
org.xronos.orcc.design.visitors.DesignActor.caseActor(DesignActor.java:195),
net.sf.orcc.df.util.DfSwitch.doSwitch(DfSwitch.java:142),
org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:53),
net.sf.orcc.df.util.DfVisitor.doSwitch(DfVisitor.java:234),
org.xronos.orcc.design.ActorToDesign.buildDesign(ActorToDesign.java:75),
org.xronos.orcc.design.DesignEngine.buildLim(DesignEngine.java:123),
org.xronos.openforge.app.Engine.begin(Engine.java:119),
org.xronos.orcc.backend.XronosPrinter.printInstance(XronosPrinter.java:195),
org.xronos.orcc.backend.Xronos.generateInstances(Xronos.java:347),
org.xronos.orcc.backend.Xronos.doGenerateNetwork(Xronos.java:154),
net.sf.orcc.backends.AbstractBackend.compile(AbstractBackend.java:335),
net.sf.orcc.ui.launching.OrccRunLaunchDelegate$1.run(OrccRunLaunchDelegate.java:92),
org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

@endrix
Copy link
Member

endrix commented Feb 28, 2015

i would need to see the action that is causing that, seems like a memory was not created properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants