<kristianpaul> okay, lets berak some bus stabillity ;-)
<kristianpaul> break**
<kristianpaul> now 45~ to wait i order to test changes on the soc.. now i understand sebastien suffering with ise..
<kristianpaul> s/i/in
<wolfspraul> kristianpaul: you mean 45min for synthesis?
<kristianpaul> and P&R
<kristianpaul> well my pc the last wonder ;-)
<wolfspraul> that was the #1 complaint I heard at Elphel as well
<kristianpaul> pc is not*
<kristianpaul> done
<kristianpaul> 39minutes
<kristianpaul> not bad ;-)
<wolfspraul> if it would use llhdl, it would come down?
<kristianpaul> i'll hope yes
<kristianpaul> if optimization is not done as lekernel said once
<kristianpaul> also there is P&R i think thats antares part..
<CIA-37> antares: Sebastien Bourdeauducq master * r047c299 / (5 files in 3 dirs): anetlist: list of primitives, bels and sites - http://bit.ly/gOGPOF
<kristianpaul> Amazing. 3 days for a password recovery from opencores..
<scrts> :)
<scrts> it finally arrived?
<kristianpaul> yes
<xiangfu> able to compile the flickernoise. the flickernoise.fbi is 3M.
<xiangfu> after flash this flickernoise.fbi to MM1. it cannot boot to flickernoise.
<xiangfu> serial output stop at "Booting ..."
<lekernel> is that a compressed image or not?
<lekernel> if it is, you need to compile and flash the bios in git (with lzma support)
<lekernel> or make an uncompressed image
<kristianpaul> yeah i will suguest xiangfu update bios
<kristianpaul> btw xiangfu does it work for you the flash.sh script in flickernoise?
<xiangfu> not working.
<kristianpaul> got problems with a set -e error, well i fixed the jtag script manually
<xiangfu> I will try to update bios
<lekernel> "working/not working" without explanations won't help much
<lekernel> kristianpaul: so I guess you mean your shell doesn't grok set -e?
<lekernel> or ??
<kristianpaul> yeap that i mean
<lekernel> what shell are you using?
<xiangfu> when I run 'flash.sh' command run fine. after reflash the mm1 not boot.
<kristianpaul> bash
<kristianpaul> xiangfu: not boot after powercycle?
<lekernel> bash supports "set -e", so either you're not using bash (or a version of it that would be appropriate for a computer museum) or it's another problem
<kristianpaul> sure
<xiangfu> I have tried change the ../src/flickernoise.fbiz to ../src/flickernoise.fbi.  after flash flickernoise.fbi or ../src/flickernoise.fbiz. the MM1 stop at "Booting ..."
<xiangfu> try to update BIOS now.
<kristianpaul> hmm
<kristianpaul> better
<kristianpaul> update
<kristianpaul> or ash..
<kristianpaul> oh debian..
<lekernel> last time I used it, debian shipped with dash
<kristianpaul> s/ash/dash
<lekernel> hm, then maybe I should replace the shebang line with bash...
<kristianpaul> think that makefiles are more universal
<lekernel> not really, there are bsd make vs. gnu make problems as well
<kristianpaul> arghh, yeah
<kristianpaul> bsd uses bash?
<kristianpaul> ok, lets complicate things a bit and better use a scripting language not from gnu ;-)
<kristianpaul> now i see why people use perl
<kristianpaul> or used too ;-)
<mwalle> bah perl :b
<mwalle> worst syntax ever
<kristianpaul> yeah..
<kristianpaul> learning lua
<mwalle> ok lisp and tcl is horrible too :)
<lekernel> yeah, surprisingly tcl is very popular in the EDA world
<lekernel> all big FPGA/ASIC software has TCL scripting
<kristianpaul> ah,yes quartus for example
<mwalle> our ixia network tester has an tcl binding too..
<kristianpaul> dammit, csr bus run out of slaves...
<kristianpaul> ok, add other CSR bus or make this bigger..
<kristianpaul> let see
<lekernel> yeah, the csr bus is packed
<lekernel> you'd need to add an extra decoder bit on it, or remove a peripheral you don't need
<lekernel> mwalle: btw I saw you sent some milkymist peripheral support code to QEMU lists. how did it go?
<mwalle> lekernel: no reply yet
<kristianpaul> boot rom is intended to be a bootloader?
<kristianpaul> i mean for saving a bootloader there
<kristianpaul> ergha
<kristianpaul> never mind
<kristianpaul> that comment do not present the module instatiation :-)
<kristianpaul> okay may be rom, if lekernel have plans of using microsd as data disk
<lekernel> what is boot rom?
<kristianpaul> A comment in system.v in wich  norflash module ins instatiated
<kristianpaul> s/ins/is
<lekernel> well, this just maps the flashrom into the wishbone address space, which is used, among other things, as a boot rom to run the bios
<kristianpaul> boot flickernoise from external memory will be neat (of course not my priority or from other that i'm aware)
<lekernel> what is "external memory"?
<mwalle> lekernel: what are the blockram sizes for a spartan6? multiples of 2kb?
<lekernel> mwalle: it's implemented at the chip level with RAMB8BWER and RAMB16BWER sites... checking
<kristianpaul> s/external memory/memory card
<lekernel> RAMB16BWER is 16Kb Data + 2Kb Parity (nb. that's kilobit, not kilobyte)
<kristianpaul> Sorry is a mind typo, is okay if call it as 8:10 memory too  here?
<lekernel> and the other is half the size
<lekernel> kristianpaul: it already works
<mwalle> ok so its 2kbyte
<kristianpaul> lekernel: works mean boots flickernoise?
<lekernel> mwalle: when using RAMB16BWER yes, but you can have 1kbyte granularity with the other
<kristianpaul> also i dint work with my 1Gb kinsgstone memory :/
<lekernel> kristianpaul: try "cardboot", and if it doesn't work look at the code
<kristianpaul> oh
<lekernel> mwalle: and initializing the contents of RAMB8BWER's doesn't work reliably... lol
<lekernel> but still their Xst software will still infer RAMB8BWER when you specify an initialization file. what a mess
<kristianpaul> i dont understand well, "cardboot" is bios command, cause grep dont found it..
<mwalle> lekernel: the gdb stub uses binary transfers too. what do you think about a self clearing enable bit for the breakin statemachine?
<lekernel> so the debug ROM would reactivate break when returning?
<Fallenou> kristianpaul: I guess it has been removed
<mwalle> lekernel: exactly
<lekernel> mwalle: sounds good
<Fallenou> kristianpaul: git log -S'cardboot'
<Fallenou> will show you  the commits which have "cardboot" in the diff
<Fallenou> where you can see that cardboot() is now fsboot()
<kristianpaul> Fallenou: oh,yes
<kristianpaul> Fallenou: he, i missed this about fsboot for a long time...  thanks :-)
<kristianpaul> missed in the sense of news
<kristianpaul> now i understand two particular messages when booting :-)
<Fallenou> :)
<mwalle> lekernel: btw what is that THRU bit? loopback?
<lekernel> yes
<CIA-37> antares: Sebastien Bourdeauducq master * r4dbd06c / (6 files in 2 dirs): Basic netlist library - http://bit.ly/eNHk2I
<CIA-37> llhdl: Sebastien Bourdeauducq master * rf653e25 / (3 files in 3 dirs): netlist: new attribute format in output file - http://bit.ly/gTPFDe
<CIA-37> llhdl: Sebastien Bourdeauducq master * r17dd9d9 / libnetlist/antares.c : netlist: less new lines in output file - http://bit.ly/hHdJ44
<CIA-37> llhdl: Sebastien Bourdeauducq master * r6be7a48 / libnetlist/antares.c : netlist: consistent commands - http://bit.ly/eniK60
<lekernel> is it OK to use multiple return values of multiple calls to strtok_r? e.g. a = strtok_r(...); b = strtok_r(...); do_something(a, b);
<Fallenou> does the do_something modifies a or b ?
<lekernel> no
<Fallenou> seems ok :o
<Fallenou> as long as you provide a different context pointer for each call
<Fallenou> oh maybe it's the same context you are talking about
<Fallenou> I think the return value is  a pointer into the memory area you provided
<Fallenou> not one allocated inside strtok_r
<Fallenou> so it should stay valid even if you call again strtok_r
<Fallenou> and since it's thread safe I guess it's the case
<lekernel> ah, no, it's the same context pointer of course
<Fallenou> ok but I think you're still ok
<Fallenou> lekernel: I am thinking about the "rx buffer pool" for the ethernet driver
<Fallenou> it would make us do as follow
<Fallenou> in the interrupt top half handler : we copy data into a rx_buffer
<Fallenou> and then in the bottom half we ask for a m_buff and we copy the data inside the mbuff and pass it to tcp ip stack
<Fallenou> which makes two memcopy
<Fallenou> instead of one for the moment
<Fallenou> am I correct ?
<lekernel> no
<lekernel> what you should do instead is maintain a pool of pre-allocated buffers of the maximum ethernet frame length
<Fallenou> yes that's what i'm talking about
<lekernel> in the interrupt handler, all you do is forward the addresses of the buffers that were DMA-written by the core to the bottom half, and immediately refill the ethernet core with buffers from the pool
<lekernel> without any copy
<Fallenou> oh yes
<Fallenou> ok
<lekernel> all the pool contains is buffer addresses
<Fallenou> I just save the address and give another address to the minimac rx slot
<lekernel> yes
<Fallenou> and then I can memcopy from this address to a m_buff
<Fallenou> I get it now
<Fallenou> I am writting the patch
<lekernel> yup, and as soon as you're done writing the mbuf, you put the buffer address back into the pool
<lekernel> (all with appropriate locking ofc)
<Fallenou> yes
<lekernel> maybe you can use a rtems queue for the buffer pool
<Fallenou> I will just put a uint8_t
<Fallenou> to say if the buff is busy or not
<lekernel> that's a non-portable way of doing it (btw you can simply use int), but it should be ok
<Fallenou> why not portable ?
<lekernel> maybe it has less overhead than the rtems queue
<Fallenou> we only have one cpu core
<Fallenou> and one ethernet card
<Fallenou> the driver is only for Milkymist
<lekernel> yeah, that's why i'm saying it should be ok
<Fallenou> ok :)
<lekernel> and use int - it's a 32-bit cpu
<Fallenou> let's try to get over this rx fifo overflow first
<Fallenou> and then maybe clean the code :p
<scrts> sorry for offtopic: lekernel afaik in the past, You were creating a logic analyzer. Did You use any special algorithms to save memory? i.e. when the data is 10MHz and You sample it with 100Mhz, the memory will be filled with 10 same samples
<Fallenou> lekernel: what will it change to use int instead of uint8_t ?
<lekernel> fyi: there are several problems that lead to a "rx overflow" message, and one of them is definitely a hardware bug
<Fallenou> oh ? you think there is a hardware bug too ?
<lekernel> so we may not get rid entirely of it by just fixing the driver
<Fallenou> ok
<Fallenou> at least the software part will be better
<Fallenou> it may help track the hardware bug down
<lekernel> yeah, I guess so... sometimes I get rx overflow with the ethernet cable disconnected
<Fallenou> humm ok
<lekernel> while the driver should clear this flag
<lekernel> and the hardware should not set it again
<Fallenou> I was thinking about something else
<Fallenou> in the if (rx buffer overflow)
<Fallenou> in the driver
<mwalle> can gcc calculate the max stack usage?
<lekernel> but it could also be that the driver doesn't clear the flag
<Fallenou> maybe I should ack for ethTX irq too ?
<lekernel> mwalle: how could it do that?
<Fallenou> and re activate this irq
<Fallenou> since i reset the ethernet code
<Fallenou> core*
<Fallenou> i don't know
<mwalle> lekernel: static analysis, of course w/o recursion
<lekernel> and things like alloca()...
<mwalle> i dont use that :)
<lekernel> Fallenou: hmm... I don't remember. hopefully, it's in the minimac doc, otherwise i'd need to have a look at the verilog source
<lekernel> mwalle: i'm not aware that gcc does any static analysis
<Fallenou> lekernel: because basically if a rx overflow occurs, to return normal operation we have to reset the core, right ?
<Fallenou> will read again the doc
<lekernel> Fallenou: sorry, I don't remember this detail
<Fallenou> ok no problem
<lekernel> mwalle: btw, it also seems that gcc allows variable arrays on the stack. for example this is valid code: foo(int i) { char bar[i]; ... }
<mwalle> ...
<Fallenou> lol char bar[i]; really
<Fallenou> didn't know
<lekernel> I heard that, but I have not verified
<mwalle> i think thats even c99
<lekernel> just want to say that getting an accurate measurement of the stack usage could be tricky in some cases
<Fallenou> hum what happens if I declare a struct to be __attribute__((aligned(4)));
<Fallenou> and then I declare an array of those structs
<mwalle> lekernel: ok but no tool is worse imho :)
<Fallenou> but the size of one struct isn't a mutiple of 4
<kristianpaul> (hardware bug) you mean this from the xilinx erradata about sram?
<Fallenou> there is padding in the array ? :o
<Fallenou> between each struct ?
<Fallenou> ok nv I got confused :)
<lekernel> I don't think you can have an alignment attribute on types
<Fallenou> oh ?
<Fallenou> hum I think you can
<mwalle> no i'm on my own counting the objects on the stack, and make sure 0x100 bytes are enough :|
<kristianpaul> news !! rejon :-)
<Fallenou> btw someone got news of Takeshi ?
<Fallenou> japan .. earthquakes .. nuclear problems etc
<lekernel> yeah he's fine
<Fallenou> ok good :)
<Fallenou> hope he's not to close to a nuclear plant
<Fallenou> too*
<kristianpaul> or vulcano.. :|
<kristianpaul> proximity is relative if steam is been liberated...
<Fallenou> you mean radioactive gas ?
<Fallenou> radioactive cloud
<kristianpaul> dont know, i just watched a video about from a blog lekernel pointed at qi channel yday
<kristianpaul> i guess is vapour as the coolant is just water
<kristianpaul> anyway :-)
<kristianpaul> rejon: how was gsoc submision?
<Fallenou> according to japan authorities a small amount of water vapour has been released in the atmosphere
<Fallenou> and it is indeed radioactive
<Fallenou> they had to decreased pressure
<Fallenou> to decrease*
<CIA-37> antares: Sebastien Bourdeauducq master * r4198d3d / (6 files in 3 dirs): Read netlist - http://bit.ly/hMZNzO
<Fallenou> lekernel: line 72 of minimac.tex s/of if/or if/
<Fallenou> typo
<CIA-37> milkymist: Sebastien Bourdeauducq master * rd0241d9 / cores/minimac/doc/minimac.tex : typo - http://bit.ly/gc1CG5
<lekernel> thx
<mwalle> mh ise 13.1 seems to be a lot faster
<Fallenou> :)
<Fallenou> I think I have a new version of the driver
<Fallenou> I tested it against telnetd and it seems to be working
<kristianpaul> Fallenou: just telnet? :-)
<Fallenou> yes
<Fallenou> it was just to test that I didn't break anything :)
<Fallenou> I think if I had broken some big thing, telnet wouldn't have worked
<kristianpaul> hmm,
<Fallenou> I am testing something and then I git push :)
<Fallenou> and let you guys test if it works better
<Fallenou> with a 10  buffers pool
<kristianpaul> okay, i could try test on monday or thuesday...
<kristianpaul> 10 buffers, and before was??
<Fallenou> before there was only 4 buffers, for the 4 rx slots of minimac
<Fallenou> now 10 buffers, so more than twice the number of rx slots
<Fallenou> and the architecture of the driver has changed
<Fallenou> to manage the slots quicker, in the interrupt top half
<Fallenou> all of this should make the rx fifo overflow less frequent
<kristianpaul> ah, i see the buffer are defined on the drivers and you play with the 4 slots from minimac
<Fallenou> yes
<lekernel> Fallenou: what happens when you run out of buffers?
<Fallenou> the version of the driver you have associates (once forever) a buffer to a slot
<kristianpaul> is easy to increase the buffer pool like n?
<Fallenou> kristianpaul: yes just change a define
<kristianpaul> good
<Fallenou> lekernel: should not happen :p for the moment I think it crashes
<Fallenou> I can output a message
<lekernel> ok, can you make it so it:
<kristianpaul> at least
<Fallenou> actually it rx fifo overflow
<lekernel> 1. simply not reloads slots that can't be reloaded (and potentially causes overflow)
<lekernel> 2. reloads those slots as soon as possible in the bottom half
<Fallenou> humm not easy
<Fallenou> I will try
<lekernel> i.e. when refilling the buffer pool, if there are open slots, load them directly without going through the pool
<lekernel> well, the only part you need to be really careful about there is locking
<lekernel> it might come handy to mask the RX interrupt at times
<Fallenou> hum ok I am doing some testings right now
<Fallenou> for now I will just try with a simple version that supposes there is no overflow of the buffer pool
<Fallenou> just to test it
<Fallenou> in order to add complexity incrementally
<Fallenou> and then add this feature
<kristianpaul> Fallenou: you know what PF_RING is?
<Fallenou> no
<lekernel> it's token ring
<Fallenou> yes i'm reading it right now
<kristianpaul> yeap
<lekernel> no?
<kristianpaul> no what?
<Fallenou> no it's not token ring i think
<lekernel> well, no it's not
<kristianpaul> is a ring
<kristianpaul> hehe
<lekernel> PF_RING is a new type of network socket that dramatically improves the packet capture speed
<Fallenou> will have a look at it lter
<Fallenou> later*
<Fallenou> don't think rtems has this :)
<kristianpaul> sure not, well, but the concept may fit or tell something about how not loss packets..
<kristianpaul> i hope
<kristianpaul> :-)
<Fallenou> let's try the new pool before trying something new :p
<Fallenou> hum I got it to hang ^^
<Fallenou> it's not ready yet !
<kristianpaul> :/\/
<Fallenou> just doing some "netstats -A" in telnet hangs it
<Fallenou> after 2 or 3, bim
<Fallenou> you see, telnet is enough to make it crash ;)
<kristianpaul> oh yes..
<CIA-37> antares: Sebastien Bourdeauducq master * re934765 / (antares-pack/main.c libanetlist/interchange.c): Write netlist - http://bit.ly/gbneMz
<Fallenou> humm seems better now
<Fallenou> will try tftp to stress it :)
<Fallenou> with netstats -A it never gets after slot 1
<Fallenou> and uses slot 0 99% of the time
<kristianpaul> ttcp ! ttcp ! :-)
<Fallenou> yes tftp and ttcp ok :)
<Fallenou> if both test passes I commit push and let you guys test
<Fallenou> if it's a bad commit for you, you can still revert to the previous one
<kristianpaul> In the CSR
<kristianpaul> csr_a <= wb_adr_i[15:2]
<kristianpaul> okay, i got the part about the 14 bits sure
<kristianpaul> but why this asigment is start at 2 not 0..
<kristianpaul> or the 2 LSB iin the wishbone are ignored or used for something else?
<kristianpaul> wich i dont think so, if i have i.e. 0xe000800C
<kristianpaul> In binary: 1110 0000 0000 0000  1100 0000 0000 1100
<kristianpaul> ah wait
<Fallenou> hum nice ttcp
<Fallenou> it didn't crash :)
<kristianpaul> good !
<Fallenou> and it used slots 0 1 2 3
<Fallenou> all the slots
<Fallenou> and up to the rx buffer 7
<kristianpaul> oh
<Fallenou> but looking at the logs
<Fallenou> yeah, seems to go up to rx buffer 7
<Fallenou> not further
<Fallenou> so we have 2 buffers left before overflow
<Fallenou> will run the test again
<Fallenou> hehe yeah it's funny
<Fallenou> during the ttcp, the cpu stays 89.35% in IDLE
<Fallenou> 8.4% in MMtx (the tx daemon)
<kristianpaul> wow
<Fallenou> 1.6% in MMrx
<Fallenou> 0.252% in TTCP
<kristianpaul> btw did you fixed stats on screeen?
<kristianpaul> or something to make loot netstat better
<kristianpaul> no messy :S
<Fallenou> humm
<Fallenou> my netsats isn't *that* messy
<kristianpaul> ok
<Fallenou> I mean the only thing ugly I can see
<Fallenou> is that the number of one field is stuck to the name of the next field
<Fallenou> like
<Fallenou> RX Interrupts:  4238RXed Packets: 11747RX FIFO Full: 0
<Fallenou> is this what you're talking about ?
<kristianpaul> pStesn:d   q u e u e4 2l3iRmXietd: 5P0a c k eltesn:g t h : 0    6 2 1DRrXo pFpIeFdO: 0F u l l :
<Fallenou> wo wo
<Fallenou> don't have this on my side
<kristianpaul> ah ok
<kristianpaul> bad boy
<kristianpaul> sure was before i discover gtkterm ;-)
<kristianpaul> but no problem, later i'll confirm you
<kristianpaul> argg
<kristianpaul> ooops
<kristianpaul> ok, so, can i play hd now? :D
<kristianpaul> oops
<CIA-37> antares: Sebastien Bourdeauducq master * rb6afbe0 / (3 files in 2 dirs): anetlist: Cross reference inputs - http://bit.ly/dJvQbt
<kristianpaul> Fallenou: so..
<Fallenou> hum So it seems pretty stable for me
<kristianpaul> k
<Fallenou> kristianpaul: you will be able to test it like tomorrow ?
<Fallenou> btw the statistics I gave were with a huge printk() debug
<Fallenou> without the debug it's even better
<Fallenou> 98% in IDLE
<Fallenou> I commit, let me know if it's better or worse
<CIA-37> rtems-milkymist: Yann Sionneau master * r07ec7cb / c/src/lib/libbsp/lm32/shared/milkymist_networking/network.c : rx buffers' memory is now alloced via malloc - http://bit.ly/hbtZly
<CIA-37> rtems-milkymist: Yann Sionneau master * r44402f3 / c/src/lib/libbsp/lm32/shared/milkymist_networking/network.c : Ethernet driver now has a 10 reception buffers pool and should empty the rx fifo faster - http://bit.ly/dHPfHP
<Fallenou> enjoy !
<kristianpaul> Fallenou: i hope
<kristianpaul> yes
<Fallenou> ok good :)
<kristianpaul> Thanks Fallenou
<Fallenou> let me know as soon as it's tested
<Fallenou> no problem