lekernel changed the topic of #milkymist to: Milkymist One, Migen, Milkymist SoC & Flickernoise :: Logs: http://en.qi-hardware.com/mmlogs :: Something to do? https://github.com/milkymist/bugs/issues
cozy has joined #milkymist
<roh>
<roh> re
<lekernel> wpwrak: yes, looks good
rejon has joined #milkymist
<wpwrak> lekernel: great, thanks ! about navre.ld, shouldn't the LENGTH of the data section be "8K" instead of "32K" ?
<wpwrak> ah, 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.
<lekernel> so... pmem is 2^12 16-bit words and dmem is 2^13 8-bit words
<lekernel> both are 8Kbytes, and yes
<lekernel> actually, to do sections cleanly, the COMLOC* should have theirs...
<wpwrak> heh, yes :) but i'll save that for another day :)
<GitHub2> [milkymist] wpwrak pushed 1 new commit to usb-debug: https://github.com/milkymist/milkymist/commit/240d96de11c34cbcbd03f232d0c1f9ff10952bc6
<GitHub2> [milkymist/usb-debug] softusb/navre.ld: change LENGTH of data section from 32 kB to 8 kB - Werner Almesberger
<wpwrak> flickernoise.git 66e594740b079953ac2f8ce07b13d3f99cfa9d71 is funny ;-)
<GitHub175> [flickernoise] wpwrak pushed 3 new commits to master: http://git.io/cl7gfQ
<GitHub175> [flickernoise/master] usb load: show how many bytes were loaded - Werner Almesberger
<GitHub175> [flickernoise/master] usb debug: emit a newline only before returning to the shell - Werner Almesberger
<GitHub175> [flickernoise/master] Merge branch 'master' of github.com:milkymist/flickernoise - Werner Almesberger
<lekernel> wpwrak: by the way, what would you recommend for two-way message passing between two processes? a pair of datagram unix sockets?
<lekernel> (in this case, between migen/python and icarus verilog with a plugin)
<lekernel> myhdl does it with two pipes ...
<lekernel> i'll go for the datagram sockets. they preserve message boundaries, so it becomes a little easier...
<wpwrak> unix domain sockets should be bidirectional, so even just one would do
<lekernel> not the datagram ones
<lekernel> (I also found it a bit weird...)
<lekernel> so it's either (1) one stream socket + some stupid message cutting code on the RX side (2) two datagram sockets
<lekernel> unless 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 this
<wpwrak> (unidirectionial) hmm. i could swear i used them bidirectionally. trying ...
<wpwrak> (message boundary) naw, you don't want stream :) too many little exceptions and corner cases
<wpwrak> (that is, unless you do your own framing)
<lekernel> wpwrak: simply - when you call sendto() you need to give the address of the receiving socket to send your message to
<lekernel> (which is just a filename with datagram UNIX sockets)
<lekernel> if you sendto() the same socket, you just get your messages back
<lekernel> http://tkhanson.net/cgit.cgi/misc.git/plain/unixdomain/Unix_domain_sockets.html "Communication is bidirectional with stream sockets and unidirectional with datagram sockets."
<lekernel> ah, there's a linux extensio n
<lekernel> SOCK_SEQPACKET
<wpwrak> ah, you need one socket for each endpoint of course. and i just tried it. works perfectly.
<lekernel> SOCK_SEQPACKET is like SOCK_STREAM except that read()/recv() fails atomically if it can't receive a complete packet
<lekernel> that's exactly what I want, except it's only on Linux ...
<wpwrak> use SOCK_DGRAM :)
<lekernel> yes but then I need two sockets
<wpwrak> i think you need that anyway :)
<wpwrak> if you don't like to specify names, you can use things like mktemp. at least for the initiator.
<wpwrak> (two) i mean one at each end
<lekernel> yes, but with SOCK_SEQPACKET there's only one bind()... and bidirectional communication
<wpwrak> but not two pairs of sockets
<lekernel> plus the connection is closed should the other process dies, so I do not have to monitor for that at the same time
<lekernel> why doesn't BSD implement it... mh
<wpwrak> ;-)
<wpwrak> are your processes related (as in one forking the other) ?
<lekernel> yes, python run iverilog
<lekernel> runs
<lekernel> I don't think you can use socketpair() without fork(), can you?
<lekernel> there 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...
<wpwrak> you cold use file descriptor passing. but that's messy.
<lekernel> but you already need a socket for file descriptor passing, no?
<wpwrak> if one forks the other, socketpair ought to work. let's see if it really does .
<wpwrak> correct
<lekernel> yes, socketpair() works with fork() ... already did it in my "security" days
<wpwrak> also bidirectionally with SOCK_DGRAM ?
<wpwrak> (i think it should)
<lekernel> probably not, but I prefer SEQPACKET anyway
<lekernel> the BSD folks should be less conservative :-)
<wpwrak> isn't BSD all about being conservative ? ;-)
<wpwrak> well, or "raid the commons" :)
<lekernel> another problem with messing with fork() is I'm not sure how iverilog does things
<lekernel> it can itself fork another process, or do other weird stuff
<lekernel> and if iverilog doesn't, another verilog simulator will do
<lekernel> so I'd rather stay in the safe zone wrt how the simulator is started
<lekernel> well, in the end, an otherwise old-fashioned UNIX socket with SOCK_SEQPACKET seems like a good option. thanks for the discussion :)
<wpwrak> you 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.
<wpwrak> UNIX domain rules ;-)
<lekernel> or just embed the socket address in the generated verilog that I feed into the simulator
<wpwrak> encrypted :-)
lekernel_ has joined #milkymist
<kristianpaul> there is not floss replacement to visualize netlist generated by netgen right?
<lekernel_> not afaik... start one :)
<Fallenou> wpwrak: your wheel patch contains reference to LV3, is it possible to use it without modifications with the korg nanokontrol2 ?
<Fallenou> what would I have to do to bind my nanokontrol2 instead of the lv3 ?
<wpwrak> Fallenou: no, you have to modify at least the midi ... part
<wpwrak> Fallenou: and maybe also things like zoom = range(fader2); (depending on what you put into the midi ... section
<wpwrak> Fallenou: 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 ... section
<Fallenou> ok got it
<Fallenou> thanks !
<Fallenou> what's the difference between fader(X,Y) and pot(X,Y) ?
<Fallenou> the way variable varies ?
<Fallenou> got it to work, too bad my butons are not switches
<Fallenou> if I release the button the ghost transforms back into pacman :p
<Fallenou> I really need to learn fnp language, I'm kind of lost with all the options
<wpwrak> you can turn buttons into switches by declaring them as "button" in midi ... and using them as "switch" when binding to a variable
<wpwrak> fader() and pot() are currently identical. did you read the manual ? :-) http://downloads.qi-hardware.com/people/werner/m1/tmp/midi-draft-20120215.pdf
* kristianpaul stubborn
<lekernel> and lazy :)
<kristianpaul> yes :)
<GitHub173> [migen] sbourdeauducq pushed 1 new commit to master: https://github.com/milkymist/migen/commit/8586daf2ddcfffc5133838b5a6958a5fb7c089b9
<GitHub173> [migen/master] sim: IPC module (lacks str/int encoding) - Sebastien Bourdeauducq
antgreen has joined #milkymist
frankD2 has joined #milkymist
kilae has joined #milkymist
cozy has joined #milkymist
frankD2 has quit ["WeeChat 0.3.6"]
cozy has joined #milkymist
Scopeuk has joined #milkymist
<wpwrak> it 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.