Wednesday, 2021-03-17

lkclawygle, a thought: some time in the next... 3-5 months would you be happy with a commission to implement and validate RGM-II, USB-ULPI and USB3-PIPE in nmigen?13:24
lkclagg did a basic M-II implementation in nmigen, really well13:25
lkclcesar[m]1, first integer-based predication test passes in ISACaller :)15:23
programmerjakeyay! predication!15:44
lkclCRs next20:11
lkcldone, pretty easy.20:50
lkcl(with the int predication already in place)20:51
lkcltwin-predication next but have to add srcstep-dststep first20:51
lkclirrelevant for when there's no predicate masks because20:55
lkclbut obviously for twin-predication it matters20:55
programmerjakelkcl: first step: remove all 0b prefixes:21:00
programmerjakenmigen.hdl.dsl.SyntaxError: Case pattern '0b010-' must consist of 0, 1, and - (don't care) bits, and may include whitespace21:00
lkclprogrammerjake: yes... ahhh i remember why i didn't do this21:01
lkclit's because needs to be adjusted to match21:01
programmerjakedo we need the 0b somewhere?21:01
lkclyou have to change the "opint=True" argument to Subdecoder in power_decoder.py21:01
lkcland the code is sufficiently complex that i went, "argh not doing it" at the time21:02
lkclchanging opint=True to opint=False - which is what says "is this an integer or is it a pattern with "-"s in it"21:02
lkclchanges the behaviour of Subdecoder subtly21:03
programmerjakehow about I just change it to remove the 0b prefix when there are any - characters?21:03
lkclgive it a shot21:03
programmerjakethat way we don't need opint at all21:03
lkclline 32021:04
lkclit's been a year since i looked at this so you'll have to experiment21:04
lkcl            if d.opint and '-' not in opcode:21:04
lkcl                opcode = int(opcode, 0)21:04
programmerjakesince we really should have all the csv files use the same format, and not pass in extra arguments in the parser code21:04
lkclit's just not that simple, jacob21:04
programmerjakeif a csv file needs info specific to itself, it should include the info in the csv file21:05
programmerjakeif csv isn't sufficient, we can switch to json or something21:05
lkclthe additional requirement is to not deviate from what microwatt does, significantly21:06
lkclit's bad enough that RS has moved field and that the "CR in" field is no longer a 0/121:06
programmerjakeyup, so...we have the current csv columns be a list of dicts in a json (or better yet, a toml file) and the top-level dict has that list as one field and the Subdecoder.pattern as another field21:08
programmerjakeand all the other fields of Subdecoder too21:08
lkclmaking that chance has a large cascade effect because so much depends on those CSV files21:09
lkclincluding the wiki21:09
programmerjakehaving it be json instead of csv doesn't inherently change the underlying data...21:09
lkclit's adding unnecessary work that we don't have time for21:09
lkclthere are much higher priority tasks21:09
programmerjakeif we use use toml, I'd consider the text form readable enough that we could just put that directly on the wiki21:09
lkcland then the needs updating21:11
lkcland the power_decoder.py21:11
lkcland the microwatt writing code21:11
lkcland the SV reading codce21:12
lkclso... no.21:12
lkcli've said it already: too much is critically dependent on those CSV files21:12
lkcland we have *higher priority tasks*21:12
programmerjakebasically the only code that should need to read write csv is the .py on the wiki that generates the SVP64 csvs and the all other code should be using the file so they don't see any change21:12
programmerjakenote the should be using power_decoder.py21:13
programmerjakeif they're not -- seems like bad design21:13
lkcli repeat21:14
lkclthere are *higher priority tasks*21:14
programmerjakeyeah, I get that...just complaining. I'll add a workaround to the decoder and see if that works21:14
programmerjakesummary: oh well, our code's an awful mess, we'll fix it later21:15
lkclbe *very* careful with it, and for goodness sake make sure to run all unit tests before committing21:16
lkcli really mean all21:16
lkcland simple/test/ as well as test_issuer.py21:17
programmerjakeisn't that just the full integration test and not the unit tests?21:17
lkclyes those are the full integration tests, which *use* the unit tests21:17
lkclthe single-pipeline (FU) tests use only a subset decoder21:18
programmerjake??? I thought unit tests should be independent of eachother21:18
lkclthey are21:18
programmerjakeyou just said they weren't...21:18
lkclthe independent unit tests fu/alu/test_pipe_caller.py21:18
lkclare each called *three separate times*21:18
lkclonce for FU pipeline only21:18
lkclonce when the pipeline is wrapped with a CompUnit21:19
lkcland once from which throws all of those independent unit tests at a TestIssuer21:19
programmerjakeah, k21:19
lkclthere used to be as well but it served its purpose21:19
programmerjakethis is making me think I should just add a workaround to simplev-cpp and save myself the headache...21:20
lkclTestIssuer now has a "main" PowerDecoder and there are multiple "satellite" decoder subsets (filtered)21:20
lkclit's got... very comprehensive21:20
lkcl"small" seeming changes now have very large knock-on implications21:21
programmerjakewell, before making any changes: python src/soc/decoder/isa/test_caller.py21:25
* programmerjake < >21:26
lkclthat's a HTTP link21:26
lkcl programmerjake  < >21:27
lkclyes, known problem, the answer's correct, the unit test isn't :)21:27
lkcli just haven't got round to updating it21:27
lkclbecause there's so much to do21:27
programmerjakeso, I should expect that failure21:28
lkclmore accurately: you should expect that test to incorrectly *report* failre21:28
programmerjakewell, running the other tests you specified...21:29
* programmerjake < >21:30
lkcli still can't see those messages in irc21:30
lkclthey come up as "a link has been sent"21:30
lkcl(to an offsite non-audited website)21:30
lkclah you need to install that21:31
programmerjakemissing from
lkclno, missing on your system21:31
lkclwe're not using pip3 because it's such a f*****g nuisance21:32
programmerjakewell, I just ran make develop before...if it's missing it should complain.21:32
lkclcauses no end of "ohh i fink i will install wotever s***"21:32
programmerjakeeven if it doesn't install it for you, it should at least tell you you need it...21:33
lkclthe morons running the python foundation now think it's a great idea to automatically go hunting through some random unsigned website if you happen to list the dependencies in the file21:33
lkclwithout actually asking the user if it's ok to do that21:33
lkclit's already caused enough problems for us with nmigen, nmigen-soc and other packages downloading random arbitrary versions of dependencies21:34
lkcljust install it manually but *don't* install staf's version21:35
lkcluse our version which has the pip3 crap-for-brains removed and also has DMI capability added21:35
programmerjakewell, I like cargo better since you can use git and path dependencies where it automatically uses the specified git repo or uses the specified local path. pip just doesn't support that apparently...21:36
lkclapparently it's possible21:38
lkclwhich probably means that it's possible to specify in the file as well21:38
lkclwhich... yeah. no. :)21:38
programmerjakeno it's not supported in or no you don't like it?21:39
lkcli suspect it is21:40
lkclif it can be done from the commandline21:40
lkcland correct: with so much else to do, most newcomers we would point at the dev-setup scripts21:40
programmerjakepackaging.version.InvalidVersion: Invalid version: '24jan2020'21:41
programmerjakewhen running: python develop21:41
programmerjakeit's using setuptools_scm 6.0.1 if that helps...21:42
lkcl1 sec let me check21:42
lkclinterestingly i don't have setuptools-scm installed21:43
lkclunless (argh) pip3 went and f*****g well downloaded it randomly21:43
lkclsee why i intensely dislike pip3?21:43
lkclyou have *no idea* what the hell it downloaded21:43
programmerjakeI'm on commit c71b674a067a52a26e96242c148c09999f237826 if that helps21:44
lkclcommit c71b674a067a52a26e96242c148c09999f237826 (HEAD -> master, tag: ls180-24jan2020, origin/master, origin/HEAD)21:45
lkclAuthor: Luke Kenneth Casson Leighton <>21:45
lkclDate:   Sun Oct 25 11:26:26 2020 +000021:45
lkcl    resolve issue in coriolis2 with passing nmigen expressions rather21:45
lkcl    than signals to a submodule21:45
lkcltry to find where the hell pip3 installed setuptools_scm without your consent and authorisation and remove it21:45
lkclthen "apt-get install python3-setuptools-scm"21:46
programmerjakesorry, apt-get won't help ... I'm in a virtualenv21:46
lkcli'll add that to the dev-setup-scripts21:46
programmerjakewhich version do you have?21:46
lkclthe version i had at the time was 3.4.3 (or thereabouts)21:47
lkcl /home/chroot/coriolis-buster/home/lkcl/nmigen/.eggs/setuptools_scm-3.4.3-py3.7.egg/EGG-INFO/top_level.txt21:47
lkclit _should_ be possible to put "=N.N" after setuptools_scm21:48
* lkcl just updating python3-setuptools as well21:49
lkcli got the same warning on running develop21:49
lkclit was however a warning not an error21:49
lkclstill got a warning21:49
programmerjakeah, bet it's the tag name21:50
lkclPlease see PEP 440 for more details.21:50
programmerjakethe git tag is not a valid version string21:50
lkclFinished processing dependencies for c4m-jtag===24jan202021:50
lkclahh yeah21:50
lkcl git tag --list21:51
programmerjakeI'll let you make a different tag that's a proper version string21:51
lkcl setup(21:52
lkcl     name="c4m_jtag",21:52
lkcl-    use_scm_version=scm_version(),21:52
lkcl+    #use_scm_version=scm_version(),21:52
lkclgoodbye problem21:52
programmerjakelemme know when you pushed the fix21:52
lkcledit that out and it'll work21:53
lkcli'm not too keen on deviating from what Staf's done21:53
programmerjakeso...should I also change the git tag? otherwise anyone using the tagged code will run into this issue21:53
lkcltell you what, i'll just comment out that line.21:54
lkcltoo much else to focus on21:55
programmerjakechange tag?21:57
lkclgit pull, try it21:57
programmerjakeapparently works!21:58
lkclgoood :)21:58
programmerjakeso, just re-point tag at latest commit?21:59
lkclmmm that'd probably do the trick21:59
* lkcl no idea if you can delete tags - you're not suppposed to be able to22:00
programmerjakeyou can...but git doesn't automatically sync have to explicitly ask it to22:01
lkcldang i think twin-predication with masks is working22:02
programmerjakehow about I just create a tag ls180-24jan2020-fixed22:02
lkclsure that's a good idea22:02
programmerjakecommit 8241c4fdf5d89c710b073c3a6544f7cc7c944e02 (HEAD -> master, tag: ls180-24jan2020-fixed, origin/master, origin/HEAD)22:03
programmerjakewell, food time...will work on testing soc later22:05
lkclok :)22:06

Generated by 2.17.1 by Marius Gedminas - find it at!