#milkymist IRC log for Saturday, 2011-09-24

wpwraklet's see what scale factor i have to apply ...00:00
wpwrakhmm .. about 300. so with better supported gcc, the all the compilations together should take roughly 200 ms. plus file system delays, whatever they are00:08
wpwrakthe problem with the scanner is that it uses strcmp a LOT. this seem to be made worse by strcmp not being a built-on, so you get a function call each time00:12
wpwrakwell, let's be conservative and say about 500 ms. definitely under 1 s.00:15
kristianpaulsi bad comparate two strings a LOT?00:18
kristianpaulif you do that too often you mean you need something else elaborate instead (a library) ?00:19
wpwrakyou need a tokenizer :)00:19
wpwrakand a decent data structure for the identifiers00:19
wpwrakwell, you can skip the tokenizer and just do the data structure. that's the key thing.00:20
wpwrakthen each strcmp(foo, bar) becomes foo != bar00:21
wpwrakinitialization may be a bit of a problem, because there are quite a lot of pre-defined items. so it would be good to do this only once, not for each individual compilation run. (actually, i need to see if this isn't already happening)00:22
kristianpaul(foo != bar) that seems to speed up :)00:24
wpwrakyeah, it usually does. particularly if strcmp isn't a built-on :)00:24
wpwrak(built-in = carefully optimized inline function)00:24
wpwrakactually, there's a low-hanging fruit ... lemme try something00:25
wpwraklet's see if the critter still runs after that hack ...00:28
wpwrakhmm, no big difference. how peculiar.00:32
wpwrak*hmm* where does libbase get installed ... ?00:36
wpwrakwell, anyway ... time to brag a little about the scheduler00:41
wpwrakah no, it does seem to use a builtin for strcmp. hmm.00:56
evildaemonIs it possible to use (Read: test) FNP in Linux?02:19
wolfspra1lwpwrak: yes, excellent work!02:21
wolfspra1lsounds like we can include it upstream right away...02:22
wolfspra1lI think the BOOTP delay is stuck because the SoC cannot detect cable presence right now, or something like that02:22
wolfspra1lif I got the details wrong, bear with me ;-)02:22
wpwrakwolfspra1l: thanks ! :)02:25
wpwrak(upstream) maybe after a little bit of cleanup. not sure how people feel about all the aborts and asserts i have in there. in theory, you should never hit them, but ...02:25
wpwrak(e.g., an abort would mean that the FPVM code generator has failed)02:26
wpwrak(bootp) even if we don't have carrier detection, why do we need to set up networking before FN runs anyway ? can't RTEMS just run this in parallel ?02:27
wpwrakevildaemon: i think you can run it under qemu. but i don't know the details.02:34
evildaemon(By the way, the reason I ask is that this link is broken for me: http://milkymist.org/msd/)02:35
evildaemonWhich is the link to the binaries on the flickernoise page, in case that needed clarification.02:36
wpwraki think this is the new location: http://milkymist.org/updates/02:42
evildaemonHmmm, wouldn't this mean the website needs to be updated?02:44
evildaemon(Which is ironic, considering the name of the directory.)02:44
wpwraki think xiangfu is taking care of that. if you find a place that still refers to msd/, please tell him02:44
wpwrak(ironic) yeah ;-)02:45
evildaemonI did, here is he?02:45
wpwrakprobably enjoying the weekend :)02:50
wolfspra1lwhich website?02:56
wolfspra1lI don't think xiangfu has exclusive access anywhere, I'm pretty sure about that actually :-)02:56
wolfspra1lbecause even if he would, I would open up that access right away02:57
wolfspra1lxiangfu is traveling a bit over the Chinese October holidays, so he may be online once in a while the next 2 weeks or so, over expensive 3G02:57
wolfspra1levildaemon: which website/url is out of date?02:58
evildaemonhttp://milkymist.org/flickernoise.html At the bottom, under source code.02:58
wolfspra1lI'm not sure whether xiangfu has access to that, but for sure lekernel does03:00
Action: evildaemon is glad he turned off noscript to try his hand at using # to point to the source code heading. The "still hesitating" box is one of the better ways I've seen to make advertising...addictive.03:04
wolfspra1levildaemon: he, sorry cannot follow03:08
wolfspra1lyou mean the 'still hesitating' box on milkymist.org ?03:08
wolfspra1land that won't show up with noscript, but then you turned noscript off and tried # (?)03:08
wolfspra1ldon't understand03:08
wolfspra1lwhich browser do you use?03:09
wolfspra1l(I'm asking because I need to think about some ways to market/advertize M1, in friendly ways...)03:09
evildaemonI was praising it.03:10
evildaemonAnd pointing out that I would have never noticed it if i didn't try doing: http://milkymist.org/flickernoise.html#source-code (Which didn't work.)03:11
evildaemonIf that's still a "WTF?" ignore the first sentence, and focus on the praise.03:13
wolfspra1lgot disconnected, will check the backlog :-)03:16
evildaemonAnyway, it's projects like this that make me wish I needed them. (Or had a large amount of disposable income.)03:32
wolfspra1levildaemon: you could help us tremendously by just spreading the word03:48
wolfspra1labout what Milkymist is, what is can do today, what it hopefully can do tomorrow, etc.03:48
wolfspra1ls/what is/what it/03:48
wolfspra1lalso even if you don't have the hardware, you can do a lot of good stuff with qemu. of course trying on real hardware is more fun...03:49
wpwraklots more :)03:51
wolfspra1levildaemon: what do you like about Milkymist?03:51
kristianpaulparallel, i think rtems suport threads, xiangu told thats implemented in the rss wall code if i remenber well, but to be honest i'm not using rtems since long, seema bare metal gcc-lm32 plus a hacked mm1 bios is just enought for me rigt now06:16
wpwrakkeeping things easy ;-)07:49
wpwraknaw, RTEMS must have concurrency. after all, you have the shell where you can do things while the rest boots.07:49
lekernelwpwrak, regarding your comment about atof: there is no double support in demo firmware/BIOS, only float09:08
lekernelyou'll probably find that printf is funny as well09:08
lekernelI did that in 2008-ish when all that stuff had to be crammed into one little block RAM array, and didn't feel the need to update it since then09:09
wpwrak"demo firmware" = flickernoise ?09:16
wpwrakdoes the build that runs on the M1 actually use libbase ? i haven't quite figured out how this gets involved. when i look at the headers that get #included, they look very non-libbase-ish09:17
lekernelno, the small proof of concept renderer that comes with mm soc09:19
lekernelwithout rtems09:19
wpwrakso i get the rater odd scenario of the M1 build, where I could imagine a reason for needing libbase, apparently not using libbase, but the native x86-64 build, where I have a perfectly good libc, needing libbase to get make all the includes work. so i'm a little confused ;-)09:19
wpwrak(demo) oh, i see. one more item i don't know yet :)09:19
lekernellibbase is only used for the BIOS on prod devices09:20
lekernelall the rest uses rtems libc09:20
wpwrakone way to solve the atof problem could be to just give it a different name. then there wouldn't be a conflict with ANSI C and any "real" libc.09:20
lekernelI don't see what kind of conflict you run into?09:20
wpwrakaah, i see. then i need to go over my build process again09:21
lekernelif your atof() returns a double instead of a float, the compiler should nicely convert it into float09:21
lekernelunless you include the libbase headers, which you shouldn't do when building on a system with a libc already09:22
lekernelthe only libbase header that libfpvm should need is version.h09:23
wpwrakyeah, i get the libbase headers. don't remember why, but it didn't compile without them09:23
lekernelmaybe because of version.h?09:23
wpwrakpossibly. i need to check this again09:24
wpwraklibbase also screws up my libc profiling. one more reason to be rid of it :)09:24
lekernelnah but just don't use it. it's only for systems without libc.09:24
wpwrakah, this is where i get it from: software/include.mak:INCLUDES=...09:28
wpwrakwhich in included by software/libfpvm/Makefile09:29
wpwrakwaiting for the russian hinterlands to reconnect ... ;)09:30
wpwrakwelcome back ! ;-)09:35
wpwrak(regarding libbase) ah, this is where i get it from: software/include.mak:INCLUDES=...09:35
wpwrakwhich in included by software/libfpvm/Makefile09:35
wpwrakso i guess i should just override INCLUDES ?09:35
lekernelmh, maybe we should move version.h to another folder09:35
lekernelsoftware/libfpvm/Makefile is only for building for demo firmware09:36
lekerneluse e.g. the x86-linux subfolder instead09:36
lekernelevildaemon, fixing that link, moment09:37
wpwrakah, that looks a bit more sane09:38
wpwrakbtw, why CC=clang ?09:38
lekernelthe less GNU software I use, the better I feel09:40
lekernelGCC should die and be replaced with LLVM or PCC09:41
wpwrakdunno. gcc has served me well so far.09:41
wpwraknow, let's kill libbase ...09:44
lekernelwpwrak, so, what name should I use for your new shiny scheduler?09:45
lekernelright now we hava GFPUS for Greedy Floating Point Unit Scheduler09:45
lekernelWFPUS ?09:45
wpwrakoh, i thought it came from GPU ;-))09:46
lekernelevildaemon, link fixed, thanks for reporting09:46
wpwrakqfpus for quick ... no, q almost looks like g, too confusing09:47
wpwrakwfpus sounds like "wumpus" :)09:48
wpwrakmaybe "r" for "rapid" or, even though a bit lame, "n" for "new" ?09:50
lekernelLNFPUS? ('lamely named')09:51
wpwrakhehe ;-)09:51
wpwrak"Lean New" :)09:51
wpwraki would just call it sched.c, but i can see how that might cause confusion with the task scheduler09:52
lekernelwe can keep multiple schedulers in libfpvm ...09:54
wpwrakyup, that would be an option. at least while experimenting.09:55
wpwrakah, and you always want to turn on optimization (LCPF). it increases total run time by about 40 ms (at the moment that would be 1%), but produces significantly better code09:57
wpwraknot sure if you saw that one:10:03
wpwrakah, and you always want to turn on optimization (LCPF). it increases total run time by about 40 ms (at the moment that would be 1%), but produces significantly better code10:03
lekernelyes, got it :)10:03
wpwrakbut let me first clean up my sched.c a little more. there's also one kind of dependency LCFP doesn't consider (write-write) when computing the path length. have to see if that has any effect.10:04
wpwrakoh, and when does it make sense to not define PRINTF_FLOAT ? another bios/demo quirk ?10:08
lekernelyou would love this :)10:09
lekernelin C variadic functions always promote float arguments to double10:10
lekernelit's a compiler built in and there's no way to disable it (with gcc at least)10:10
lekernelsince doubles do not work with BIOS/demo, the workaround this macro controls is passing pointer to floats to printf()10:10
lekernel(ofc the tweaked printf() implementation also expects such pointers when it sees %f)10:11
wpwrakurgh :-(10:12
wpwraki think the promotion to double is even ANSI C standard. checking ...10:12
lekernelyes I think it's in some standard10:12
wpwrakyes, K&R 2n Ed. A.7.3.210:14
wpwrakyou could avoid all that mess in gcc with -fshort-double (well, you then wouldn't be compatible with libc, but that shouldn't matter at this point)10:17
lekernelah? I didn't find that option when I looked for it...10:17
wpwrakor just support double in the bios/demo :)10:17
lekernelyeah well10:18
lekernelthis is old code and I had other priorities10:18
lekernelyes, we have a large flash and sdram now, and we can easily add double support10:18
wpwrakdo you even still use the demo ? if not, perhaps dropping support for it would be the easiest way to sanity10:20
lekernelyes, I used it recently to do some performance tweaking when trying to increase resolution10:20
lekernelI think it's still useful because it's straightforward to hack into when experimenting10:21
wpwrakokay. no gordian solution then :)10:22
wpwrakhmm. to install a profilinc libc, aptitude wants to downgrade libc if i tell it i have lucid or upgrade it if i tell it i have maverick. do i trust this ? :(10:40
wpwrakthe upgrade does look clean .. nothing else affected, it says. now, do i trust THAT ... ?10:41
wpwrakwell, no risk no fun. let's do it :)10:41
wpwrakgrmbl. hitting more binutils/libc/gcc compatibilities. does anyone ever test profiling ? :-(10:55
lekernelbbl... thanks for your work on pfpu wpwrak :)11:12
cdehey wolfspraul :)12:44
wolfspraulcde: hi13:00
cdehow are you?13:02
cdeso, http://projects.qi-hardware.com/schhist/mmone-jtag-serial-cable/pdf_usb_jtag.pdf is 404 :(13:07
xiangfucde, http://projects.qi-hardware.com/schhist/m1-jtag-serial/pdf_head/usb_jtag.pdf13:12
xiangfucde, where you get this link? we should fix it.13:12
xiangfucde, you can check the history here: http://projects.qi-hardware.com/schhist/m1-jtag-serial/ which is very cool.13:13
cdefrom http://en.qi-hardware.com/wiki/Milkymist_JTAG-serial_daughterboard13:13
cdeGND on the CMOS chip in pin 5 right ? (Vss)13:13
cdeand pin 1 is chip select13:14
Action: cde wishes he had his SOIC test clip at home13:15
xiangfufixed. you can also edit them with out register user13:17
cdecool thanks13:18
cdeso btw, I do get an error message in Windows, says the USB device has malfunction and that it could not recognize it13:20
xiangfucde, (pin 1, 5)  the U1 you mean? you want reflash your jtag board?13:23
xiangfucde, have you tried it under Linux?13:23
cdehmm shorting chip select doesn't seem to help13:23
cdewell I'm justing trying wolfspraul's advice13:24
cdebtw, is the USB JTAG board compatible with the Flyswatter ?13:25
xiangfucde, oh. I remember that.13:25
cdesee http://www.tincantools.com/product.php?productid=16134, both feature an FTDI and this 14-pin JTAG header so I thought they might be compatible13:25
xiangfu(Flyswatter) don't know that. for Windows you can check this: http://www.milkymist.org/wiki/index.php?title=Update_JTAG_firmware_on_Windows13:26
xiangfuI mean this page: http://www.milkymist.org/wiki/index.php?title=JTAG_windows_driver13:26
cdebtw, "never hot-plug the daughterboard, both Milkymist One and daughterboard need to be powered off when they are being connected"13:27
cdeI think I did exactly that :(13:27
cdethat's probably how I damaged the daughterboard, thanksfully the M1 seems unharmed13:28
xiangfucde, that one JTAG should be compatible. only the serial port is different.13:28
cdethat's very cool! I'm going to try it, if it works wolfspraul won't have to send me a replacement board13:29
xiangfucde, you may need a RS232 <--> TTL convert for get more info from serial console.13:30
xiangfucde, yes. try JTAG first :)13:30
cdehmm it has this 243EC with does TTL<->RS232 so my pl2303 cable should do just fine, in theory13:33
cdedamn, both are male RS232 connectors13:33
Action: cde hates RS23213:33
wolfspraulcde: ah, now I know who cde is :-)13:45
wolfspraulyou hot-plugged jtag-serial, hmm13:45
wolfspraulwell, on one hand I tend to stay away from easy 'too good to be true' explanations13:46
wolfspraulof course we can always say "that was it"13:46
wolfspraulthen maybe if it was indeed the source of the problem, we should add a warning label somewhere?13:47
wolfspraul"don't hotplug jtag-serial" ?13:47
wolfspraulor on the silkscreen somewhere13:47
wolfspraulwhether you find a replacement or not, it's sure that I will mail a new jtag-serial board to you so your m1 is complete and original13:51
wolfspraulI don't think I need the old one back, it's not worth the effort13:51
wolfspraulwe blame 'hotplugging' until we know better :-)13:51
cdeok :)14:47
wolfspra1lcde: what's the latest status?14:55
wolfspra1ljtag works with your other board?14:56
cdeoh, I didn't try that yet14:56
cdeat least it should be electrically compatible, the USB JTAG daughterboard is 3.3V right ?14:56
wolfspra1ldon't want to say anything wrong ;-)15:00
wolfspra1lI would think so, yes. but double-check elsewhere... I'm not positive right now.15:01
cdeargh, not going to work, pin spacing is different (larger on the flyswatter), it doesn't fit :(15:01
cdeI have like three different JTAG cables right now, each for a different board...15:03
cdebtw, it would be very nice to have a small hole in the casing for the USB cable to go through15:04
rohusually one doesnt need jtag.15:11
rohthats why there is no hole15:11
cdeyes. it's not a big deal anyway, and I can always drill a hole myself ;)15:14
rohwell.. i could provide pre-cut sidepanels.. but so far you are the first to ask15:16
cdedon't worry. I'll probably reflash very rarely anyway15:17
cdeand there is always the flickernoise way15:18
kristianpauldam gcc 4.6.1 freezed my system when compiling for lm32 :/19:04
wpwrakhow did it do that ? :) do you have swap enabled ?20:46
kristianpaulyes i have swap20:49
kristianpauli dont know20:49
kristianpaullast thing i remenber was music stoped and linux start killing processes20:50
kristianpauland happened twice, i'm compiling 4.5.2 right now20:50
wpwraksounds like running out of memory20:57
kristianpaul1Gb ram 1.7Gb swap, first time happens :)22:11
kristianpaulnice, 4.5.2 finished compilation OK22:13
wpwraktiny :)22:32
wpwraka while ago, i noticed on my 8 GB system that i didn't have swap enabled. apparently, i had been running without it for months without noticing ;-)22:33
--- Sun Sep 25 201100:00

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