#milkymist IRC log for Monday, 2012-09-10

cdehey guys :)09:28
larschi cde09:44
lekernelhi09:55
cdeis it ok if I poweron the M1 while the JTAG adapter is plugged in and connect to the PC?11:18
cde*connected11:18
larscshould be, never had any problems with it11:20
cdethanks :) on my way to reflash now11:20
cdehmm I think the latest git already has the lockflash/unlockflash commands11:24
cdeI have the RC3 rev, do I need files from http://www.milkymist.org/updates/2011-07-13/for-rc3/ ?11:30
lekernelcde: yeah, no problems. just avoid plugging/replugging the JTAG/serial adapter to/from the M1 when the M1 is powered on or when the JTAG adapter is connected to the PC11:45
lekernelthat's old software. better use http://milkymist.org/updates/2012-03-01/11:46
lekernelor you can reflash without jtag, just connect ethernet and run the web update on the m111:46
cdethanks! I'll use jtag just to give it a try, next time I'll use either web update or rescue11:46
cdeI assume the lockflash fixes the nor corruption bug?11:47
lekernel"for-rc3" simply means that those are the images that were used in the rc3 production11:47
cdecan bios.bin be also used for the bios-rescue partition ?11:54
cdehmm let's try xiangfu's 20120717-1555 build!12:06
lekernelno, they are different12:10
cdeit works! youpi :)12:24
cdewow, the bios is very nice12:38
cdeis debian stable (squeeze) compatible with the toolchain required to build milkymist?12:43
Fallenouyes12:43
FallenouI can build the bitstream (fpga) and the bios with debian squeeze12:44
Fallenouand the toolchains12:44
FallenouI guess building rtems and flickernoise works as well12:44
cdeand there's an uart console over the ftdi. very cool!12:46
Fallenouyes !12:46
Fallenoubest way to deal with uart is to use flterm tool under "tools/" directory in the milkymist repository12:47
Fallenouflterm --port /dev/ttyUSB012:47
cdethanks. I noticed screen doesn't work too well with it, so I used microcom12:48
kristianpaulhi cde :)13:46
kristianpaulafaik screen doesnt :(13:47
larscit's because of the stupid missing carriage returns13:49
cdeI haven't compiled the soc yet, but what percentage of the fpga will remain free for additional stuff?13:50
xiangfucde, ~50%13:54
cdethat's nice! btw, http://www.milkymist.org/debian/ is 404 :(13:56
cdeoh that's normal, just need to compile the toolchain13:59
cdehmm, should update the README to mention autoconf 2.69 is required14:39
cdeand automake 1.12.2 as well14:43
cdedo I need rtems-yaffs2?14:53
cdeyep, I do14:54
cdehmm /opt/milkymist/flickernoise/src/main.c:251: undefined reference to `rtems_shell_init_env'14:56
kristianpaullarsc: yeah...15:17
larsckristianpaul: i patched my bios...15:21
kristianpaullarsc: send to upstream :)15:22
kristianpaulno fork ;)15:22
larsclekernel doesn't want it15:23
kristianpauli kwno ;)15:26
kristianpaulbut there 3 request now15:27
kristianpaulperhaps four, wpwrak ? :)15:27
kristianpauldeveloper should let wanted features to merge !15:27
kristianpaul;-)15:27
cdeoh, it's not that big a deal15:27
wpwrakkristianpaul: hmm, what issue ?15:28
kristianpaulwpwrak: missing carriage return in m1 bios15:28
wpwrakah .. i think neocon doesn't need it. or i somehow avoided running into the problem by some other means.15:30
cdehmm would it be possible to clock the vga gen core higher with a pll to enable higher resolutions?15:30
kristianpauli think that trick is used in fn15:31
kristianpaulnot sure15:31
kristianpaulwpwrak: like many other issues/bugs on m1 end by avoid running in to the problem by other means...15:32
wpwrakheh :)15:33
wpwrak"stay out of trouble" - best survival strategy ever ;-)15:33
kristianpaullol ;)15:33
wpwrake.g., don't pet that cute furry sabretooth tiger15:34
kristianpaulcome on, thats the among top15:35
wpwrakright after "let's explore this mountain where the gods are making noises and are having a smoke"15:38
kristianpauljaja15:38
cdestill having this undefined rtems_shell_init_env error :/ anybody has an idea?15:39
kristianpaulyou aplied the patches?15:39
cdehmm wait15:40
cdewhen building flickernoise, three patches are applied automatically: openjpeg-0001-for-milkymist-one.patch mupdf-0001-for-milkymist-one.patch and jansson-0001-for-milkymist-one.patch.patch15:41
cdewhen building lm32 toolchain, four patches are applied automatically: binutils-2.22-rtems4.11-20120427.diff gcc-core-4.5.4-rtems4.11-20120703.diff newlib-1.20.0-rtems4.11-20120705.diff and gdb-7.4.1-rtems4.11-20120706.diff15:42
cdegdb-7.3.1-32-bit-ism-and-more-sloppy-macros.patch was apparently not applied, although it doesn't seem related to the error15:43
kristianpaulno wait are/is other, looking...15:43
kristianpaulhttp://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/m1/patches15:45
cdemy god, it's full of patches!15:47
kristianpaulnot all apply, quilt knows15:47
cdeshouldn't they (or some) be merged upstream?15:47
kristianpaulone day will :)15:47
kristianpaulhttp://milkymist.org/wiki/index.php?title=Pending_RTEMS_PRs15:48
cdeok, almost all have been applied. export-shell-fns.patch will fix the problem15:51
cdethanks, kristianpaul15:51
Fallenoupfiou15:56
Fallenouit's becoming painful to build everything manually15:56
cdeoh, I meant almost all patches are already part of the git head. I just had to apply one manually15:59
cdeand it's compiled! very cool16:02
cdeERROR:Map:258 - A problem was encountered attempting to get the license for this architecture.16:09
cdedamn you, Xilinx16:10
kristianpaulFallenou: not at all, milkymist.org/script do most of the work16:10
kristianpaulexcept werner patches16:10
kristianpaulpatch*16:10
cdeyep, it's very straightforward16:11
xiangfucde, https://github.com/milkymist/scripts/  < ---16:13
xiangfuthis may save some of your time. :)16:13
cdeyep, I'm using precisely this, it's very useful :)16:16
cde91s to compile the whole soc! ise 13.2 is not so bad16:16
kristianpaulwhat?!16:17
cdeTotal CPU time to Xst completion: 91.53 secs16:17
cdeit used about half a gig of RAM16:18
cdehmm wait, I think it hasn't done place and route yet16:18
cdelooks like I spoke too soon. ISE is still as slow as ever before16:25
kristianpaulbtw anyone with "acess" had tried vivado?16:30
lekernelvivado is free download for everyone now16:30
lekernelit's not compatible with ISE projects or UCF files, you have to convert a bunch of stuff16:31
lekernel(not that the UCF syntax is particularly nice, though...)16:32
kristianpauloh16:32
lekernelI'm happy to see it go, assuming they didn't replace it with something even worse16:32
cdelekernel: if I load a simple test bitstream into the FPGA, do I have to ensure some I/O are pulled up or low to avoid hardware issues? (nor corruption, overheating, ...)16:41
cdehmm it would seem the LM32 runs at 50 MHz, unless I'm mistaken. is it possible to clock it higher?16:43
kristianpaulwhat soc are you building? ng or legacy one?16:45
cdelegacy I think, the latest commit is from Jun 4 (softusb: interrrupt support for navre)16:46
lekernellm32 is 80MHz16:46
lekerneland 83MHz in ng16:46
cdeit might not be a good idea to clock it higher though, even if timing allows it. I don't want to overheat the fpga16:47
lekernelit doens't overheat16:48
lekernelproblem is that FPGAs are slow, that's all16:49
lekernelif overheating was the problem, we'd have installed cooling on the M1 and clocked that CPU at a more decent frequency16:49
cdeso the compiled milkymist-ng should be compatible with my current flickernoise right? I assume only the bios must be updated (probably due to the different memory controller design)16:50
cdeso let's install python 3.2 ;)16:55
kristianpaulheat is good it means more speed if we had it ;)17:01
cdespeed doesn't matter. my first computer ran at 900 khz ;)17:02
kristianpaulcool :)17:05
kristianpaul:w!17:06
kristianpauloops17:06
Hodapp:P17:09
cdewow, tmu2 is quite a piece of work17:13
cdelekernel: is there a PoC of implementing 3D graphics using pfpu+tmu2?17:25
cdehad to apply this patch when building clang: http://llvm.org/bugs/attachment.cgi?id=775617:31
lekernelno17:40
lekernelmilkymist-ng cannot run flickernoise yet17:41
lekerneltmu should move to migen flow. should reduce the number of lines of code by a fair bit :)17:41
lekernelbut yeah... lots of work17:42
cdellvm-lm32 compiled! now compiler-rt17:43
cdeah well, I can also tinker with flickernoise on the classic soc17:43
cdehmm, lm32-elf-ar: libc.o: No such file or directory. let's check everything again17:47
cdelekernel: for the record, those two lines were not playing to well for some reason:17:53
cde#%.o: %.c17:54
cde#       $(compile-dep)17:54
cde(I commented them to make it work)17:54
cdethere is probably a nicer way to fix it17:54
cdebios.bin, here we come17:54
cdedamn, easy_install won't install networkx17:55
cdepygraphviz doesn't seem python 3.2 friendly :/17:58
cdelekernel: how did you manage to get it to work?18:01
lekernelah, yes, graphviz is a pain. but you don't need it for just building the soc, only some test benches use it.18:23
lekernelI had to compile it manually18:23
lekerneland will probably replace it with something else, the results don't look too good anyway18:24
cdethanks18:25
cdethere is http://igraph.sourceforge.net/ as a possible alternative to networkx18:33
cdehrm, my self-compiled flickernoise fails to compile Rovastar & Idiot24-719:11
wpwrakis this the only one with problems ? or just the first one where you run into them ?19:17
cdeoh, just the first. there were about 4/519:17
cdeI just moved them around19:18
cdeis there a patch that uses the CCD camera?19:18
wpwrakLekernel\ -\ FullScreen\ Video-in\ Preview.fnp ? :)19:19
cdecool19:19
cdehrm. how do I get back to the gui19:29
wpwrakEsc ?19:29
wpwrak(if i remember correctly)19:30
cdeok, my keyboard must be non-working19:30
cdethe thing with the giant caps lock key also does not work, although I can boot to the console with esc19:33
cdewell video input is working very well although the ccd camera gets hot a bit19:46
cdebtw not sure if Adam is here, but some time ago he was looking for a TSOP test clip. here's one: http://www.elitasia.com/360-Clip-for-PS3-Slim-50-pin-NOR-Flash19:49
wpwrakthe camera getting hot is "normal". not sure why they made it this way, though.19:51
cdefor those cold winter nights, I assume19:51
cdehrm those BOOTP messages in the console are annoying19:52
hellekinwpwrak: back to buenos aires20:00
hellekini'm leaving on the 15th20:00
mwalleFallenou: if i switch on the itlb, are there nops required?20:20
Fallenoumwalle: it depends on what you do afterward20:26
Fallenouif you want to switch on itlb and then jump to a virtual address20:26
Fallenoulemme check20:26
Fallenouhttps://github.com/fallen/milkymist-mmu/blob/mmu/software/include/hal/mmu.h20:27
Fallenou#define call_function_with_itlb_enabled(function) do { \20:28
Fallenouno nop20:28
Fallenouignore the comment // FIXME, it's wrong now I have to remove this comment20:28
Fallenouif you want to just switch on itlb and let the cpu continue executing the code, it depends if you map vaddr == paddr or vaddr != paddr20:29
Fallenouif vaddr == paddr it's ok, you don't need a nop20:30
Fallenouif vaddr != paddr you need 1 nop I would say20:30
mwalleFallenou: yes that was my next question, i assume vaddr == paddr is always needed for the code switching on the itlb and then branches20:30
Fallenoumwalle: if your next operation is a jump/call you don't need a nop :)20:31
Fallenoueven if the code running (activating itlb) is not mapped20:31
Fallenouat all20:31
mwallebecause the instruction is already fetched?20:31
Fallenoubecause the timing is such that the itlb is actually ON for the fetch of the instruction being jump on20:31
Fallenoujumped*20:32
Fallenouand not before20:32
Fallenouso you only need to worry about mapping the virtual address you jump to20:32
mwallemh20:32
Fallenouif it does not do this, it's a bug :)20:33
Fallenoubut so far it's OK in my tests20:33
cdehow big of a speedup will I get with ASMI as compared to the classic SoC?20:40
FallenouI think it's more the idea that it's faster to write such things with migen than writting the signaling etc code in pure verilog20:41
Fallenouhandshacking, serialising etc is done automagically with migen :)20:41
Fallenouso you only need to worry about what you want to do20:41
FallenouI guess that's a big speedup :)20:41
cdecould we get an ASMI implementation in the classic SoC?20:42
Fallenouoh sorry I said bullshit20:43
FallenouI was talking about the dataflow stuff20:43
Fallenounot ASMI20:43
FallenouI mixed up things in my head =)20:43
cdemultiplexing can be good. saves gates20:44
larscmultipexers in fpga can be expensive though20:46
cdeBUFGMUX ftw ;)20:48
kristianpaulcde: http://lists.milkymist.org/pipermail/devel-milkymist.org/2012-July/003136.html20:55
lekernelcde: ASMI should bring 2x to 4x more memory bandwidth compared to the current memory system21:02
lekernelcde: ctrl+esc to leave rendering mode21:03
lekernelcould we get an ASMI implementation in the classic SoC => bring the missing bits into milkymist-ng instead...21:03
cdeok :) very nice perfs btw! also will the next milkymist be all digital? I think audio in/out jacks would still be useful21:04
cdewhat are the missing bits?21:04
lekernelUSB for example21:04
lekerneland TMU, but that's a difficult one21:05
cdetmu is a bit scary, yes21:05
cdehow hard will it be to bring mmu into -ng?21:06
lekerneleither use DF and rewrite everything21:07
lekernelor take some of the old verilog code21:07
mwalleFallenou: shouldn't we require some number of NOPs after switching on the ITLB?21:07
lekerneleither way with ASMI you need to implement the whole http://window.stanford.edu/papers/texture_prefetch/texture_prefetch_down.pdf21:07
lekernelDF system will provide components for doing this, but I'm not finished with them yet21:07
cdehrm are you sure about the switch to lua? there's easily a 10x-50x perf reduction as compared to C21:09
lekernelshouldn't matter for high level application code like describing a file-open dialog box21:11
lekernelthis is a pain in the ass to do in C21:11
lekernelof course, performance critical software code will be in C or assembler21:12
cdeah yes, that makes sense21:12
Fallenoumwalle: what for ?21:14
Fallenouyou can put a few nops just to feel safe but they should not be needed21:14
mwalleFallenou: at which instruction can we be sure we are running out of a mapped page?21:16
lekernelcde: bufgmux is only for clocks21:16
lekernelfor regular signals you use LUT and MUXFx21:16
Fallenoumwalle: running out ? I don't get this expression21:17
cdeoh wow is wpwrak really the original author of LILO?21:17
Fallenoucde: it did the same effect on me =)21:17
cdethis is quite awesome!21:17
cdewhen grub came I had to unlearn running lilo after a kernel compile ;)21:18
mwalleFallenou: assume the transion ITLB off -> ITLB on, at some point (measured in instructions after the wcsr to PSW) instructions are fetched through a mapped page21:18
Fallenouyes , sure21:19
FallenouI will have to check, but I would say : wcsr, nop, X21:19
mwallei guess this isnt the first instruction, because in that case your call_func_with_itlb_enabled wouldnt work21:20
Fallenouand X is fetched from virtual address21:20
mwalleand if you say you dont require nops after the wcsr, you have to make sure the very next instruction after wcsr is always fetched with itlb disabled21:21
Fallenoubut it's a complex question :p21:21
FallenouI had to battle to make all of this work21:21
mwalleeg is that true if there is a interrupt between wcsr and the next instruction?21:21
Fallenoumwalle: the very next instruction after wcsr is "fetched" while wcsr is decoded21:23
Fallenouso it's fetched with itlb off21:23
Fallenouaddress->fetch->decode->execute->mem access->write back21:23
mwalleand if there is an interrupt in between?21:24
Fallenouthat's a good question ^^21:24
Fallenouit depends if it happens while wcsr is in decoding or executing stage21:25
Fallenouexception happens in execution stage so after return from exception it will go back to what was in execute stage21:25
Fallenoubut yes it's a very good question21:25
mwalleso if we require some nops after the wcsr, we make sure itlb is enabled21:26
Fallenouyes you're right21:26
Fallenouit may be safer21:26
mwalleof course you need a valid mapping for the current code21:26
mwallei guess the same is true for ITLB on -> ITLB off?21:27
FallenouI wonder if there is a use case for disactivating manually ITLB21:27
Fallenousurely21:27
mwalleat least my test case use that;)21:30
Fallenouhehe21:30
Fallenoueach time I chat here I end up thinking I need more tests :)21:30
FallenouI had a drop in motivation for a few weeks21:31
Fallenoubut I am resuming slowly the task :)21:31
mwalleFallenou: the qemu test cases should run on your milkymist too, with some adjustments21:31
Fallenougood to know :)21:32
Fallenouwhere are the tests in the tree https://github.com/mwalle/qemu/tree/mmu ?21:33
mwalleyeah, tests/tcg/lm32/test_mmu.S21:33
mwallei'm currently working on the itlb and the control interface update21:33
Fallenounice21:34
FallenouI modified my code to allow removing completely TLBCTRL csr21:34
Fallenouto just use TLBVADDR with lower bits indicating the action to perform21:34
Fallenouand to make the mapping enter the TLB while writting to TLBPADDR21:35
Fallenouit's not pushed yet because I think there is a small bug (software one I think) lurking somewhere21:35
Fallenoubut it's almost done21:35
mwallehttp://pastebin.com/wj6XY1gY thats my current testcase21:35
FallenouI mostly write my tests in C ... I should do like you21:36
FallenouI lose a lot of time to ensure the C is translated into the correct ASM code21:37
GitHub47[migen] sbourdeauducq pushed 3 new commits to master: https://github.com/milkymist/migen/compare/6490785b6c68...fc3187317b0e21:38
GitHub47[migen/master] Multi-clock design support + new instance API - Sebastien Bourdeauducq21:38
GitHub47[migen/master] examples: update LM32 instance - Sebastien Bourdeauducq21:38
GitHub47[migen/master] examples: demonstrate multi-clock support - Sebastien Bourdeauducq21:38
Fallenouif you map current code and then activate itlb, put a few nops and then calli something it will surely work21:39
GitHub101[milkymist-ng] sbourdeauducq pushed 1 new commit to master: http://git.io/b-apuw21:39
GitHub101[milkymist-ng/master] Basic support for new clock domain and instance API - Sebastien Bourdeauducq21:39
Fallenouit even work when current code is not mapped if the calli is right after wcsr :)21:39
Fallenouwhich is kind of beautiful to see working21:39
mwallehehe21:39
Fallenoubut yes after you need to worry about interruptions messing everything up21:39
FallenouI will try to fix the few remainings problems and push the changes in the "API" before going to Oslo (on friday)21:41
Fallenoumwalle: the "problem" with your code is that it would not print anything on uart :(21:42
Fallenouso it's hard to check if it's really working21:42
Fallenoubut I can run it in ISim and check the simulation results :)21:42
mwalleFallenou: adjust the macros21:43
mwalleshould be easy to send some string via uart21:43
Fallenouyes21:44
Fallenouthanks !21:46
Fallenougoing to sleep now :)21:46
Fallenougn8 !21:46
mwallegn821:46
mwallepushing my changes now21:46
Fallenoulekernel: how was the reaction to migen presentation ?21:47
Fallenouat fpga world21:47
cdeazonenberg: and its too fast for my LA <- the LA1034 is supposedly fast enough for a 125 MHz SDRAM, and it's not too expensive22:07
azonenbergcde: i was using DDR at 160 MHz22:07
cdeoh22:08
azonenbergand i've been using my internal LA lately since it can go over 200 MHz and captures synchronous to an on-chip clock22:08
cdeyour softcore is mips? is it open-sourced?22:09
azonenbergcde: an older version of it is22:09
azonenbergi'm doing current work on a private fork until i publish my thesis22:09
azonenbergat which point i'll merge back to the mainline22:10
cdeoh. I remember using plasma some years ago. it worked reasonably well, although it lacked many featyres22:10
azonenbergYeah, mine is nicer22:10
azonenbergplasma was slow, i think only three pipeline stages22:10
azonenbergmine is five22:10
cdevery nice. do you also have non aligned memory access?22:11
azonenbergNot implemented because gcc doesnt generate those opcodes by default22:11
azonenbergbut the patent is expired so i could add it if needed22:11
cdeyeah iirc some company got sued to oblivion a few years ago, very sad22:12
azonenbergwell afaik as long as you dont use the MIPS trademark when describing your design22:12
azonenbergmips1 is unencumbered now22:12
cdethat's cool22:13
cdebtw did you see the mips16 isa? not many people use it I think, it reminds of a thumb copycat22:13
azonenbergI think its still patented22:13
azonenbergand it is22:13
azonenbergMy arch is pure 32 bit22:13
GitHub25[milkymist-ng] sbourdeauducq pushed 1 new commit to master: http://git.io/x71_Sw22:13
GitHub25[milkymist-ng/master] Define clock domains instead of passing extra clocks as regular signals - Sebastien Bourdeauducq22:13
cdeI was considering implementing MIPS I too. it doesn't look exceedingly difficult without the mmu22:14
azonenbergwell i'm going to need at least a basic mmu here but it wont be mips standard22:14
azonenbergit's going to have to be full custom to interface with my NoC22:14
lekernelwhy duplicate Lattice's and Fallenou's work?22:14
cdeoh, to learn things22:15
cdeby the way is the MIPS I ISA officially described somewhere? I could only find bits and pieces22:15
GitHub21[migen] sbourdeauducq pushed 2 new commits to master: https://github.com/milkymist/migen/compare/fc3187317b0e...3b3e2f19eb2122:16
GitHub21[migen/master] setup.py: cosmetic - Sebastien Bourdeauducq22:16
GitHub21[migen/master] Merge branch 'master' of github.com:milkymist/migen - Sebastien Bourdeauducq22:16
lekernelyou could also learn a lot of things e.g. implementing ASMI prefetch+cache in the TMU22:17
lekerneland the OSHW-CPU world will not have yet another half finished, buggy and generally unusable softcore22:17
cdehmm. that's a steep learning curve ^^22:17
lekernelseriously there is like, a hundred of open source softcores projects today22:20
lekernelonly two are usable: LM32 and LEON22:20
hellekinlekernel: do you have a complete list?22:20
azonenbergopenrisc?22:20
azonenbergno experience with it but i've heard its decent22:20
lekernelopenrisc isn't usable. it's slow (less than half the speed of LM32), bloated (3x the size of LM32), and buggy22:20
azonenbergi see22:21
lekernelthere's this recent reimplementation which seems to go in the right direction, but haven't tested yet22:21
lekerneland it has no MMU. at least, LM32 has part of it.22:21
mwallegn822:22
cdein my view, an MMU is a relic of the days when software was distributed in the form of binaries and a memory boundary was needed. with software distributed in source, and memory checks added by the compiler, an MMU becomes mostly irrelevant, although it can help for memory defrag22:23
cdethe closed-source ecosystem adopted Linux precisely because it allows execution of proprietary, binary-only software. a truely Free OS would not allow that22:25
cdeazonenberg: http://code.google.com/p/utica-softcore/ <= this is your softcore MIPS CPU I assume?22:26
lekernelsomething simpler then: get USB to work on -ng using the old verilog code22:29
cdethat seems doable! well I think22:30
cdewow, 22:33
cdehomecmos is quite awesome!22:33
cdeazonenberg: looking forward to your first IC :)22:33
azonenbergLol its a ways out23:11
azonenbergcde: and yes23:11
--- Tue Sep 11 201200:00

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