#milkymist IRC log for Monday, 2012-02-27

kristianpaulfpgaminer: hi00:40
kristianpaulI noticed the dual core miner.. is this something to avoid problems when place and route get messy by xilinx/altera tools?00:41
kristianpaulthis is nice, NC afaik.. http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-111-introductory-digital-systems-laboratory-spring-2006/lecture-notes/01:07
GitHub62[scripts] xiangfu pushed 1 new commit to master: http://git.io/kK-O7g05:46
GitHub62[scripts/master] update compile script to latest rtems and build documents - Xiangfu Liu05:46
FallenouMorning09:01
wpwrakso, kicking out "if-as-a-function". the day starts well ;-)10:53
wpwrakerr, of course if-as-a-variable11:03
Action: wpwrak needs caffeine11:03
wpwrakand we seems to have a regression after the patch syntax cleanup. test/nsyms now reports more symbols. let's find out why ...11:12
wpwraklekernel_: btw, did you know that my regression tests also compile all the patches ? so it's also a convenient check after making any sweeping changes in the patch pool11:13
wpwrakhmm. seems to be the compiler getting confused. interesting.11:19
wpwrakor, more likely just ptest11:20
wpwrakaah, it's the other way around. that one patch (Pulsating photography) got CLEANER ! :) very good. let's see if there's more ...11:26
wpwrakAAH ! it's the midiN12:21
wpwrakGeiss & Werner - Tornado (Rain Dance MIDI RMX).fnp still uses them. and since they're no longer pre-defined, they now show up as "new" symbols12:21
wpwrakcladamw: heya ! question: you once expressed concern about the availability of 100 mil female headers with 18 pins. is this still troubling you or have you found good sources ? at least at digi-key, such critters do indeed seem a little hard to find12:40
cladamw(J21/J22) wpwrak, originally I picked this: http://www.molex.com/molex/products/datasheet.jsp?part=active/0901512118_PCB_RECEPTACLES.xml12:50
cladamwbut digi-key doesn't have it: http://octopart.com/partsearch#search/requestData&q=090151211812:50
cladamw(Harwin) so I picked compatible one: http://tw.mouser.com/ProductDetail/Harwin/M20-7830942/?qs=sGAEpiMZZMtsLRyDR9nM1%252bmess1WSkgVI7th%252bl40uLo%3d12:52
cladamwand I ordered few Harwin already,12:53
cladamwi won't worry this part even there's very few on Mouser, since I think China has them, but won't be at formal/famous distributor of US, especially China gradually beats US in economic.12:57
cladamwIn China, there's no critters. :-)12:59
wpwrakall hail to chinese superiority ;-)13:03
wpwrakbut if we want to be compatible with major western distributors, perhaps it would help to change that part from 9x2 to 10x2 ?13:04
cladamwno problems on me for 9x2 to 10x2 if wants to add another 2 pins.13:05
wpwrakit's less for having more pins than for having a more common part. one issue with hard to source parts is also that they make the device harder to repair in the field.13:06
wpwraklet's see what wolfgang thinks13:06
cladamwthe questions are being the what else we want to pull out about those un-used fpga pins, you can ref to latest: http://downloads.qi-hardware.com/hardware/milkymist_one/sch/tmp/MILKYMISTONE.pdf13:07
cladamwyeah... check fpga sch page to know how many un-used pins. ;-)13:07
cladamwactually like you talked before, user can use 40*2 header pins for their smart extension daughter boards. just cut theirs. ;-)13:10
wpwrakone pin left in the 3.3 V domain ? wow13:10
wpwrak(U22B.P21, IO_L48P_HDC_M1DQ8_1)13:10
cladamwi quite don't know how big scale M1 would be in few years. For me, i think we can even ordered 200~500pcs in China, but questions is how many years we eat M1 for 200pcs in 1 ~ 2 years? hehe ....13:12
wpwrakah no. some are labeled by unused13:12
cladamwif you see 'x' arrow in banks, it's un-used. ;-)13:13
wpwraks/by/but/13:13
wpwrakhmm, not always, i think. lemme check ..13:13
wpwrakIO_L22P_2 is unconnected but doesn't have an "X"13:14
wpwrakU22C.T1213:14
wpwraksame for IO_L22N_213:14
cladamwyeah. good catches, i've not drc. ;-)13:16
wpwrakhah ! :)13:16
cladamwlet me update...13:17
cladamwso you'd like 10*2?13:17
wpwrakwith 9x2 apparently very hard to source, i think 10x2 may be nicer. what do you think ?13:19
wpwrak(fpga pins) well, if all else fails, we could switch the NOR from 16 bit data to 8 bit ;-)13:20
cladamwi'm okay actually for more. ;-)13:20
cladamwthe question is Wolfgang wanted to be compatible wth older version. ;-)13:20
cladamwbut yes, can be discussed more. ;-)13:21
cladamw(NOR 16 -> 8) wpwrak, haha... you're.13:21
cladamwwpwrak, updated, tks the catch. :)13:32
wpwrakwas it just the two pins ? or did ERC/DRC find more things ?13:36
cladamwwpwrak, i'll let you know that how many pins 3v3 domain we have tomorrow. sorry about this. since I'm using another a_d ten version. :-)13:40
wpwrak"a_d ten" = ?13:42
GitHub187[flickernoise] wpwrak pushed 10 new commits to master: http://git.io/wp1TPQ14:23
GitHub187[flickernoise/master] compiler: "if" can no longer be used as a variable name - Werner Almesberger14:23
GitHub187[flickernoise/master] compiler/test/Common (equiv2): allow suppressing some differences - Werner Almesberger14:23
GitHub187[flickernoise/master] patches/attic/: bring back the pre-cleanup version of the patch pool - Werner Almesberger14:23
wpwrakwolfspraul: question: how do you feel about those 9x2 connectors for the expansion headers ? adam once remarked that they're hard to source. he now found them in china. but they're difficult to get from western distributors.14:47
wpwrakwolfspraul: one possibility would be to go to 10x2 instead. that size is a lot more common.14:48
wolfspraulof course14:48
wolfspraulchange14:48
wolfspraulcommon parts is super important14:49
wpwrakthat was quick :-)  damn. adam already left.14:49
wolfspraulwell it's obvious, no?14:50
wolfspraulif we can identify more uncommon parts, same - might be worth replacing them with more common ones...14:51
wpwrak(obvious) well, it makes the new J21 slightly more different from the old J21. but i agree, that's a very minor concern14:54
LmtdAtWhat's a milkymist?17:56
lekernelas Werner put it: it's a token of, inspiration, a great pefect blend of a bold statement of out-of-the-box thinking with time-proven concept and technology. You should learn from this, and find courage for groundbreaking work of your own. A bit like the monolith in 2001, and you don't even have to fly to Jupiter to get it mass-produced :-)18:00
lekernelbut in more practical terms... we have a pretty good wikipedia page you can check: http://en.wikipedia.org/wiki/Milkymist18:02
lekernelwpwrak: have you sorted out the symtab allocation/code generation issue you talked about yesterday? I'd like to fix the small video-in full screen bug, and release18:19
wpwraklekernel: i didn't touch the symtab issue. the band-aid that's currently there will fix it for all practical purposes. for a proper solution, i'll switch from a table to a binary tree.but for this i'll need a red-black tree library. it may be a bit tricky to find one with the right code structure and the right license. so i wouldn't rush this for now.18:25
wpwraklekernel: code generation still needs checking18:26
wpwraklekernel: right now, i'm looking at usb. see if i can at least get rid of the full failure with midi / full-speed18:26
wpwrak(that one should be high-level enough that i can do something without spending weeks in front of the scope. or weeks making hat logic analyzer. wouldn't you feel tempted to implement such a critter, kinda of as a warm-up exercise ? :)18:28
lekernelwell, my immediate plans (after the release) are to implement good simulation support for Migen and then design the best/fastest open source SDRAM controller ever18:34
wpwrakhehe ;-)18:35
lekernelbut if you think another FPGA-based LA is really needed, I can have a look ...18:35
lekernelwhat's the problem with your Rigol scope?18:35
wpwrakan FPGA-based LA that can DMA to SDRAM would seriously kick ass18:35
lekernel...except that it can't be used to debug SDRAM controllers then :p18:36
lekernelalso, you'd typically need to resynthesize every time, or use XDL hacks18:36
wpwrakthe rigol has ... 1) no compression, 2) only 0.5-1 Msamples (and that without compression), 3) glacially slow transfers to the PC18:37
lekernelboth are a tad messy18:37
wpwrak(sdram controller) you could use a companion M1. mirror the signals that interest you on the expansion header and pick them up from there18:38
wpwrakand yes, for introspection, you'd have to resynthesize. not a huge deal, IMHO. we can always make it perfect later18:38
lekernelbtw this thing would work using a manually generated "rolling banks" pattern of access to the SDRAM18:39
lekernelwould work best18:39
wpwrakone you have the basics, we could also do FPGA-assisted decoding. like the big guys do. the ones who charge USD 1k and more to enable such features in their devices.18:39
lekernelmy next controller will be able to generate such patterns automatically if you send the requests sufficiently in advance though18:40
wpwrakideally, you'd allocate a block of RAM, set a suitably aligned pointer in the LA controller, write the number of words/whatever you want to record, then let it rip18:40
lekernelprobably better to use that one. also, min. 2x the bandwidth18:40
wpwrakwrite a zero to the counter and it stops. have another register that contains the number of things written.18:41
lekerneland how do we transfer to the pc? ethernet isn't so fast without DMA ...18:41
wpwrak /nick Mr.Obvious18:41
wpwrakadd DMA to ether18:42
wpwraknaw, but even at 1 MB/s, it would be usable. you should see at what speed data crawls out of my scope18:42
lekernelyeah well18:42
lekernelprobably better to buy an existing analyzer than spend the time designing all this stuff18:43
wpwraksomething like 1 kBps. the operation it: set x offset (the time window), send the download command, then read 1 kSa buffer containing 1 kSa-640 Sa of garbage, plus 640 Sa (i.e., the screen content)18:44
wpwrakhave you seen an "existing analyzer" that is a) usable, b) can store more than a few kB, c) doesn't require windows, and d) costs less per unit than 10-20 M1 ?18:45
lekernelfor debugging full speed USB, maybe saelae or openbench is enough?18:46
wpwrak(slow scope) what makes it slow is that there's a race condition when changing the time offset. leads to a) an incorrect time and b) the scope reporting back the offset that was requested. the solution is to wait some 300 ms after each command18:47
wpwraksaelae seems closed source. and no usb decoding in their software :-(18:50
lekernelyeah, but it's cheap, and it works18:51
lekernelmaybe you can export to some open format? haven't tried...18:51
wpwrakthey say you can. but that closed source stuff still needs to run18:52
lekernelyeah, sure...18:52
lekernelbut let's pick our battles18:52
wpwrakso, pick the wrong distro or the wrong version and boom, no LA for you18:52
wpwrakwould it be really that hard for you ? you already know all the bits involved. i would expect the actual engine to be 1-2 days of work. but figuring out how to get the clock, set the timing constraints, and how dma works would be the bulk of the work. you've done all that already.18:55
lekernelhow to deal with FIFO overflows?18:56
wpwraklog an error ? the fifo should be dimensioned such that it doesn't overflow18:56
wpwrak(and, accordingly, the sample rate)18:57
wpwrakassumes the dma has a predictable response time and/or priorities18:57
lekernelwell... I'll think about it. it could be an interesting test/example of Migen/ASMI ...18:57
wpwrakhehe :)18:58
lekernelbut doing it in plain Verilog with the current arch doesn't really turn me on18:58
wpwrakthat would also be a very good opportunity for an extension board: make one with active probes: a simple 74xxx1Gxxx buffer/schmitt-trigger with differential output, maybe BGA, in the probe head. you'd have an _EPIC_ input impedance.19:00
wpwrakand the critter would still be nice and small19:00
lekernelyeah, we could have a GUI too, ie a standalone analyzer ...19:00
lekernelactually this is a pretty good idea19:00
wpwraki think that would happen quickly ;-)19:01
wpwrakuse LV3 for controls ;-))19:01
lekerneland we could sell variants of the M1 board with the probe extension and the artsy stuff (video-in, DMX, MIDI, ..) unpopulated19:01
wpwrakat an ultra-bargain price of only USD 5000 ;-)19:02
lekernelyes :)19:02
lekernelbtw, we can have a 1GHz sample rate using the SERDES19:02
wpwrakmake it USD 15k then ;-)19:04
wpwrakof course, at 1 GSa/s, you'd be too fast for the SDRAM, even after acceleration19:05
lekernelwith fewer than 10 channels it's going to work19:06
wpwrakyou'd also want data compression. that adds more bits19:06
lekernelwith the rolling bank pattern you reach near 100% efficiency19:06
wpwrake.g., 8 bit sample value, 16 bits counter, 8 bits software tag19:07
wpwrakat, say, 200 MSa/s, you could then record ~21 ms of noise or ~23 min of silence19:09
wpwrak... with a 16 MB buffer19:10
lekernelwe have 128M19:10
lekerneland we can have more on the LA variation, DRAM is cheap ;)19:10
wpwrak16 MB is what i saw rtems report as free. but yes, we could use more.19:11
wpwrakhehe ;-)19:11
lekernelah, that's a bug then19:11
wpwrakmaybe it's the largest contiguous block or so19:11
wpwrakwkspace "Largest free block"19:12
wpwrakbut also "Total bytes free"19:12
wpwraklekernel: how do you like this ? https://github.com/milkymist/flickernoise/compare/usb-debug19:55
wpwraki called the command "navre". not sure if it shouldn't be "usb" instead. "softusb" would seem a bit long.19:56
lekernelok, great!20:03
lekernelmaybe instead of a timeout, you can wait for a keypress?20:03
wpwrakheh :)20:03
lekernelimo the whole stdio family of functions supposedly works there, so it should be easy20:04
wpwrakdo we have a nice and simple way to check for a keypress ?20:04
wpwrakit has to be non-blocking. and if it's like on unix, the tty driver would buffer the line until \n (unless put in raw mode)20:04
lekernelin theory, you have a complian termios too20:05
lekernelcompliant20:05
lekernelwaiting for \n is ok too I think20:05
wpwrakokay, let's find some more rtems bugs then :-)20:05
wpwrakwhat about the command name ? keep "navre" ? make it "usb" ? something else ?20:06
lekernelusb is a bit better imo20:06
lekernelbut that's just a detail20:06
wpwrakexcellent. changing ...20:06
Action: wpwrak like to get the details right ;-)20:07
wpwrakhmm. it does compile. but that's all the good i can say about it ...20:19
wpwraklet's see if ioctl works better than fcntl ...20:22
lekernelwhat about tcsetattr?20:25
lekernelhttp://cc.byexamples.com/2007/04/08/non-blocking-user-input-in-loop-without-ncurses/20:25
lekernelha sorry, that's just for the canonical mode... the function is quite ill named20:25
lekerneland we don't have select()20:25
wpwrakioctl FIONBIO: Bad file number20:27
lekernelgrmbl20:27
wpwrakhmm, is there poll() ?20:27
wpwrakah, apparently :-)20:28
wpwrakhmm. but only internally in rtems ?20:31
wpwrakweird. they have quite a bit of code than references it has bits of it, but then cpukit/libnetworking/Makefile.am says it's not supported20:33
wpwraklet's see if opening /dev/console with O_NONBLOCK does something useful ...20:38
wpwrakit's nice that there are so many ways to do non-blocking IO in unix. that way, rtems has more opportunities to get it right at least once ;-)20:39
wpwrakno such luck20:39
wpwraki wonder what would happen if i created a task that does a blocking read and then kill it. it that even supposed to work ?20:44
wpwrakwell, maybe another day. too messy to try now.20:44
GitHub138[flickernoise] wpwrak pushed 2 new commits to usb-debug: http://git.io/ow6eqg20:50
GitHub138[flickernoise/usb-debug] shell extension: renamed the "navre" command to "usb" - Werner Almesberger20:50
GitHub138[flickernoise/usb-debug] shellext: added section title comments - Werner Almesberger20:50
lekernelwpwrak: that would work. i'm doing it this way to mux the different event sources in FN. but yes, it's a bit lousy.20:58
wpwrakbut do you also kill the blocked thread ? that's what worries me. we'd have to kill it when done. so it has to 1) actually get out of the block. 2) not mess up the system (e.g., stdio state).21:01
wpwrakhmm. only in start_dhcp_task. and that's in an error path.21:04
Action: wpwrak cowardly refrains from going down that rathole21:04
wpwrakmerged what i have so far21:12
lekernelyeah well... as I said, pick your battles :)21:22
wpwrakyeah, and with rtems, all victories are pyrrhic21:28
wpwrakah ... but if we don't support a timeout, we do't need to rtems_task_delete. that should be reasonably safe then.21:38
wpwrakwhat would be a good priority value to pick ?21:45
lekernelsame as the shell?21:52
wpwrakthat would be 1, if "task" is to be trusted. let's see how it goes.21:53
wpwrakactually, it should be higher. since the shell is busy-looping21:54
wpwrakprio 1 is the highest priority. cool. so we hang the system :)21:58
GitHub155[flickernoise] wpwrak pushed 1 new commit to usb-debug: http://git.io/IUnAVw22:04
GitHub155[flickernoise/usb-debug] usb debug: wait for keypress; removed timeout - Werner Almesberger22:04
GitHub141[flickernoise] wpwrak pushed 1 new commit to master: http://git.io/2nMH2Q22:08
GitHub141[flickernoise/master] usb debug: wait for keypress; removed timeout - Werner Almesberger22:08
--- Tue Feb 28 201200:00

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