Sunday, 2021-11-14

Chips4Makers[m]lkcl: Regarding by having the Platform automatically put the IO in the boundary scan. My (untested) idea is to overload the request() method of the platform and do the addition to the boundary scan in this method; e.g. not in get_input(), get_output() etc.10:41
Chips4Makers[m]This way also a parameter can be added to request() that allows to not put a requested resource in the boundary scan.10:41
lkclChips4Makers[m], i like it12:52
lkcli like it a lot12:52
lkcllet's see if it's practical.12:55
lkclthe key is the ports (self._ports)12:55
lkclhttps://git.libre-soc.org/?p=nmigen.git;a=blob;f=nmigen/build/res.py;h=fde981fcf3ad4b7427de8ac9ee2c62a1598721f0;hb=e88d283ed30448ed5fe3ba264e3e56b48f2a4982#l15312:55
lkclto find out *how many* (and what) ports were added, you'd actually need to:12:56
lkcl1) measure the length of self._ports before calling ResourceManager.request12:56
lkcl2) call ResourceManager.request12:56
lkcl3) measure the length afterwards12:56
lkclthat would tell you "N ports have been added"12:57
lkclfrom there it becomes possible to run the boundary scan addition12:58
lkclbleuch :)12:58
* lkcl thinks12:59
lkclPlatform.prepare() is what calls the actual creation of the AST Fragments12:59
lkclhttps://git.libre-soc.org/?p=nmigen.git;a=blob;f=nmigen/build/plat.py;h=c1d8fc693c0c180d56f319433889b10125ee573e;hb=e88d283ed30448ed5fe3ba264e3e56b48f2a4982#l13112:59
lkclthis is called at *build* time13:00
lkclnot at *constructor* time of the Platform instance (which derives from ResourceManager)13:00
lkcluntil build() is called - which is what calls prepare() - there is no top-level Elaboratable available13:01
lkclnothing into which those Fragments containing links from Boundary Scan to actual Top-level Module may be added13:01
lkclend result being, unless extreme care is taken (or some API / usage-assumptions made) the risk is an ordering link between platform constructor and build function13:03
lkcl(where certain things would not be possible to do)13:03
lkcloverriding ResourceManager.request overcomes one of those limitations: it allows for the creation of parallel pads resources without disrupting the expected API / usage-assumptions13:04
lkclbut the addition of Fragments in set_input/etc through additional overloads may be unavoidable (and, as best i can infer, is their purpose *to* be overloaded)13:05
lkclboth the XilinxPlatform and LatticePlatform (there are others) overload set_input/output13:06
lkcletc.13:06
*** kylel1 is now known as kylel15:49
lkclChips4Makers[m], core-pads hooks to ResourceManager.request/add_resource done.  works great16:47
lkclhttps://git.libre-soc.org/?p=pinmux.git;a=commitdiff;h=5800effaf28581e95f0a3cd9e8fd4ace07397a8a16:47
jnFor those interested: A new online event from 3mdeb has been announced on the coreboot mailing list: vPub v3, 16th November 20:00 UTC, https://vpub.dasharo.com/21:46

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!