#milkymist IRC log for Sunday, 2011-03-13

kristianpaulokay, lets berak some bus stabillity ;-)02:04
kristianpaulnow 45~ to wait i order to test changes on the soc.. now i understand sebastien suffering with ise..02:13
wolfspraulkristianpaul: you mean 45min for synthesis?02:21
kristianpauland P&R02:22
kristianpaulwell my pc the last wonder ;-)02:22
wolfspraulthat was the #1 complaint I heard at Elphel as well02:22
kristianpaulpc is not*02:22
kristianpaulnot bad ;-)02:44
wolfspraulif it would use llhdl, it would come down?02:45
kristianpauli'll hope yes02:46
kristianpaulif optimization is not done as lekernel said once02:46
kristianpaulalso there is P&R i think thats antares part..02:48
CIA-37antares: Sebastien Bourdeauducq master * r047c299 / (5 files in 3 dirs): anetlist: list of primitives, bels and sites - http://bit.ly/gOGPOF14:09
kristianpaulAmazing. 3 days for a password recovery from opencores..14:22
scrtsit finally arrived?14:25
Action: xiangfu able to compile the flickernoise. the flickernoise.fbi is 3M. 14:56
xiangfuafter flash this flickernoise.fbi to MM1. it cannot boot to flickernoise.14:56
xiangfuserial output stop at "Booting ..."14:56
lekernelis that a compressed image or not?15:01
lekernelif it is, you need to compile and flash the bios in git (with lzma support)15:02
lekernelor make an uncompressed image15:02
kristianpaulyeah i will suguest xiangfu update bios15:03
kristianpaulbtw xiangfu does it work for you the flash.sh script in flickernoise?15:04
xiangfunot working.15:04
Action: kristianpaul got problems with a set -e error, well i fixed the jtag script manually15:05
xiangfuI will try to update bios15:05
lekernel"working/not working" without explanations won't help much15:05
lekernelkristianpaul: so I guess you mean your shell doesn't grok set -e?15:05
lekernelor ??15:05
kristianpaulyeap that i mean15:06
lekernelwhat shell are you using?15:06
xiangfuwhen I run 'flash.sh' command run fine. after reflash the mm1 not boot.15:06
kristianpaulxiangfu: not boot after powercycle?15:07
lekernelbash 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 problem15:07
xiangfuI have tried change the ../src/flickernoise.fbiz to ../src/flickernoise.fbi.  after flash flickernoise.fbi or ../src/flickernoise.fbiz. the MM1 stop at "Booting ..."15:08
xiangfutry to update BIOS now.15:08
kristianpaulor ash..15:08
kristianpauloh debian..15:08
lekernellast time I used it, debian shipped with dash15:08
lekernelhm, then maybe I should replace the shebang line with bash...15:09
Action: kristianpaul think that makefiles are more universal15:10
lekernelnot really, there are bsd make vs. gnu make problems as well15:10
kristianpaularghh, yeah15:11
kristianpaulbsd uses bash?15:11
kristianpaulok, lets complicate things a bit and better use a scripting language not from gnu ;-)15:12
kristianpaulnow i see why people use perl15:13
kristianpaulor used too ;-)15:13
mwallebah perl :b15:16
mwalleworst syntax ever15:16
Action: kristianpaul learning lua15:16
mwalleok lisp and tcl is horrible too :)15:17
lekernelyeah, surprisingly tcl is very popular in the EDA world15:17
lekernelall big FPGA/ASIC software has TCL scripting15:17
kristianpaulah,yes quartus for example15:18
mwalleour ixia network tester has an tcl binding too..15:19
kristianpauldammit, csr bus run out of slaves...15:25
kristianpaulok, add other CSR bus or make this bigger..15:28
kristianpaullet see15:28
lekernelyeah, the csr bus is packed15:30
lekernelyou'd need to add an extra decoder bit on it, or remove a peripheral you don't need15:30
lekernelmwalle: btw I saw you sent some milkymist peripheral support code to QEMU lists. how did it go?15:33
mwallelekernel: no reply yet15:34
kristianpaulboot rom is intended to be a bootloader?15:47
kristianpauli mean for saving a bootloader there15:48
kristianpaulnever mind15:48
kristianpaulthat comment do not present the module instatiation :-)15:49
kristianpaulokay may be rom, if lekernel have plans of using microsd as data disk15:51
lekernelwhat is boot rom?15:53
kristianpaulA comment in system.v in wich  norflash module ins instatiated15:57
lekernelwell, this just maps the flashrom into the wishbone address space, which is used, among other things, as a boot rom to run the bios15:58
kristianpaulboot flickernoise from external memory will be neat (of course not my priority or from other that i'm aware)16:00
lekernelwhat is "external memory"?16:01
mwallelekernel: what are the blockram sizes for a spartan6? multiples of 2kb?16:01
lekernelmwalle: it's implemented at the chip level with RAMB8BWER and RAMB16BWER sites... checking16:01
kristianpauls/external memory/memory card16:02
lekernelRAMB16BWER is 16Kb Data + 2Kb Parity (nb. that's kilobit, not kilobyte)16:02
kristianpaulSorry is a mind typo, is okay if call it as 8:10 memory too  here?16:02
lekerneland the other is half the size16:02
lekernelkristianpaul: it already works16:02
mwalleok so its 2kbyte16:03
kristianpaullekernel: works mean boots flickernoise?16:03
lekernelmwalle: when using RAMB16BWER yes, but you can have 1kbyte granularity with the other16:03
kristianpaulalso i dint work with my 1Gb kinsgstone memory :/16:03
lekernelkristianpaul: try "cardboot", and if it doesn't work look at the code16:04
lekernelmwalle: and initializing the contents of RAMB8BWER's doesn't work reliably... lol16:05
lekernelbut still their Xst software will still infer RAMB8BWER when you specify an initialization file. what a mess16:06
kristianpauli dont understand well, "cardboot" is bios command, cause grep dont found it..16:10
mwallelekernel: the gdb stub uses binary transfers too. what do you think about a self clearing enable bit for the breakin statemachine?16:44
lekernelso the debug ROM would reactivate break when returning?16:46
Fallenoukristianpaul: I guess it has been removed16:46
mwallelekernel: exactly16:47
lekernelmwalle: sounds good16:47
Fallenoukristianpaul: git log -S'cardboot'16:49
Fallenouwill show you  the commits which have "cardboot" in the diff16:49
Fallenoufor example this one https://github.com/lekernel/milkymist/commit/94740792d447c3d52733e83c638d04c8de0354de16:50
Fallenouwhere you can see that cardboot() is now fsboot()16:51
kristianpaulFallenou: oh,yes17:04
kristianpaulFallenou: he, i missed this about fsboot for a long time...  thanks :-)17:04
kristianpaulmissed in the sense of news17:04
kristianpaulnow i understand two particular messages when booting :-)17:05
mwallelekernel: btw what is that THRU bit? loopback?18:13
CIA-37antares: Sebastien Bourdeauducq master * r4dbd06c / (6 files in 2 dirs): Basic netlist library - http://bit.ly/eNHk2I18:23
CIA-37llhdl: Sebastien Bourdeauducq master * rf653e25 / (3 files in 3 dirs): netlist: new attribute format in output file - http://bit.ly/gTPFDe18:54
CIA-37llhdl: Sebastien Bourdeauducq master * r17dd9d9 / libnetlist/antares.c : netlist: less new lines in output file - http://bit.ly/hHdJ4419:04
CIA-37llhdl: Sebastien Bourdeauducq master * r6be7a48 / libnetlist/antares.c : netlist: consistent commands - http://bit.ly/eniK6019:13
lekernelis 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);19:46
Fallenoudoes the do_something modifies a or b ?19:48
Fallenouseems ok :o19:48
Fallenouas long as you provide a different context pointer for each call19:49
Fallenouoh maybe it's the same context you are talking about19:49
FallenouI think the return value is  a pointer into the memory area you provided19:50
Fallenounot one allocated inside strtok_r19:50
Fallenouso it should stay valid even if you call again strtok_r19:50
Fallenouand since it's thread safe I guess it's the case19:50
lekernelah, no, it's the same context pointer of course19:51
Fallenouok but I think you're still ok19:51
Fallenoulekernel: I am thinking about the "rx buffer pool" for the ethernet driver20:07
Fallenouit would make us do as follow20:07
Fallenouin the interrupt top half handler : we copy data into a rx_buffer20:08
Fallenouand 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 stack20:08
Fallenouwhich makes two memcopy20:08
Fallenouinstead of one for the moment20:08
Fallenouam I correct ?20:08
lekernelwhat you should do instead is maintain a pool of pre-allocated buffers of the maximum ethernet frame length20:09
Fallenouyes that's what i'm talking about20:09
lekernelin 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 pool20:10
lekernelwithout any copy20:10
Fallenouoh yes20:10
lekernelall the pool contains is buffer addresses20:10
FallenouI just save the address and give another address to the minimac rx slot20:11
Fallenouand then I can memcopy from this address to a m_buff20:11
FallenouI get it now20:11
FallenouI am writting the patch20:11
lekernelyup, and as soon as you're done writing the mbuf, you put the buffer address back into the pool20:11
lekernel(all with appropriate locking ofc)20:12
lekernelmaybe you can use a rtems queue for the buffer pool20:12
FallenouI will just put a uint8_t20:12
Fallenouto say if the buff is busy or not20:12
lekernelthat's a non-portable way of doing it (btw you can simply use int), but it should be ok20:13
Fallenouwhy not portable ?20:14
lekernelmaybe it has less overhead than the rtems queue20:14
Fallenouwe only have one cpu core20:14
Fallenouand one ethernet card20:14
Fallenouthe driver is only for Milkymist20:14
lekernelyeah, that's why i'm saying it should be ok20:14
Fallenouok :)20:14
lekerneland use int - it's a 32-bit cpu20:15
Fallenoulet's try to get over this rx fifo overflow first20:15
Fallenouand then maybe clean the code :p20:15
scrtssorry 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 samples20:15
Fallenoulekernel: what will it change to use int instead of uint8_t ?20:15
lekernelfyi: there are several problems that lead to a "rx overflow" message, and one of them is definitely a hardware bug20:16
Fallenouoh ? you think there is a hardware bug too ?20:16
lekernelso we may not get rid entirely of it by just fixing the driver20:16
Fallenouat least the software part will be better20:16
Fallenouit may help track the hardware bug down20:16
lekernelyeah, I guess so... sometimes I get rx overflow with the ethernet cable disconnected20:17
Fallenouhumm ok20:17
lekernelwhile the driver should clear this flag20:17
lekerneland the hardware should not set it again20:17
FallenouI was thinking about something else20:18
Fallenouin the if (rx buffer overflow)20:18
Fallenouin the driver20:18
mwallecan gcc calculate the max stack usage?20:18
lekernelbut it could also be that the driver doesn't clear the flag20:18
Fallenoumaybe I should ack for ethTX irq too ?20:18
lekernelmwalle: how could it do that?20:18
Fallenouand re activate this irq20:18
Fallenousince i reset the ethernet code20:18
Fallenoui don't know20:18
mwallelekernel: static analysis, of course w/o recursion20:18
lekerneland things like alloca()...20:18
mwallei dont use that :)20:19
lekernelFallenou: hmm... I don't remember. hopefully, it's in the minimac doc, otherwise i'd need to have a look at the verilog source20:20
lekernelmwalle: i'm not aware that gcc does any static analysis20:21
lekernelhmm... http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Static-Stack-Usage-Analysis.html20:21
Fallenoulekernel: because basically if a rx overflow occurs, to return normal operation we have to reset the core, right ?20:21
Fallenouwill read again the doc20:22
lekernelFallenou: sorry, I don't remember this detail20:22
Fallenouok no problem20:22
lekernelmwalle: btw, it also seems that gcc allows variable arrays on the stack. for example this is valid code: foo(int i) { char bar[i]; ... }20:23
Fallenoulol char bar[i]; really20:24
Fallenoudidn't know20:24
lekernelI heard that, but I have not verified20:24
mwallei think thats even c9920:24
lekerneljust want to say that getting an accurate measurement of the stack usage could be tricky in some cases20:25
Fallenouhum what happens if I declare a struct to be __attribute__((aligned(4)));20:26
Fallenouand then I declare an array of those structs20:26
mwallelekernel: ok but no tool is worse imho :)20:26
Fallenoubut the size of one struct isn't a mutiple of 420:26
kristianpaul(hardware bug) you mean this from the xilinx erradata about sram?20:26
Fallenouthere is padding in the array ? :o20:26
Fallenoubetween each struct ?20:26
Fallenouok nv I got confused :)20:27
lekernelI don't think you can have an alignment attribute on types20:27
Fallenouoh ?20:28
Fallenouhum I think you can20:29
mwalleno i'm on my own counting the objects on the stack, and make sure 0x100 bytes are enough :|20:29
kristianpaulnews !! rejon :-)20:29
Fallenoubtw someone got news of Takeshi ?20:30
Fallenoujapan .. earthquakes .. nuclear problems etc20:30
lekernelyeah he's fine20:30
Fallenouok good :)20:30
Fallenouhope he's not to close to a nuclear plant20:32
kristianpaulor vulcano.. :|20:33
kristianpaulproximity is relative if steam is been liberated...20:34
Fallenouyou mean radioactive gas ?20:35
Fallenouradioactive cloud20:36
kristianpauldont know, i just watched a video about from a blog lekernel pointed at qi channel yday20:40
kristianpauli guess is vapour as the coolant is just water20:42
kristianpaulanyway :-)20:42
kristianpaulrejon: how was gsoc submision?20:42
kristianpaulFallenou: http://gramercyimages.com/blog1/2011/03/13/nuclear-emergency-all-eyes-on-fukushima/20:44
Fallenouaccording to japan authorities a small amount of water vapour has been released in the atmosphere20:44
Fallenouand it is indeed radioactive20:44
Fallenouthey had to decreased pressure20:45
Fallenouto decrease*20:45
CIA-37antares: Sebastien Bourdeauducq master * r4198d3d / (6 files in 3 dirs): Read netlist - http://bit.ly/hMZNzO21:04
Fallenoulekernel: line 72 of minimac.tex s/of if/or if/21:07
CIA-37milkymist: Sebastien Bourdeauducq master * rd0241d9 / cores/minimac/doc/minimac.tex : typo - http://bit.ly/gc1CG521:08
mwallemh ise 13.1 seems to be a lot faster21:12
FallenouI think I have a new version of the driver21:45
FallenouI tested it against telnetd and it seems to be working21:46
kristianpaulFallenou: just telnet? :-)21:47
Fallenouit was just to test that I didn't break anything :)21:49
FallenouI think if I had broken some big thing, telnet wouldn't have worked21:49
FallenouI am testing something and then I git push :)21:49
Fallenouand let you guys test if it works better21:49
Fallenouwith a 10  buffers pool21:50
kristianpaulokay, i could try test on monday or thuesday...21:50
kristianpaul10 buffers, and before was??21:50
Fallenoubefore there was only 4 buffers, for the 4 rx slots of minimac21:51
Fallenounow 10 buffers, so more than twice the number of rx slots21:51
Fallenouand the architecture of the driver has changed21:52
Fallenouto manage the slots quicker, in the interrupt top half21:52
Fallenouall of this should make the rx fifo overflow less frequent21:52
kristianpaulah, i see the buffer are defined on the drivers and you play with the 4 slots from minimac21:52
lekernelFallenou: what happens when you run out of buffers?21:53
Fallenouthe version of the driver you have associates (once forever) a buffer to a slot21:53
kristianpaulis easy to increase the buffer pool like n?21:53
Fallenoukristianpaul: yes just change a define21:53
Fallenoulekernel: should not happen :p for the moment I think it crashes21:53
FallenouI can output a message21:53
lekernelok, can you make it so it:21:53
kristianpaulat least21:53
Fallenouactually it rx fifo overflow21:54
lekernel1. simply not reloads slots that can't be reloaded (and potentially causes overflow)21:54
lekernel2. reloads those slots as soon as possible in the bottom half21:54
Fallenouhumm not easy21:55
FallenouI will try21:55
lekerneli.e. when refilling the buffer pool, if there are open slots, load them directly without going through the pool21:55
lekernelwell, the only part you need to be really careful about there is locking21:56
lekernelit might come handy to mask the RX interrupt at times21:56
Fallenouhum ok I am doing some testings right now21:57
Fallenoufor now I will just try with a simple version that supposes there is no overflow of the buffer pool22:00
Fallenoujust to test it22:00
Fallenouin order to add complexity incrementally22:00
Fallenouand then add this feature22:00
kristianpaulFallenou: you know what PF_RING is?22:01
lekernelit's token ring22:02
Fallenouyes i'm reading it right now22:02
kristianpaulno what?22:03
Fallenouno it's not token ring i think22:03
lekernelwell, no it's not22:03
kristianpaulis a ring22:03
lekernelPF_RING is a new type of network socket that dramatically improves the packet capture speed22:03
Fallenouwill have a look at it lter22:03
Fallenoudon't think rtems has this :)22:03
kristianpaulsure not, well, but the concept may fit or tell something about how not loss packets..22:04
kristianpauli hope22:04
Fallenoulet's try the new pool before trying something new :p22:05
Fallenouhum I got it to hang ^^22:05
Fallenouit's not ready yet !22:05
Fallenoujust doing some "netstats -A" in telnet hangs it22:06
Fallenouafter 2 or 3, bim22:06
Fallenouyou see, telnet is enough to make it crash ;)22:07
kristianpauloh yes..22:07
CIA-37antares: Sebastien Bourdeauducq master * re934765 / (antares-pack/main.c libanetlist/interchange.c): Write netlist - http://bit.ly/gbneMz22:14
Fallenouhumm seems better now22:19
Fallenouwill try tftp to stress it :)22:19
Fallenouwith netstats -A it never gets after slot 122:19
Fallenouand uses slot 0 99% of the time22:20
kristianpaulttcp ! ttcp ! :-)22:20
Fallenouyes tftp and ttcp ok :)22:20
Fallenouif both test passes I commit push and let you guys test22:20
Fallenouif it's a bad commit for you, you can still revert to the previous one22:21
kristianpaulIn the CSR22:22
kristianpaul csr_a <= wb_adr_i[15:2]22:22
kristianpaulokay, i got the part about the 14 bits sure22:22
kristianpaulbut why this asigment is start at 2 not 0..22:23
kristianpaulor the 2 LSB iin the wishbone are ignored or used for something else?22:23
kristianpaulwich i dont think so, if i have i.e. 0xe000800C22:23
kristianpaulIn binary: 1110 0000 0000 0000  1100 0000 0000 110022:24
kristianpaulah wait22:24
Fallenouhum nice ttcp22:25
Fallenouit didn't crash :)22:25
kristianpaulgood !22:25
Fallenouand it used slots 0 1 2 322:25
Fallenouall the slots22:25
Fallenouand up to the rx buffer 722:25
Fallenoubut looking at the logs22:26
Fallenouyeah, seems to go up to rx buffer 722:26
Fallenounot further22:26
Fallenouso we have 2 buffers left before overflow22:27
Fallenouwill run the test again22:27
Fallenouhehe yeah it's funny22:45
Fallenouduring the ttcp, the cpu stays 89.35% in IDLE22:49
Fallenou8.4% in MMtx (the tx daemon)22:49
Fallenou1.6% in MMrx22:49
Fallenou0.252% in TTCP22:49
kristianpaulbtw did you fixed stats on screeen?22:51
kristianpaul or something to make loot netstat better22:51
kristianpaulno messy :S22:51
Fallenoumy netsats isn't *that* messy22:51
FallenouI mean the only thing ugly I can see22:52
Fallenouis that the number of one field is stuck to the name of the next field22:52
FallenouRX Interrupts:  4238RXed Packets: 11747RX FIFO Full: 022:53
Fallenouis this what you're talking about ?22:53
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 :22:55
Fallenouwo wo22:55
Fallenoudon't have this on my side22:55
kristianpaulah ok22:55
Action: kristianpaul bad boy22:56
kristianpaulsure was before i discover gtkterm ;-)22:56
kristianpaulbut no problem, later i'll confirm you22:56
kristianpaulok, so, can i play hd now? :D23:07
CIA-37antares: Sebastien Bourdeauducq master * rb6afbe0 / (3 files in 2 dirs): anetlist: Cross reference inputs - http://bit.ly/dJvQbt23:34
kristianpaulFallenou: so..23:37
Fallenouhum So it seems pretty stable for me23:38
Fallenoukristianpaul: you will be able to test it like tomorrow ?23:43
Fallenoubtw the statistics I gave were with a huge printk() debug23:49
Fallenouwithout the debug it's even better23:49
Fallenou98% in IDLE23:49
FallenouI commit, let me know if it's better or worse23:49
CIA-37rtems-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/hbtZly23:51
CIA-37rtems-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/dHPfHP23:51
Fallenouenjoy !23:51
kristianpaulFallenou: i hope23:52
Fallenouok good :)23:52
kristianpaulThanks Fallenou23:52
Fallenoulet me know as soon as it's tested23:52
Fallenouno problem23:52
--- Mon Mar 14 201100:00

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