Tuesday, 2022-04-05

Veera[m]<lkcl> "if you can re-run it, in a new..." <- I will use hdl-yosys-tools; and rerun in a new chroot and adjust script accordingly.00:00
programmerjakeremoving xdot and graphviz from the apt install line reduced nmigen-gf's CI time from 11:37 to 8:4200:49
programmerjake@lkcl, i already removed xdot and graphviz before you responded ^01:25
lkclprogrammerjake, that's not surprising09:42
lkclVeera[m], Erik approved your account access to Silicon Server10:04
lkclalso the other server is one i've heard about which apparently has these absolutely monstrous FPGAs, 1 million LUT4s, with 25 gigabit SERDES10:04
lkclthey're intended for OpenCAPI testing apparently10:04
lkclthey're not even available for sale10:04
Veera[m]Yeah. I read my mail earlier about this. I may try after sometime.10:16
lkcldo say thank you to them!11:29
lkclprogrammerjake, i have a sneaking intuitive feeling you might find RippleLSB useful instead of attempting to use an adder and assuming that yosys will remove the XORs11:39
lkclhttps://git.libre-soc.org/?p=nmutil.git;a=blob;f=src/nmutil/ripple.py;hb=HEAD11:39
lkclgenerally it's not a good idea to rely on yosys: it's an external tool that could end up changing and be utterly broken11:40
lkclforcing us to have to critically rely on either patches or a fixed version11:40
lkclwhich in turn has serious consequences if there are two "fixes", both in different versions of yosys, that we then have to forward-port11:41
lkclall-round maintenance nightmare in other words11:41
lkclhttps://www.linkedin.com/posts/lkclnet_inspiration-leadership-activity-6875068528232333312-Jl3w?utm_source=linkedin_share&utm_medium=member_desktop_web13:12
lkcltoshywoshy, Veera[m] got the nextpnr-xilinx auto-install set up, you should be able to build ls2 for the arty-a7 (you bought one, right?)13:24
lkclmarkos, it'd be interesting to hear how you get on with the nexys_video board on that score. we'll have to add the xc7-200t to the list of binaries/databases though13:25
lkclprogrammerjake, nmutil is definitely the right place to put clmul, it's that ridiculously common13:27
markoshaven't got it yet13:27
lkclit does however need work: removing BitwiseXorReduce and replacing it with the one-line nmutil.utils.tree_reduce() function13:28
lkclmarkos, be fascinated to know how it works out. nexys4 (or, nexys_video) is supposed to be supported.13:29
markosyeah, I expect to have it early next week13:29
markosat least the board, no idea about hyperram13:29
lkclhttps://gitlab.com/nmigen/nmigen-boards/-/blob/master/nmigen_boards/nexys4ddr.py13:29
lkclneed to double-check the schematics to ensure it's the right definitions13:30
lkcldo you know where a PDF is for it?13:30
* lkcl starts looking13:30
lkclwas it this one you got? https://digilent.com/reference/programmable-logic/nexys-4-ddr/start13:31
lkclhm that's the 100t.  you got a 200t didn't you13:31
* lkcl goes to grep the irc logs13:31
lkclhttps://www.mouser.co.uk/datasheet/2/690/nexys_video_rm-846323.pdf13:34
lkclmmm mumble mumble, it'll need a nmigen-boards entry.  which won't be hard to do13:34
lkclthey're already defined here https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/digilent_nexys_video.py13:36
lkclso conversion is dead easy13:36
markosthat's the one: https://eu.mouser.com/ProductDetail/424-410-31614:19
lkclgreat, i've recorded the links to everything here https://gitlab.com/nmigen/nmigen-boards/-/issues/115:25
octaviusHas anyone had an ImportError when testing an nmigen module that uses the GTKWave nmutil functions? Not sure whether this is an issue on my end (wrong pip module perhaps?): "ImportError: cannot import name 'GTKWColor' from 'vcd.gtkw' (/usr/local/lib/python3.7/dist-packages/pyvcd-0.1.7-py3.7.egg/vcd/gtkw.py)"16:16
octaviusActually no, this is a different issue. Commenting out the gtkwave stuff, I now get a ModuleNotFoundError with nmigen.sim16:17
octaviusLooks like something's wrong with my modules, or paths16:18
markoslkcl, damn, I forgot to ask, there are 2 hyperram pmods, 64/256MB, which one should I have bought?16:47
cesaroctavius: Please update pyvcd.16:51
octaviuscesar: this is the one I installed via pip3 "pyvcd-0.1.7-py3.7.egg (0.1.7)"16:53
cesarPyPI site shows there is a 0.3.0 already.16:56
cesar0.1.7 is likely too old.16:56
octaviusThanks cesar, looks like one of scripts mucked up the version for me, updating works in a new chroot (I should probably get debian instead of devuan on this laptop)18:10
programmerjake> programmerjake, nmutil is definitely the right place to put clmul, it's that ridiculously common18:58
programmerjakethen we run into the reference code wiki underlay problem all over again...imho we should leave it in nmigen-gf because it *is* a GF(2)[X] operation. (that syntax means the ring of polynomials with coefficients in GF(2) with the pklynomial's variable being X)18:58
programmerjakelkcl ^19:08
programmerjakealso clrem is nearly just as common...it is the operation used by crcs...clmul is just a fast way of implementing clrem by a constant19:11
lkclprogrammerjake, argh yeah i grok that logic.20:24
lkclannoying sigh20:24
lkclcommit 101f6dfcd0aaa3155f56e2728a0b4b5343bd4dd5 (HEAD -> master, origin/master, origin/HEAD)20:27
lkcl    fix code luke broke20:27
lkclprogrammerjake, i was going to fix it.  i broke it, my responsibility to fix it.20:27
lkclnext time in the commit message do remember to include what was done ("added missing module argument wot luke broke")20:28
programmerjakeit's obvious from the diff, i removed the ", m" since m isn't used in the function you added it to20:31
lkclthat was a hint for you to use it to create the temporary Signals()20:32
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=784#c820:32
lkclprogrammerjake, mmmm.... you're right about Ripple().  the Mux-cascade remains (and is awful)20:34
lkcllet me try synth on it20:34
lkclurr yuk. still remains. damnit.20:35
lkclthat's a problem in Ripple that'll need to be fixed20:35
lkclok let me make some notes in the bugreport, because strategically, Ripple() is critical. it's going to be used in the set-before-first Vector instructions20:36
lkcland extensively in the PartitionedSIMD operators20:36
lkclbecause it's used in PartitionBool, PartitionedShift etc. etc.20:37
lkclso it's a huge deal you caught this now.20:37
lkclcan i leave it with you to fix Ripple() - optimise it in terms of the add-trick - and then use it in clmul?20:38
programmerjakei have an idea for how to fix ripple, converting it into a parallel prefix-sum with depth O(log N)20:39
programmerjakeripple isn't used in clmul...i'm assuming you mean cldivrem20:39
lkclyeerr.. yes!20:40
* lkcl waking up slowly20:40
programmerjake:)20:41
lkclmy mum called, woke me up, so i might as well do something20:43
* lkcl hates code that won't run as stand-alone modules20:44
programmerjakehmm...you could maybe run it using something like python -m nmigen_gf.reference.test_...20:46
lkclthe other code won't run either20:46
lkcl$ python3 gf_reference/gfpmul.py20:46
lkclTraceback (most recent call last):20:46
lkcl  File "gf_reference/gfpmul.py", line 1, in <module>20:46
lkcl    from .state import ST20:46
lkclModuleNotFoundError: No module named '__main__.state'; '__main__' is not a package20:46
programmerjakepython -m nmigen_gf.reference.gfpmul works20:49
lkclyes, that makes sense, but is a botch-job-workaround20:49
* lkcl pondering20:49
lkcllocal-imports are something that i've never been able to get my head around, and found them to be f***** irritating20:50
programmerjakepython -m nmigen_gf.reference.test_cl_gfb_gfp works, i just ran it20:50
lkclit's the fact that "python gf_reference/gfpmul.py" doesn't that's bugging me20:51
programmerjakeimho python packages have a poor design...that's why local imports don't work20:51
markoslkcl, quick one, happyram pmod, 64MB or 256MB?20:51
lkclmarkos, large as possible20:51
lkcl64 Mbit is only 8 m*byte*20:52
markosgood20:52
lkcl256 mbit is only 32 mega-*byte*20:52
lkclyou'll definitely not be able to run linux in 8 megabytes20:52
lkcl32 megabytes is pushing it20:52
markosah crap, that's MBit20:52
markos"it" is barely visible...20:53
lkclprogrammerjake, it probably made sense to the designers when they put it together, sigh20:53
lkclmarkos, yeah with RAM you really have to watch out for that.  all DDR3/4 ICs are given in terms of the total bit density *not* the byte density20:53
lkclbecause they're internally lined up in x4, x8, x16 banks20:54
programmerjakehoping they make 3D ram soon...yay 64TiB ram!20:54
lkcl:)20:56
* lkcl nggghhhh streeeeess20:57
lkclmoooo20:57
lkclwhat's the difference between20:57
lkclgf_reference/state.py and20:57
programmerjake256TiB is 131072 by 131072 by 131072 assuming 1 bit per cell20:57
lkclsrc/nmigen_gf/reference/state.py?20:57
lkclah hell, a symlink, darn it20:58
programmerjakesrc/.... is the canonical python package location that's installed using setup.py20:58
lkclyeah that's a botch-job20:58
lkclstill doesn't compute20:59
lkcl$ python3 src/nmigen_gf/reference/gfpmul.py20:59
lkclTraceback (most recent call last):20:59
lkcl  File "src/nmigen_gf/reference/gfpmul.py", line 1, in <module>20:59
lkcl    from .state import ST20:59
lkclModuleNotFoundError: No module named '__main__.state'; '__main__' is not a package20:59
programmerjakeuse -m20:59
lkclno, you're missing the point20:59
lkclfixing the layout so that it is *not* necessary to botch-workaround with "-m" is the point21:00
lkcli believe this is the thing i was talking about with package_dir in setup.py21:00
lkclthat the layout can be fixed (without the symlink) by specifying the right package_dir option21:00
* lkcl going to try this:21:01
lkcl    package_dir={"": "src", "reference": "gf_reference"},21:01
programmerjakethose files are part of a package...running directly with python file.py causes python to say effectively "oh, so you want me to pretend that file is independent of all the files around it and it isn't in a package, sure...import not found"21:01
programmerjakepackage_dir like that doesn't work, already tried21:02
lkcldrat.21:02
lkclok.21:02
lkclnext one: remove local imports, i can't stand them anyway.21:02
lkcli think find_packages() is the "dumb" function, which recursively-walks the source directory.21:03
lkcli vaguely remember doing this by hand... errr... 18+ years ago21:03
lkcleveryone doing hand-walking and explicit listing of packages "inspired" the creation of find_packages()21:04
programmerjakedo remember the files in gf_reference should be short and to-the-point since they're embedded in bitmanip.mdwn and we want to not have a bunch of spurious lines there21:04
lkclyehyeh. each line will be explicit "from nmigen_gf.reference.state import ...."21:04
programmerjakefind_packages isn't the problem, even writing my own find_packages didn't fix it21:05
lkcl@@ -1,4 +1,4 @@21:05
lkcl-from .log2 import floor_log221:05
lkcl+from nmigen_gf.reference.log2 import floor_log221:05
lkcl]21:05
lkclahh problem gone.21:05
lkclexxxcellent21:05
programmerjakesee semantics of package_dir21:05
lkcllkcl@fizzy:~/src/libresoc/nmigen-gf$ python3 gf_reference/gfpmul.py21:05
lkcllkcl@fizzy:~/src/libresoc/nmigen-gf$21:05
lkclahhh, now i'm happy21:05
lkcl+++ b/gf_reference/state.py21:06
lkcl@@ -1,4 +1,4 @@21:06
lkcl-from .log2 import floor_log221:06
lkcl+from nmigen_gf.reference.log2 import floor_log221:06
lkcllkcl@fizzy:~/src/libresoc/nmigen-gf$ python3 gf_reference/test_cl_gfb_gfp.py21:07
lkclRan 23 tests in 2.861s21:07
lkclOK21:07
* lkcl oleeeeee21:07
programmerjake> A package: dir entry in the package_dir dictionary implicitly applies to all packages below package, so the foo.bar case is automatically handled here. 21:07
programmerjakehttps://docs.python.org/3.7/distutils/setupscript.html21:07
lkcllkcl@fizzy:~/src/libresoc/nmigen-gf$ nosetests321:09
lkclRan 68 tests in 94.336s21:09
lkclOK21:09
lkclhurrah. all good21:09
programmerjakeyou're running duplicate tests cuz of both gf_reference and src/nmigen_gf/reference21:10
programmerjake`pytest -n auto src` works around that21:10
lkcli'm good with that :)21:15
lkcli don't mind.21:15
lkclmy brain seems strangely fixated on nosetests3.  some sort of automatic reaction i'm finding hard to resist :)21:16
lkclmeeting in 45m btw21:16
lkclone hour earlier21:16
lkclis that right?21:16
lkclurrr...21:16
lkcl21:00 UTC21:17
lkclhttps://www.timeanddate.com/worldclock/timezone/utc21:17
lkcllx0 jn cesar toshywoshy markos ^21:18
lkclanyone else who'd like to join let us know we can privately send the jitsi link (so it doesn't show up in public logs)21:19
lkcl[ab]using add just because carry-propagation is efficiently implemented as a well-known algorithm, sigh21:23
lkcltotally get it - also totally want to throw up :)21:23
lkclhttps://libre-soc.org/openpower/sv/bitmanip/ looks pretty frickin awesome21:25
lkclthanks to the embedded reference code21:26
lkclthe fact that it's executable code and has unit tests, that's damn cool21:26
* lkcl salutes programmerjake 21:26
lkclwhat that means in particular is, the code - which is also the documentation - sort-of becomes part of the Compliance Test Suite21:29
programmerjake:)21:35
programmerjakelkcl, the bitmanip bdep op is a vsx instruction, so we probably want to add a scalar non-vsx one rather than just having the existing one21:45
programmerjake<lkcl> "salutes programmerjake..." <- thx!21:46
programmerjake<lkcl> "that was a hint for you to use..." <- oh, i had just been using the submodule's inputs as the temporary Signals21:52

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