<tnt>
From python script (in nextpnr), is there a way to know pre-pack where a SB_IO cell is going to be placed ?
<daveshah>
tnt: something like ctx.getPackagePinBel(cell.attrs["LOC"]) might work
OmniMancer has joined ##openfpga
<tnt>
No attribute LOC on the SB_IO.
<daveshah>
Oh right I think it would only be on the pin at that point, it would be quite a PITA to trace back
<tnt>
But I think I got it. Before packaing there is nextpnr auto inserter buffers and so I need to trace from SB_IO.PACKAGE_PIN to that auto instered buffer
<tnt>
and on that buffer there is a BEL attribute
<daveshah>
Do you know in advance the direction of the IO pin?
<tnt>
not really but that could be arranged I guess.
<daveshah>
If its an input then it's a case of doing cell.ports["PACKAGE_PIN"].net.driver.cell.attrs["BEL"]
<daveshah>
or inout
<daveshah>
If its an output then you need to iterate over net.users to find the $nextpnr_obuf cell
<tnt>
there should really only be one since I have manually instanciated SB_IO blocks.
<daveshah>
For outputs there would be two users of PACKAGE_PIN because of the way inouts work
<daveshah>
one would be the SB_IO and the other the autogenerated nextpnr buffer
<tnt>
Ok tx. Just for the record, what I'm trying to do is implement "automated" placement of some logic I used to implement high speed in/out serdes but the FFs used for that need to be placed at very specific placed wrt to the io site they correspond to.
<daveshah>
Oh I see, nice
<daveshah>
You could probably do that in a pre-place script?
<daveshah>
Then the BEL attribute for the SB_IO has been copied already
<tnt>
Yeah, that migh tbe easier. What was a bit annouing at first is that the LCs have been packed so my manually instanciated FFs are no longer there.
<tnt>
but I guess I can operate just as well on ICESTORM_LCs cells
<tnt>
the attributes from the FFs should have been copied to them
emeb_mac has joined ##openfpga
solo1 has quit [Ping timeout: 250 seconds]
solo1 has joined ##openfpga
Jybz has joined ##openfpga
<tnt>
Mmm, actually looks like they are _not_ always copied :/
<tnt>
so I have to do it pre-pack because I place attributes on the SB_DFF that I need in the script to know where to place them relative to each other.
<tnt>
and if those don't end up on the ICESTORM_LC, script can't do its job
<tnt>
I'm kind of wondering why some are copied and not others though.
Jybz has quit [Quit: Konversation terminated!]
rohitksingh has joined ##openfpga
<daveshah>
That's just an oversight, they should be copied
rohitksingh has quit [Remote host closed the connection]
rohitksingh has joined ##openfpga
<daveshah>
Right should be fixed now
rohitksingh has quit [Read error: Connection reset by peer]
rohitksingh has joined ##openfpga
<tnt>
daveshah: oh, that was fast, tx :) Testing right now.
genii has quit [Read error: Connection reset by peer]
rohitksingh_ has joined ##openfpga
rohitksingh_ has quit [Remote host closed the connection]
<tnt>
indeed that works :)
genii has joined ##openfpga
solo1 has quit [Ping timeout: 250 seconds]
solo1 has joined ##openfpga
Asu has quit [Ping timeout: 258 seconds]
Asuu has joined ##openfpga
Asuu has quit [Remote host closed the connection]
genii has quit [Quit: Morning comes early.... GO LEAFS GO!]