Friday, 2021-10-29

*** A_Dragon is now known as Awoobis11:42
kylellkcl, after some work I have been able to integrate qemu into the test runner14:17
kylelby merely passing run_qemu via a test caller14:19
kylelby utilizing a different gdb library, the debugger runs async speeding it up tremendously14:20
kylelfor example, using shift_rot_2 cases.  With expected results, no hdl...the 22 cases runs about 2 seconds14:22
kylelrunning it with qemu enabled increases it to 11 seconds14:23
rscUhm? was the OpenPower Summit re-scheduled?!15:56
lkclkylel, hurrah.  i thought - hoped - it would be that simple17:14
lkclyes, pygdbmi has some err issues shall we say.  did you find a different library from pygdbmi?17:15
lkclrsc: it was yesterday. i changed the time of the calendar announcement but not the day.  wark-wark :)17:16
lkclkylel, you saw how much of a royal pain FP register access was, though, right?17:21
lkcli had to *cry* use VSX registers to be able to set the binary/hex contents of FP registers17:22
kylellkcl, yeah python-gdb-ctrl which also needs pexpect.  They are unobtrusive, don't cause pip hell.17:22
lkclthis turns out to be a limitation of gdb17:22
lkclok then those need to be added to install-hdl-reqs17:22
kylelI do a conditional import (which I'm not sure you are ok with) so without them tests without qemu should work...maybe?17:23
lkclyeah perfectly fine as long as one of them works and doesn't interfere with the other17:23
lkcli.e. they're a common API, doesn't matter which one is ultimately used, _great_17:24
kylelAnd yeah, it is register hell...geesus. Funny story on that I'll get into later.  Anyways if you are ok with all that, I can get to committing.  I'll email the list, there are a couple caveats.17:25
lkclsyre17:25
lkcljust make sure existing tests work17:25
rsclkcl: and they didn't publish many announcements about it? ;-(17:26
lkclrsc, yep, i know.  quite odd17:26
rsclkcl: looks like they lost the "Open" in "OpenPower" here a bit ;-(17:26
lkclkylel: openpower-isa simulator/test_sim.py is one example17:27
* lkcl ponders17:27
kylelI'll also need your help with a bug that has crept in when qemu is used in regards to comparing states.  But not using qemu it doesn't show up.17:27
lkclhmmm17:27
lkcli wonder...17:27
lkclif python-gdb-ctrl should be an entirely different "Test API instance"17:28
lkclthinking about it, that would probably be preferable17:28
lkclto give different options, because pygdbmi is "networked", it can connect to e.g. power-gem5, or cavatools, or, anything-that-supports-remote-network-gdb-protocol17:29
lkclah, if comparing states by single-stepping works *at all* in qemu it is a miracle17:29
lkclalso, you have to load the program into a specific address 0x2000000 something like that17:30
lkclbecause qemu runs with some BIOS in lower memory locations *sigh*17:30
* lkcl can't remember the exact details there17:30
kylelYes, program loads at 0x20000000.  So who knows what it does for memory, I haven't made it that far yet.17:31
lkclmemory is at location specified, defaults to 0x0000 unless otherwise given17:32
lkcland as long as you use *really small* programs it's ok17:32
kylelBut yeah, it runs the test and I create a state object that compares.  shift_rot mostly passes...would totally pass without bug.17:32
lkclall unit tests limit memory tests to around 16 words maximum, something like that17:32
lkclthat's intriguing in and of itself17:33
kylelYeah, well they write starting at location 0 don't they?17:33
lkclthe specification for memory objects can be three different kinds:17:37
lkcla straight list (this assumes 8-byte)17:37
lkcla list of tuples (address, data-8-byte)17:37
lkcla dictionary (key:address value:data-8-byte)17:38
lkclso watch out for that17:38
kylelthe qemu_ctrl class is separate...basically a bastardized version of what is in /simulator hacked for async.17:40
kylelbut it can pretty much stand on its own for other targets17:41
kylelbut (while this did take a fair amount of work) was an interesting exercise and actually exceeded my expectations on how well it works.17:44
kylelCan you explain an entirely different "Test API instance"?17:51
lkcldon't modify qemu.py19:00
lkclcreate a totally and completely separate and distinct qemu_that_uses_python_gdb_ctrl.py19:01
lkcldo not modify class QemuController19:01
lkclcreate a totally different and completely separate class QemuControllerUsingGdbCtrl19:01
lkclallow a runtime option to select19:02
lkclEITHER19:02
lkclQemuController19:02
lkclOR19:02
lkclQemuControllerUsingGdbCtrl19:02
lkclso now there are FOUR options.19:02
lkcl1) HDL19:02
lkcl2) Simulator19:02
lkcl3) QemuController19:02
lkcl4) QemuControllerUsingGdbCtrl19:02
lkclthat is what constitutes "different test API instance"19:02
kylelAh, ok, that's what I did.  Made it totally separate and left the original alone.19:11

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