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

connecting wire slice to wire slice seems not to work #144

Open
cbatten opened this issue Oct 30, 2015 · 2 comments
Open

connecting wire slice to wire slice seems not to work #144

cbatten opened this issue Oct 30, 2015 · 2 comments

Comments

@cbatten
Copy link
Contributor

cbatten commented Oct 30, 2015

See:

PyMTL doesn't complain with connecting bitslices of wires, but even so there seems to be a deeper issue. If you take this line:

  s.connect( s.wire2[0], s.wire1[0] )

and change it to this:

  s.connect( s.wire2[0], s.wire1[0] )

It works. PyMTL creates implicit combinational blocks to handle slicing -- it needs to know the src/dest in order to do that, and I wonder with wires if it assumes the first argument is the input and the second one is the destination?

@dmlockhart
Copy link
Contributor

Is this related to connect_wire()?

That was added because connecting two wires did not provide enough directionality information for translation to work properly.

Is simulation broken in this case?

@cbatten
Copy link
Contributor Author

cbatten commented Oct 30, 2015

It is kind of related to connect_wire -- I thought connect_wire was just for translation -- we needed to know the direction to correctly to Verilog translation, but I did not think connecting wire to another wire was a simulation issue -- and it isn't -- the real issue is connecting a wire bit slice to a wire bit slice. If you don't put those in the right order (either src then dest with connect or dest then src with connect_wire) you get incorrect simulation behavior. So I am not quite sure what the right approach is -- maybe to detect the case where we try to connect two wire bit slices and force the user to use connect_wire -- and hope the user reads the error message to know that connect_wire only works if you do dest then src.

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