<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 :)
<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
<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>
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.