Open info-rchitect opened 6 years ago
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.
@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 } } }
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 }
@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]]]"}}}}
@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.
@ginty OK gotcha, I will make a PR once I get the importer done.
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.
The current package scoped attributes list is:
Should we add a
:pkg_meta
attribute similar to the existing functionally scoped:meta
attribute?