IRC logs for #openrisc Monday, 2013-08-05

--- Log opened Mon Aug 05 00:00:57 2013
poke53281I have updated the emulator image of jor1k a little bit. Squeezed everything into 7MB. Take a look: https://github.com/s-macke/jor1k/wiki/Explore-the-emulator00:32
poke53281It includes even the Monkey Island Demo00:37
poke53281But takes a while to load00:37
poke53281For the direct link: http://s-macke.github.io/jor1k/00:39
poke53281stekern: It is much faster than you know from the other page. Thanks to a few patches you send on the mailing list I could finally reenable the TLBrefill01:19
stekernpoke53281: nice!02:21
poke53281Wanted to post on the Scummvm forum. As newbie no URLs allowed. My first mail was detected as spam (Come on, just three links). Now I have to contact the administrator to not be banned.02:29
poke53281Arghh02:29
poke53281Well, honestly my mail is spam for the OpenRISC project and the emulator. But at least it is on-topic. ;)02:42
stekernmi is actually running faster than I'd expected03:07
stekernso, how did you build scummvm for openrisc?03:11
stekernis it using directfb?03:12
poke53281libsdl03:14
poke53281and libsdl uses the framebuffer.03:14
poke53281But in the image are also the directfb libraries with some demos.03:14
poke53281What is missing is a correct times which is synchonized with the actual time passing.03:15
stekernah, I see03:16
poke53281And stekern: This emulator is pretty much optimized. And with asm.js support it will be even faster. At the moment there is not so much difference.03:16
stekernwhat's asm.js?03:17
poke53281assembler for Javascript :)03:17
poke53281http://asmjs.org/03:17
poke53281a sub-set of javascript which can be optimized pretty well. Half the speed of a native compiled program.03:18
poke53281Firefox is the first that supports it.03:18
poke53281https://github.com/s-macke/jor1k/blob/master/js/worker/fastcpu.js03:18
stekernthat's impressive03:18
poke53281This is the code you have to write.03:18
poke53281Looks not so much different but there are lot of differences.03:19
poke53281Even "if ((a==b) && (c==d))" is not allowed03:19
poke53281instead of "nextpc++" I have to write "nextpc = nextpc + 1|0;"03:20
poke53281no arrays, just a heap which I have access with integers as pointers.03:20
poke53281The nice part is, that the emulator has not to be changed much. It has to emulated machine code. So it fits already pretty well in the asm.js syntax. I did the port within one day.03:22
stekerncool03:32
stekernso what kind of performance do you expect (roughly, in term of MIPS)03:33
poke53281My friend got 70MIPS running the "fbdemo". I get something around 50MIPS. But it depends strongly on the program which is running. Sometimes I get only 15MIPS.03:34
poke53281So it has to with the number of memory accesses I think.03:34
poke53281The data access can still be optimized like the instruction access.03:35
poke53281Or it depends on the number of device accesses. Here, the program has to leave the asm.js environment.03:36
poke53281I don't know but will find out.03:36
stekernyeah, it's a bit the same as a "real" implementation, memory accesses will always be a bottle neck03:37
poke53281The speed of a 486 should be possible. Maybe I have already reached it.03:38
poke53281Oh, big endian to little endian conversion takes some time.03:38
poke53281Especially 8 bit and 16 bit accesses are slow under Javascript.03:39
poke53281And I could remove one command in the main loop if we remove the delayed jump.03:39
stekernyou can build the toolchain without the delay slot03:40
stekernbut you'll have to patch the kernel03:41
poke53281but I don't trust the assembler code already written03:41
poke53281Exactly.03:41
stekern(and uclibc)03:41
poke53281At the moment the whole instruction fetch is handled with this code:03:43
stekernso probably more pain than gain in that03:43
poke53281if ((checkpc ^ this.pc) >> 11)03:43
poke53281{03:43
poke53281handle wrong page03:43
poke53281}03:43
poke53281ins = int32mem[(this.instlb ^ this.pc)];03:43
poke53281two lines most of the time.03:43
poke53281I have to the same for the data accesses.03:43
stekernI just found the bug causing mor1kx to crash when hw tlb reload is turned off03:43
poke53281Well, 5% should be possible without delayed slow.03:44
poke53281delayed slot03:44
stekernsomehow the instruction stream isn't blocked on a tlb miss exception, this doesn't matter so much in most cases, except when the instruction at the wrongly translated address is an l.rfe03:44
poke53281with the endianess I don't know. 0%-100% maybe03:44
poke53281So, you handled the instruction l.rfe like it would have a delayed slot?03:51
stekernno, it's just that the l.rfe is being fetched and passed through the pipeline even though it shouldn't03:52
stekernI think I've got the right fix for that up my sleeve though =P03:55
mor1kx[mor1kx] skristiansson pushed 1 new commit to master: https://github.com/openrisc/mor1kx/commit/1d7f430d40cabaa7ef511ae2a31890a477c8cf4004:07
mor1kxmor1kx/master 1d7f430 Stefan Kristiansson: cappuccino/fetch: prevent instructions to propagate on tlb miss/pagefault...04:07
poke53281"Error at undefined:undefined: undefined " Error message I got from the Internet Explorer. Wonder why Microsoft is still making profit.04:29
stekernthey make profit, because often it is enough to fool one person in a company to get their products used company wide04:44
stekernbah, still crashes on atlys with 3.11 and hw tlb reload disabled06:41
blueCmd*yawn* writing the thesis report isn't really loads of fun15:23
mschulzewhat's a thesis report?15:32
blueCmdmschulze: the final thing I have to do until I get my masters15:33
mschulzeblueCmd: I finished my bachelor thesis last week :-) so i feel with you. yes, the coding part was much more fun.15:34
blueCmdindeed15:35
blueCmdand congrats! :)15:35
mschulzethanks!15:36
stekerna fix have been committed for the bug in gcc that prevented us from having a native gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1208122:23
hnoOh, nice turnaround time on that one.. filed 2003-08-2722:30
stekern=P22:30
stekernI'm just happy it got resolved, and at least me poking at the bug report had some effect22:31
stekernit didn't get to celebrate 10 years anniversery... so close, so close22:32
hnoyou are poking too hard, let things mature first!22:36
--- Log closed Tue Aug 06 00:00:59 2013

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!