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

array allocation not working in order of MSB to LSB #7

Open
ryu-bu opened this issue Nov 19, 2020 · 1 comment
Open

array allocation not working in order of MSB to LSB #7

ryu-bu opened this issue Nov 19, 2020 · 1 comment

Comments

@ryu-bu
Copy link
Collaborator

ryu-bu commented Nov 19, 2020

Code:

module gradient(
    finput P, Q, E,
    foutput [8:0] out
);
    assign out[0] = P;
    assign out[1] = Q;
    //(1/9)*(5*P + 3*Q);
endmodule

Error:

output dir: out/
['gradient.lfr']
Initialized the lfrcompiler
Traceback (most recent call last):
  File "/home/ryu/.local/bin/lfr-compile", line 8, in <module>
    sys.exit(main())
  File "/home/ryu/.local/lib/python3.8/site-packages/lfr/cmdline.py", line 85, in main
    walker.walk(mapping_listener, tree)
  File "/home/ryu/.local/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 151, in walk
    self.walk(listener, child)
  File "/home/ryu/.local/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 151, in walk
    self.walk(listener, child)
  File "/home/ryu/.local/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 151, in walk
    self.walk(listener, child)
  [Previous line repeated 1 more time]
  File "/home/ryu/.local/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 152, in walk
    self.exitRule(listener, t)
  File "/home/ryu/.local/lib/python3.8/site-packages/antlr4/tree/Tree.py", line 167, in exitRule
    ctx.exitRule(listener)
  File "/home/ryu/.local/lib/python3.8/site-packages/lfr/antlrgen/lfrXParser.py", line 958, in exitRule
    listener.exitExplicitIOBlock(self)
  File "/home/ryu/.local/lib/python3.8/site-packages/lfr/lfrbaseListener.py", line 166, in exitExplicitIOBlock
    self.currentModule.add_io(m)
  File "/home/ryu/.local/lib/python3.8/site-packages/lfr/compiler/module.py", line 37, in add_io
    self.FIG.add_fignode(io.vector_ref[i])
  File "/home/ryu/.local/lib/python3.8/site-packages/lfr/compiler/language/vectorrange.py", line 19, in __getitem__
    return self.vector[self.startindex + key]
  File "/home/ryu/.local/lib/python3.8/site-packages/lfr/compiler/language/vector.py", line 37, in __getitem__
    raise IndexError()
IndexError
@rkrishnasanka
Copy link
Collaborator

@ryu-bu checkout the latest dev version and see if the connections are happening correctly

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