#milkymist IRC log for Saturday, 2012-03-03

roh 05:06
lekernelwpwrak: yes, looks good09:34
wpwraklekernel: great, thanks ! about navre.ld, shouldn't the LENGTH of the data section be "8K" instead of "32K" ?13:02
wpwrakah, and i found one cause of erratic behaviour: it was in "usb load", which used SOFTUSB_PMEM_SIZE from system_conf.h to cap the size of the firmware. turns out that SOFTUSB_PMEM_SIZE was never updated for our switch from 4 kB to 8 kB.13:03
lekernelso... pmem is 2^12 16-bit words and dmem is 2^13 8-bit words13:06
lekernelboth are 8Kbytes, and yes13:06
lekernelactually, to do sections cleanly, the COMLOC* should have theirs...13:08
wpwrakheh, yes :) but i'll save that for another day :)13:08
GitHub2[milkymist] wpwrak pushed 1 new commit to usb-debug: https://github.com/milkymist/milkymist/commit/240d96de11c34cbcbd03f232d0c1f9ff10952bc613:11
GitHub2[milkymist/usb-debug] softusb/navre.ld: change LENGTH of data section from 32 kB to 8 kB - Werner Almesberger13:11
wpwrakflickernoise.git 66e594740b079953ac2f8ce07b13d3f99cfa9d71 is funny ;-)13:32
GitHub175[flickernoise] wpwrak pushed 3 new commits to master: http://git.io/cl7gfQ13:32
GitHub175[flickernoise/master] usb load: show how many bytes were loaded - Werner Almesberger13:32
GitHub175[flickernoise/master] usb debug: emit a newline only before returning to the shell - Werner Almesberger13:32
GitHub175[flickernoise/master] Merge branch 'master' of github.com:milkymist/flickernoise - Werner Almesberger13:32
lekernelwpwrak: by the way, what would you recommend for two-way message passing between two processes? a pair of datagram unix sockets?13:59
lekernel(in this case, between migen/python and icarus verilog with a plugin)13:59
lekernelmyhdl does it with two pipes ...14:02
lekerneli'll go for the datagram sockets. they preserve message boundaries, so it becomes a little easier...14:03
wpwrakunix domain sockets should be bidirectional, so even just one would do14:03
lekernelnot the datagram ones14:03
lekernel(I also found it a bit weird...)14:04
lekernelso it's either (1) one stream socket + some stupid message cutting code on the RX side (2) two datagram sockets14:05
lekernelunless there's a guarantee that if the RX buffer is always large enough, the stream socket will preserve message boundaries, but I don't think I can count on this14:06
wpwrak(unidirectionial) hmm. i could swear i used them bidirectionally. trying ...14:07
wpwrak(message boundary) naw, you don't want stream :) too many little exceptions and corner cases14:08
wpwrak(that is, unless you do your own framing)14:08
lekernelwpwrak: simply - when you call sendto() you need to give the address of the receiving socket to send your message to14:09
lekernel(which is just a filename with datagram UNIX sockets)14:09
lekernelif you sendto() the same socket, you just get your messages back14:10
lekernelhttp://tkhanson.net/cgit.cgi/misc.git/plain/unixdomain/Unix_domain_sockets.html "Communication is bidirectional with stream sockets and unidirectional with datagram sockets."14:11
lekernelah, there's a linux extensio n14:16
wpwrakah, you need one socket for each endpoint of course. and i just tried it. works perfectly.14:28
lekernelSOCK_SEQPACKET is like SOCK_STREAM except that read()/recv() fails atomically if it can't receive a complete packet14:29
lekernelthat's exactly what I want, except it's only on Linux ...14:29
wpwrakuse SOCK_DGRAM :)14:30
lekernelyes but then I need two sockets14:30
wpwraki think you need that anyway :)14:31
wpwrakif you don't like to specify names, you can use things like mktemp. at least for the initiator.14:33
wpwrak(two) i mean one at each end14:35
lekernelyes, but with SOCK_SEQPACKET there's only one bind()... and bidirectional communication14:35
wpwrakbut not two pairs of sockets14:35
lekernelplus the connection is closed should the other process dies, so I do not have to monitor for that at the same time14:35
lekernelwhy doesn't BSD implement it... mh14:36
wpwrakare your processes related (as in one forking the other) ?14:42
lekernelyes, python run iverilog14:42
lekernelI don't think you can use socketpair() without fork(), can you?14:44
lekernelthere might still be the option of calling fork() then messing with the exec* family of functions to get iverilog to inherit our file descriptors, but...14:45
wpwrakyou cold use file descriptor passing. but that's messy.14:46
lekernelbut you already need a socket for file descriptor passing, no?14:46
wpwrakif one forks the other, socketpair ought to work. let's see if it really does .14:46
lekernelyes, socketpair() works with fork() ... already did it in my "security" days14:47
wpwrakalso bidirectionally with SOCK_DGRAM ?14:47
wpwrak(i think it should)14:47
lekernelprobably not, but I prefer SEQPACKET anyway14:47
lekernelthe BSD folks should be less conservative :-)14:48
wpwrakisn't BSD all about being conservative ? ;-)14:49
wpwrakwell, or "raid the commons" :)14:49
lekernelanother problem with messing with fork() is I'm not sure how iverilog does things14:49
lekernelit can itself fork another process, or do other weird stuff14:50
lekerneland if iverilog doesn't, another verilog simulator will do14:50
lekernelso I'd rather stay in the safe zone wrt how the simulator is started14:51
lekernelwell, in the end, an otherwise old-fashioned UNIX socket with SOCK_SEQPACKET seems like a good option. thanks for the discussion :)14:52
wpwrakyou could create your socket at the parent, set an environment variable, then fork. your plugin would then connect to what's mentioned in the env variable.14:52
wpwrakUNIX domain rules ;-)14:53
lekernelor just embed the socket address in the generated verilog that I feed into the simulator14:54
wpwrakencrypted :-)14:57
kristianpaulthere is not floss replacement to visualize netlist generated by netgen right?15:46
lekernel_not afaik... start one :)15:53
Fallenouwpwrak: your wheel patch contains reference to LV3, is it possible to use it without modifications with the korg nanokontrol2 ?16:42
Fallenouwhat would I have to do to bind my nanokontrol2 instead of the lv3 ?16:46
wpwrakFallenou: no, you have to modify at least the midi ... part16:52
wpwrakFallenou: and maybe also things like  zoom = range(fader2); (depending on what you put into the midi ... section16:53
wpwrakFallenou: you can find the controller numbers in the MIDI dialog in FN. just move the sliders, pots, and buttons, and i'll show you want the numbers are. these then go into the midi ... section16:54
Fallenouok got it16:56
Fallenouthanks !16:58
Fallenouwhat's the difference between fader(X,Y) and pot(X,Y) ?16:59
Fallenouthe way variable varies ?16:59
Fallenougot it to work, too bad my butons are not switches17:08
Fallenouif I release the button the ghost transforms back into pacman :p17:08
FallenouI really need to learn fnp language, I'm kind of lost with all the options17:10
wpwrakyou can turn buttons into switches by declaring them as "button" in midi ... and using them as "switch" when binding to a variable17:14
wpwrakfader() and pot() are currently identical. did you read the manual ? :-) http://downloads.qi-hardware.com/people/werner/m1/tmp/midi-draft-20120215.pdf17:15
Action: kristianpaul stubborn17:44
lekerneland lazy :)17:45
kristianpaulyes :)17:45
GitHub173[migen] sbourdeauducq pushed 1 new commit to master: https://github.com/milkymist/migen/commit/8586daf2ddcfffc5133838b5a6958a5fb7c089b918:02
GitHub173[migen/master] sim: IPC module (lacks str/int encoding) - Sebastien Bourdeauducq18:02
wpwrakit will be so sweet to have USB bus power control in M1r4. i just found a failure mode where the LV3 no longer responds to bus resets. might be a problem on the LV3 side.23:59
--- Sun Mar 4 201200:00

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