*** A_Dragon is now known as Awoobis | 11:42 | |
kylel | lkcl, after some work I have been able to integrate qemu into the test runner | 14:17 |
---|---|---|
kylel | by merely passing run_qemu via a test caller | 14:19 |
kylel | by utilizing a different gdb library, the debugger runs async speeding it up tremendously | 14:20 |
kylel | for example, using shift_rot_2 cases. With expected results, no hdl...the 22 cases runs about 2 seconds | 14:22 |
kylel | running it with qemu enabled increases it to 11 seconds | 14:23 |
rsc | Uhm? was the OpenPower Summit re-scheduled?! | 15:56 |
lkcl | kylel, hurrah. i thought - hoped - it would be that simple | 17:14 |
lkcl | yes, pygdbmi has some err issues shall we say. did you find a different library from pygdbmi? | 17:15 |
lkcl | rsc: it was yesterday. i changed the time of the calendar announcement but not the day. wark-wark :) | 17:16 |
lkcl | kylel, you saw how much of a royal pain FP register access was, though, right? | 17:21 |
lkcl | i had to *cry* use VSX registers to be able to set the binary/hex contents of FP registers | 17:22 |
kylel | lkcl, yeah python-gdb-ctrl which also needs pexpect. They are unobtrusive, don't cause pip hell. | 17:22 |
lkcl | this turns out to be a limitation of gdb | 17:22 |
lkcl | ok then those need to be added to install-hdl-reqs | 17:22 |
kylel | I do a conditional import (which I'm not sure you are ok with) so without them tests without qemu should work...maybe? | 17:23 |
lkcl | yeah perfectly fine as long as one of them works and doesn't interfere with the other | 17:23 |
lkcl | i.e. they're a common API, doesn't matter which one is ultimately used, _great_ | 17:24 |
kylel | And 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 |
lkcl | syre | 17:25 |
lkcl | just make sure existing tests work | 17:25 |
rsc | lkcl: and they didn't publish many announcements about it? ;-( | 17:26 |
lkcl | rsc, yep, i know. quite odd | 17:26 |
rsc | lkcl: looks like they lost the "Open" in "OpenPower" here a bit ;-( | 17:26 |
lkcl | kylel: openpower-isa simulator/test_sim.py is one example | 17:27 |
* lkcl ponders | 17:27 | |
kylel | I'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 |
lkcl | hmmm | 17:27 |
lkcl | i wonder... | 17:27 |
lkcl | if python-gdb-ctrl should be an entirely different "Test API instance" | 17:28 |
lkcl | thinking about it, that would probably be preferable | 17:28 |
lkcl | to give different options, because pygdbmi is "networked", it can connect to e.g. power-gem5, or cavatools, or, anything-that-supports-remote-network-gdb-protocol | 17:29 |
lkcl | ah, if comparing states by single-stepping works *at all* in qemu it is a miracle | 17:29 |
lkcl | also, you have to load the program into a specific address 0x2000000 something like that | 17:30 |
lkcl | because qemu runs with some BIOS in lower memory locations *sigh* | 17:30 |
* lkcl can't remember the exact details there | 17:30 | |
kylel | Yes, program loads at 0x20000000. So who knows what it does for memory, I haven't made it that far yet. | 17:31 |
lkcl | memory is at location specified, defaults to 0x0000 unless otherwise given | 17:32 |
lkcl | and as long as you use *really small* programs it's ok | 17:32 |
kylel | But yeah, it runs the test and I create a state object that compares. shift_rot mostly passes...would totally pass without bug. | 17:32 |
lkcl | all unit tests limit memory tests to around 16 words maximum, something like that | 17:32 |
lkcl | that's intriguing in and of itself | 17:33 |
kylel | Yeah, well they write starting at location 0 don't they? | 17:33 |
lkcl | the specification for memory objects can be three different kinds: | 17:37 |
lkcl | a straight list (this assumes 8-byte) | 17:37 |
lkcl | a list of tuples (address, data-8-byte) | 17:37 |
lkcl | a dictionary (key:address value:data-8-byte) | 17:38 |
lkcl | so watch out for that | 17:38 |
kylel | the qemu_ctrl class is separate...basically a bastardized version of what is in /simulator hacked for async. | 17:40 |
kylel | but it can pretty much stand on its own for other targets | 17:41 |
kylel | but (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 |
kylel | Can you explain an entirely different "Test API instance"? | 17:51 |
lkcl | don't modify qemu.py | 19:00 |
lkcl | create a totally and completely separate and distinct qemu_that_uses_python_gdb_ctrl.py | 19:01 |
lkcl | do not modify class QemuController | 19:01 |
lkcl | create a totally different and completely separate class QemuControllerUsingGdbCtrl | 19:01 |
lkcl | allow a runtime option to select | 19:02 |
lkcl | EITHER | 19:02 |
lkcl | QemuController | 19:02 |
lkcl | OR | 19:02 |
lkcl | QemuControllerUsingGdbCtrl | 19:02 |
lkcl | so now there are FOUR options. | 19:02 |
lkcl | 1) HDL | 19:02 |
lkcl | 2) Simulator | 19:02 |
lkcl | 3) QemuController | 19:02 |
lkcl | 4) QemuControllerUsingGdbCtrl | 19:02 |
lkcl | that is what constitutes "different test API instance" | 19:02 |
kylel | Ah, 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/!