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

Pin package level coordinate data #298

Open
info-rchitect opened this issue Oct 29, 2018 · 6 comments
Open

Pin package level coordinate data #298

info-rchitect opened this issue Oct 29, 2018 · 6 comments

Comments

@info-rchitect
Copy link
Member

info-rchitect commented Oct 29, 2018

All,

When re-writing our pin importer, I realized there is a lot of package coordinate metadata that really has no way to be added to the model.

  {:x=>11000,
   :y=>-14800,
   :pcbpad=>"pad500",
   :pcbxy=>"[11000,-14800]",
   :rvia=>"[[-121000,-115200],[500,400]]",
   :rtrace=>"[[[500,400,100]]]",
   :location=>"BA36"},

The current package scoped attributes list is:

[:location, :dib_assignment, :dib_meta]

Should we add a :pkg_meta attribute similar to the existing functionally scoped :meta attribute?

@ginty
Copy link
Member

ginty commented Oct 30, 2018

It does seem like a good idea, however should it not just be :meta ?

Currently it looks like you can supply :meta when defining the pin, and then again when defining functions and Origen will merge them into a single my_pin.meta attribute depending on what function is enabled.

So I would then expect for the package that I could do:

add_pin :tdi, packages: { bga: { meta: { blah: :blah } } } 

And the package specific meta data would get merged into my_pin.meta in the same way for the current package.

@info-rchitect
Copy link
Member Author

@ginty I didn't know it did the merge. Should this be possible?

add_pin :tdi, meta: { die_level_attr: die_level_val }, packages: { bga: { meta: { blah: :blah } } } 

@ginty
Copy link
Member

ginty commented Oct 31, 2018

Yes, that's how I would expect it to work, this should be the spec test:

dut.add_pin :tdi, meta: { die_level_attr: :die_level_val }, packages: { bga: { meta: { blah: :blah } } }

dut.package = nil

dut.pin(:tdi).meta.should == { die_level_attr: :die_level_val }

dut.package = :bga

dut.pin(:tdi).meta.should == { die_level_attr: :die_level_val, blah: :blah }

@info-rchitect
Copy link
Member Author

info-rchitect commented Oct 31, 2018

@ginty I was not able to get the following to work:

dut.add_pin :tdi, packages: { bga: { meta: { blah: :blah } } }

The metadata was always an empty hash even when I set the package. I was able to assign the meta at the die level scope. Here is what i see in the debugger for the package specific hash I pass as a add_pin arg:

=> {:packages=>
  {:pcs=>
    {:meta=>
      {:macrotype=>"NA",
       :macroinst=>"NA",
       :macroport=>"NA",
       :padsite=>"NA",
       :rdl=>"NA",
       :bump=>"NA",
       :substrate=>"VDD",
       :ball=>"VDD_SENSE",
       :model_in_origen_as=>:virtual,
       :packages=>[:pcs, :pkg1],
       :location=>"BC20",
       :ballmap_group=>"POWER",
       :x=>-5000,
       :y=>-16400,
       :pcbpad=>"pad500",
       :pcbxy=>"[-5000,-16400]",
       :rvia=>"[[500,400]]",
       :rtrace=>"[[[500,400,100]]]"}},
   :bl5=>
    {:meta=>
      {:macrotype=>"NA",
       :macroinst=>"NA",
       :macroport=>"NA",
       :padsite=>"NA",
       :rdl=>"NA",
       :bump=>"NA",
       :substrate=>"VDD",
       :ball=>"VDD_SENSE",
       :model_in_origen_as=>:virtual,
       :packages=>[:pcs, :pkg1],
       :location=>"BC20",
       :ballmap_group=>"POWER",
       :x=>-5000,
       :y=>-16400,
       :pcbpad=>"pad500",
       :pcbxy=>"[-5000,-16400]",
       :rvia=>"[[500,400]]",
       :rtrace=>"[[[500,400,100]]]"}}}}

@ginty
Copy link
Member

ginty commented Nov 1, 2018

@info-rchitect, yes it doesn't work yet, I'm saying that this is the way it should work if we add something here.

It does work that way already for functions, so this is the way we should make it work for packages also - i.e. rather than adding a :pkg_meta attribute which was the original proposal.

@info-rchitect
Copy link
Member Author

@ginty OK gotcha, I will make a PR once I get the importer done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment