-
Notifications
You must be signed in to change notification settings - Fork 24
add_pin_groups does not work as expected for a mix of individual pins and pin groups #69
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
Comments
@Dieleman ... I will be looking at this and will give you an update in about 2 hours. |
Nice one @welguisz, you may want to use this test case I made which shows the problem: it "pins groups can be composed of standalone pins and other groups" do
$dut.add_pin(:tdi)
$dut.add_pin(:tdo)
$dut.add_pin(:tclk)
$dut.add_pin(:tms)
$dut.add_pins(:porta, size: 8)
$dut.add_pins(:portb, size: 16)
$dut.pins.size.should == 28
$dut.add_pin_group :jtag, :tdi, :tdo, :tclk, :tms
$dut.add_pin_group :ports, :porta, :portb
$dut.add_pin_group :all, :tdi, :tdo, :tclk, :tms, :porta, :portb
$dut.add_pin_group :all2, :jtag, :ports
$dut.pins(:jtag).size.should == 4
$dut.pins(:ports).size.should == 24
$dut.pins(:all).size.should == 28
$dut.pins(:all2).size.should == 28
end |
@ginty ... Thanks for the code .. Seeing the error right now
This means that this test is a good test since it is showing that has an error before any fix is done. |
I found where the bug is at:
For PART1, I think the best action is to change it to |
Just pushed the fix and started a pull Request. @ginty when Coveralls finishes, can you review and merge if everything looks correct. |
@Dieleman I just release origen 0.7.43 that has this fixed incorporated in it. If everything works, please let us know that this is resolved and we can close this issue. Thanks |
@welguisz Thanks, I tried it and this seems to fix the issue indeed. For me the issue can be closed. |
For pin definition:
add_pins :target, size: 2, direction: :input, reset: :drive_lo
add_pin :nadd, direction: :input, reset: :drive_lo
add_pin :ee_n, direction: :input, reset: :drive_hi
add_pin :oscx, direction: :input, reset: :drive_lo
add_pin :prech, direction: :input, reset:
add_pin_group :kalos_all_pins, :nadd, :ee_n, :oscx, :prech
Correctly gives $dut.pins(:kalos_all_pins).size => 4
add_pin_group :kalos_all_pins, :nadd, :ee_n, :oscx, :prech, :target
However gives $dut.pins(:kalos_all_pins).size => 2
So adding another pingroup (:target) somehow resets the master group
The text was updated successfully, but these errors were encountered: