Friday, 2021-09-24

lkclBen: https://libre-soc.org/irclog/%23libre-soc.2021-09-22.log.html#t2021-09-22T17:00:0000:00
lkclwhoops supposed to be on the Microwatt channel...00:00
lkclkylel, nice!17:33
lkclopenpower/decoder/isa/test_issuer.py can be renamed.... i'll do that17:33
lkclthe interesting one now will be to actually use the shift_rot_cases.py *in* TestIssuer17:36
lkcli'll try that17:36
programmerjakelkcl, what do you think of the new format for budget-sync csvs?17:42
lkcli haven't had a chance to look, am in the middle of sorting the test api17:43
lkclgimme a sec :)17:44
programmerjakek17:44
programmerjakeif your happy please close https://bugs.libre-soc.org/show_bug.cgi?id=63117:45
lkclwilldo17:45
lkclgot that open17:45
programmerjakeexample csv from the new test: https://git.libre-soc.org/?p=utils.git;a=blob;f=src/budget_sync/test/test_write_budget_csv.py;h=2a1bb41cf346d6f4c825c0922b743a8a7aeae457;hb=d9408da49b5c87d9f3bafc0ab1ab41d33b608839#l7017:47
lkclthose column names are far too long17:48
lkclexcluding can be shortened to excl17:48
lkclincluding can be shortened to inc17:48
programmerjakek17:49
lkclyou can see how it scrolls 4-5x further than the width of the source code17:49
lkclwhich means, correspondingly, that the spreadsheet will be off of Bob's page17:49
lkclthen17:49
lkclif he tries to "shrink" the columns, everything gets listed as fixed_bu...17:49
lkcland "submi...."17:50
lkcland so on17:50
programmerjakek17:50
lkcllong descriptive names are fine for programmers doing database fields (where the fields are listed horizontally)17:50
programmerjakemakes me think the csv could be easier to view if it could be transposed17:51
lkclit's just one of those things - spreadsheets weren't really designed for this..17:51
lkclah!17:51
lkclyes17:51
lkclgood idea17:51
lkclha, except, did you hear about the UK government "database" that "crashed"?17:52
lkclthe morons were adding one entry *per column* and when that got beyond 65535 entries in the "database", Microsoft Excel crashed17:52
lkcl:)17:52
programmerjakeyou mean their excel spreadsheet that only supported 65536 entries and just dropped everything after?17:52
lkcluhhuh... :)17:53
programmerjakewell, good unintentional method of having lower case counts ...17:53
programmerjakethough whoever designed that is either ill-informed or was having nightmares from being forced to use excel17:55
programmerjakeor something...17:55
programmerjakeluckily python supports more than 65536 columns so we don't loose data due to stupid excel17:56
programmerjakemakes me wonder if libreoffice supports >65536 columns17:57
ghostmansdlkcl, programmerjake, I'm going to take a look at XLEN at place where we left last time; could you, please, share state of art?17:58
lkclghostmansd, jacob did BCD, that was er i think about it?17:59
programmerjakelast I looked at it, i finished the bcd instructions...lkcl should know the rest17:59
ghostmansdlol :-D17:59
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=68418:00
ghostmansdlkcl: BCD is done, ask Jacob; programmerjake: BCD is done, ask Luke :-D18:00
ghostmansdLike it18:00
lkcli can't remember! so much has happened since!18:01
ghostmansdOk, what works do we have left? After two weeks, it's somewhat vague18:01
lkclbugracker == friend18:01
lkclhttps://bugs.libre-soc.org/show_bug.cgi?id=67118:01
* lkcl trying to sort something out with shiftrot18:01
ghostmansdRecent comments are all about BCD, and there are 60+ other comments...18:02
ghostmansdOk, will take a look through in weekends18:02
ghostmansdA summary what works we have left would be nice, though18:04
programmerjakelkcl, libreoffice is apparently even sadder than excel, only supports 1024 columns assuming their faq is up-to-date: https://wiki.documentfoundation.org/Faq/Calc/02218:04
lkclghostmansd, i'm right in the middle of something that i've just broken18:05
lkcland might have just fixed18:05
lkcl1 sec18:05
lkclhttps://git.libre-soc.org/?p=openpower-isa.git;a=shortlog18:05
lkcli think basically i pulled over TRAP instructions, and comparefixed, that was pretty much it18:06
lkcli noted an issue with XLEN=8 for anything with 16-bit immediates18:07
lkclnothing else done except as jacob said, he did the BCD test.18:07
lkclwe had a couple of new people join, i've been kept occupied keeping them busy18:07
programmerjakelkcl, if the call to unittest is anything more than just calling unittest.main(), then that makes the tests not visible to `python -m unittest` or `pytest` or other testers18:09
programmerjakeso, changing it to runner.run(suite) isn't acceptable imho18:10
lkclwell, this is going to be different. command-line options which specify, at runtime, whether to run with microwatt, power-gem5, ISACaller18:10
lkcletc. etc.18:10
lkcland it's intended for interactive running.18:11
lkclit's not actually intended for non-interactive test running, at all.18:11
lkclif it does, that's a nice (lower-priority) bonus18:12
programmerjakewell, i think having that selected by an env var might be better...that allows existing test runners (such as vscode's unittest integration) to keep working18:12
programmerjakee.g.:18:16
programmerjakedef get_testers():18:16
programmerjake    return os.environ.get('LIBRE_SOC_TESTERS', 'sim pia qemu')18:16
programmerjakeyou do realize that without it being visible to unittest, it will be a pain to maintain the CI and also will make it very hard to test everything since we will have to manually run each test .py file18:25
programmerjakeand somehow figure out what the correct up-to-date list of files is18:26
programmerjakeI specifically rely on being able to run tests with pytest in order to run them quickly by parallizing them, the code you wrote bypasses that making it impossible to parallelize via pytest18:28
lkclit's never been successfully run by non-interactive testing, ever - not since it was first committed over 15 months ago19:58
lkcla *different* file - importing the exact same unit tests - could be added which is non-interactive19:58
programmerjakeiirc it worked when i last tried it...19:59
programmerjakei specifically remember using vscode's unittest integration to run tests19:59
programmerjakeand i used pytest to run tests when i built the xlen-ified bcd opcodes20:00
programmerjakebudget-sync: is this short enough:20:02
programmerjakebug_id,excl_subtasks,inc_subtasks,req_excl_subtasks,paid_excl_subtasks20:02
programmerjakelkcl ^20:02
programmerjakeoh, whoops, missed fixed_excl_subtasks and inc20:04
programmerjakecopy-paste error20:04
programmerjakecorrect list:20:09
programmerjakebug_id,excl_subtasks,inc_subtasks,fixed_excl_subtasks,fixed_inc_subtasks,req_excl_subtasks,paid_excl_subtasks20:09
programmerjakepushed:20:11
programmerjakehttps://git.libre-soc.org/?p=utils.git;a=blob;f=src/budget_sync/test/test_write_budget_csv.py;h=a95a686d54382d29b603b6a2b271451c7a0e04c3;hb=2302cf2a662b15097a64312b399b902c560d46c9#l7020:11
programmerjakealso changed config toml format to:20:13
programmerjake[people."lkcl"]20:13
programmerjakeemail = "lkcl@lkcl.net"20:13
programmerjakealiases = ["donated", "luke", "Luke", "Luke Leighton"]20:13
programmerjakefull_name = "Luke Kenneth Casson Leighton"20:13
programmerjakeinstead of:20:14
programmerjake[people."Luke Kenneth Casson Leighton"]20:14
programmerjakeemail = "lkcl@lkcl.net"20:14
programmerjakealiases = ["lkcl", "donated", "luke", "Luke", "Luke Leighton"]20:14
programmerjakeoutput_markdown_file = "lkcl.mdwn"20:14
Las[m]I want to commit https://github.com/ngi-nix/libresoc-litex/commit/a3106935913b18140fdf3b85ce802a2e7566f49b to the libresoc-litex repository20:18
lkclprogrammerjake, looks good. i liked the transpose idea20:27
lkclnice idea20:27
programmerjakeLas, looks good, pushed20:28
lkclLas[m], hmmm, given florent's atrocious behaviour i'm very reluctant to advertise his work as the primary repository20:28
lkclLas[m], ah ok, it wasn't a "nix" related issue20:29
Las[m]lkcl: What do you mean?20:29
Las[m]programmerjake: Thanks!20:29
lkclLas[m], florent caused us immense problems by making an official complaint to the OpenPOWER Foundation.20:29
programmerjakeoh, icr hearing about that...20:30
lkclthe only reason i hadn't made a formal complaint about his atrocious behaviour was because i didn't have time20:30
Las[m]Yeah, but where am I advertising that his work is the primary repository?20:30
Las[m]Who would you complain even to?20:30
lkclLas[m]: i saw "nix" and thought you were committing a nixos .nix file to the libresoc-litex repository20:31
lkcli'd be happy to create a special separate repo on git.libre-soc.org for a nix thing, if that helps20:31
lkclin the meantime i'll add you write perms to libresoc-litex20:32
lkcldone20:32
lkclyou can push that commit adding the gcc triple20:33
programmerjakelkcl: too bad the csv transpose idea isn't realistic, everything expects headers on the top row, not the left column20:33
lkclaww shame20:33
lkcloh yeah good point20:33
programmerjakealready pushed the gcc triple commit20:33
lkclprogrammerjake, ah magic20:34
lkclthx20:34
Las[m]lkcl: this is what you use branches for20:34
lkclMe and Mr Branch are... Not Best Friends :)20:35
lkcli'm happy with people using them though, for review, then push to master20:36
lkclas long as the work they do is not left "hanging" in limbo for days/weeks.20:36
lkclpeoples' work getting "isolated" in branches makes me nervous.20:37
programmerjakefyi i'll be busy all weekend because of my mom's birthday party20:40
lkcloh nice!20:40
programmerjake:)20:40
lkclkylel, https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=e783319282b6bde093a7ef2e1b86dbaf6e8f466720:51
lkclyou happy to continue that theme ^20:51
lkcljy20:54
lkclkylel: ah nice, i saw you added a SimRunner to state.py20:54
lkclpretty similar20:54
lkcltry to keep the diffs of the same kind of "minimally-visually-obvious"20:55
lkclinitially20:55
lkclthen we can do code-shuffles and move blocks around after20:55
kylelSimRunner makes more sense in test_runner, tbh figured it could get moved wherever after the fact20:57
lkclfor now it does, yes (given the minimal-diffing technique for checking the code's ok)20:58
lkclcode "disappearing" from one repo then "reappearing" in another... mmm....20:58
lkclultimately i'd like the entirety of test_runner.py to move into the openpower-isa20:58
lkclbut20:58
lkclanything HDL-related to *remain* in soc simple/test/test_runner.py20:59
lkcl(or some other more appropriate file)20:59
lkclbecause, well, duh, it's HDL-related20:59
lkclbtw feel free to modify the args for StateRunner as you see fit21:00
lkcljust bear in mind that whatever args are added, *all* XXXXRunners (SimRunner, HDLRunner, QemuRunner, MicrowattRunner) *have* to know those arguments21:00
lkclrun_hdl_state should be called from HDLRunner's run_test()21:01
lkclso....21:01
lkclissuer, pc_i and svstate should be moved into HDLRunner21:02
lkclbut21:02
lkclrun_hdl_state takes only "instructions" but run_sim_state takes instructions, gen, insncode21:02
lkclso... should we simply pass in the test and duplicate the gen, insncoed and instructions list/assembly/zip?21:03
lkclor...21:03
lkclpass all 3 arguments to both SimRunner.run_test() and SimRunner.run_test()?21:03
lkcli leave it with you to decide?21:05
* lkcl got a preliminary SIMD (Partitioned) "Cat" working21:06
lkclneed to do a Formal Correctness Proof for it. should be straightforward to do, with a for-loop Switch/Case for each option.21:07
lkclkylel, oh nice job on the shiftrot cases btw21:09
lkclyou saw i added them to the HDL test_issuer.py already and they passed perfectly.21:10
lkclran against the HDL *and* Simulator *and* ExpectedState in each case.21:10
lkclwhich is pretty cool21:10
lkclthe Big Job: converting the ennntiiiire unit test infrastructure, every test_caller*.py, over to the same style... urrrr21:11
lkclghostmansd, oh btw the Grant Application for cavatools (etc.) passed the 1st approval phase21:12
lkcl(yay)21:12
ghostmansdYay!21:13
ghostmansdBTW, how long does it take for NLnet to proceed the reports?21:14
ghostmansdI have no e-mails or anything else from them, should I worry? :-)21:15
kylellkcl, yeah I saw you moved them around.  One of the cases tested carry and it failed without adding it to the expected state.21:49
kylelone of those hey cool moments.  sometimes I'm easily amused.21:50
Las[m]I'm trying to build for my Versa ECP5, and I get this weird error: https://gist.github.com/L-as/04f603eb2f9a7c58c97249318f52c35122:00
Las[m]The important part seems to be "ERROR:SoCCSRHandler:Not enough Locations." on line 6622:00
lkclLas[m], that'll be from using the "latest version"22:46
Las[m]lkcl: of what?22:46
lkclthere are blocks of memory addresses allocated for CSRs (Control Status Registers)22:46
lkcllitex22:47
Las[m]ah, yosys?22:47
Las[m]I'm not though22:47
lkclintriguing22:47
lkclthere is only a certain amount of address range available22:48
lkcland for whatever (unknown) reason, litex is requesting too many peripherals22:48
lkclfirst peripheral requests some of the address space, receives it, takes up 20%22:48
lkclsecond peripheral, takes up another 20%22:48
lkcletc. etc.22:48
Las[m]Could it be an issue with Yosys? I'm using a new version it seems.22:49
Las[m]Will have to figure out what the version I'm supposed to be using is.22:49
lkclas there are too many peripherals - and i cannot tell you why - litex is simply requesting too many.22:49
lkclcommit 35929c0f8a8f1cc098a6b6ebb569caca8df8c08d (HEAD -> master, tag: 24jan2021_ls180, origin/master, origin/HEAD)22:49
Las[m]What peripherals are not supposed to be there?22:50
lkcli don't know.22:50
lkcli run the command, just like you did, except it succeeds22:50
lkcllitex is... fragile.22:51
lkclno it's nothing to do with yosys. yosys is not in the least bit involved.22:51
lkclyosys is a tool which takes verilog and other HDL and processes it22:51
lkcllitex *generates* HDL22:52
Las[m]Unrelated: What version of Yosys am I supposed to be using? In `hdl-tools-yosys` it just uses master.22:52
lkclthat should do22:52
Las[m]Great.22:52
lkclwe ran into difficulties with yosys sram representation but solved it by not using ilang, as i described last week22:53
Las[m]Yeah22:53
Las[m]LiteX is really troublesome22:53
Las[m]Don't get why backward compatibility is not a concern in the slightest22:54
lkclit.... i mean, it's a great idea22:54
lkclbecause it's too much trouble22:54
lkclit's actually a massive extremely sophisticated multi-layered program, does one hell of a lot22:55
lkclcombines the resources of a hell of a lot of things22:55
lkclsuch as auto-generation of Makefiles for creating verilator peripherals22:55
lkclyou request "i want simulated peripheral X" it gives you... simulated peripheral X22:56
lkclunnfortunately, it's built on extremely fragile foundations: migen22:56
lkclwhich provides absolutely no error-checking or deterministic behaviour of any kind.22:56
lkclyou make one mistake and it can be several *days* before you find the error22:57
lkclat the end of a massive VLSI compile for example22:57
lkclwe won't be using it again22:58
Las[m]Even with the exact same version of LiteX as what you're using, I get the same error.22:59
lkcl1 sec22:59
Las[m]Maybe you're using a special version of litex-boards?22:59
lkclnaah22:59
lkclwith the hassle that litex brings? last thing we need is "special" versions of *anything*23:00
Las[m]Can you check the revision at least?23:00
lkclINFO:SoCCSRHandler:32-bit CSR Bus, 32-bit Aligned, 4.0KiB Address Space, 2048B Paging, big Ordering (Up to 8 Locations).23:01
lkclthe corresponding line i have is23:01
lkclress Space, 2048B Paging, big Ordering (Up to 32 Locations).23:01
lkcl>>>>> 32 Locations <<<<<<<23:02
Las[m]that didn't come through23:02
Las[m]what23:02
lkclthat's why you're running out of "Locations"23:02
lkclhttps://gist.github.com/L-as/04f603eb2f9a7c58c97249318f52c35123:02
Las[m]Where is the amount of locations defined?23:02
lkclgrep the source code to find it...23:04
lkcl(welcome to debugging of litex...)23:04
lkclhttps://git.libre-soc.org/?p=litex.git;a=blob;f=litex/soc/integration/soc.py;h=54f969c918abc32be5e900980344637446bbd3a9;hb=35929c0f8a8f1cc098a6b6ebb569caca8df8c08d#l54423:05
lkclself.n_locs23:05
lkclcalculated here23:05
lkclhttps://git.libre-soc.org/?p=litex.git;a=blob;f=litex/soc/integration/soc.py;h=54f969c918abc32be5e900980344637446bbd3a9;hb=35929c0f8a8f1cc098a6b6ebb569caca8df8c08d#l48623:05
lkclok for some reason, you only have 4k Address Space23:06
Las[m]hmmm23:06
lkclINFO:SoCCSRHandler:Creating CSR Handler...23:06
lkclINFO:SoCCSRHandler:32-bit CSR Bus, 32-bit Aligned, 4.0KiB Address Space,23:06
Las[m]How much do you have?23:06
lkclwhereas i have 16k23:06
lkclINFO:SoC:32-bit CSR Bus, 32-bit Aligned, 16.0KiB Address Space23:06
Las[m]what23:06
Las[m]Why is the message different23:07
Las[m]Why isn't yours SoCCSRHandler23:07
lkclgiven that i did this months ago, i have no idea at all23:08
lkclah 1 sec23:10
Las[m]Can you try building it again?23:10
lkclare you running from soc/litex/florent?23:10
lkclor from the stand-alone repo, libresoc-litex?23:10
lkclnope, no, only one git difference, and that's the README.23:11
lkclfalse alarm23:11
lkclwhat exact command are you running?23:12
lkcloh hang on23:14
lkclyou're using python 3.923:15
lkclplease don't do that23:15
lkcluse the version of python for which everything has been tested23:15
lkclwhich is python 3.723:15
lkcli see the default argument csr_address_width actually gets through (12)23:16
lkclso 1<<12 is being used which is 409623:16
lkclwhereas for whatever reason, probably something to do with python 3.7, csr_address_width is *not* being set and the default value is used23:17
lkclwhich gets set to 1<<1423:17
lkclwhich is 16384 aka 16k23:17
lkcltry hacking this line:23:18
lkcl        kwargs['csr_address_width'] = 12 # limit to 0x800023:18
lkclset it to 1323:18
lkclor 1423:18
Las[m]I didn't realize Python 3.7 was supposed to be used...23:36
Las[m]Will try23:36
Las[m]thanks23:37

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