IRC logs for #openrisc Sunday, 2014-05-11

--- Log opened Sun May 11 00:00:43 2014
blueCmdstekern: ah, cool - thanks. didn't think of using xor for a negate like that06:17
stekernI use it all the time to calculate two's complement in speedcrunch ;)08:12
stekernxor(12345;0xffffffff)+108:12
blueCmdI feel I'm probably missing a lot of stuff in my define_insns - they are much smaller and easier to read than the other arches08:32
blueCmdwhich tend to mean it will explode when -O is used08:32
rfajardoHello everyone, I am trying to run a compiled Linux under or1ksim. When bringing the loopback device up, I get a flood of “Warning: Ethernet packet length 0 too small.”. Any ideas why?08:35
blueCmdwhich Linux are you using? (as in, where did you get it?)08:36
rfajardogit clone git://git.openrisc.net/jonas/linux08:39
rfajardoMaybe I need something in my rxfiles and txfiles… not sure. I should grab some Embecosm’s application notes.08:46
blueCmdright, that should work08:46
blueCmdlooback device = lo right?08:46
blueCmdfor lo you shouldn't need tx and rx, it doesn't leave the kernel08:47
rfajardosounds reasonable.08:52
rfajardoEmbecosm’s EAN2 says that or1ksim does not play well with Linux’s Ethernet .08:52
blueCmdor1ksim works just fine08:53
rfajardoI must certainly say that I’m on OS X :P08:53
blueCmdas long as you use jonas's repository08:53
blueCmdwhat gcc are you using?08:53
rfajardostable linux08:54
rfajardogcc version 4.5.1-or32-1.0rc4 (OpenRISC 32-bit toolchain for or32-linux (built 20140421))08:54
blueCmdthat's quite ancient, don't know if it matters though08:54
blueCmd4.9.0 is the latest we have I think08:55
rfajardoI have heard that you cannot compile Linux with the current toolchain.08:55
blueCmdhm? should work just fine08:55
blueCmdwhere did you hear this?08:55
rfajardoI have indeed compiled the development version and failed to compile Linux. This occurs because the current toolchain requires libintl to be linked into it and Linux does not like it.08:55
rfajardostekern08:56
rfajardohttp://pastebin.com/zz8TTMi308:56
rfajardomy explanation above is wrong though.08:57
rfajardo“The reason why it's not working with the or1k-linux-* toolchains is that it builds libgcc.a with -fPIC (and it has to do that)”08:58
blueCmdrfajardo: pretty sure that was fixed in https://github.com/openrisc/or1k-gcc/commit/bdd3ad496930c61218ea683b9fd3dbcc093b9a14 though08:58
stekernrfajardo: yes, we just fixed that08:59
stekernbut it's unrelated to your problem with the loopback device, I don't think I've ever seen that09:00
rfajardoI should just give up this darn osx.09:03
rfajardoBut since you go further and further, you end up thinking you’re just about to arrive :).09:04
blueCmdstekern: I'm thinking gcc alignment09:04
blueCmdthat was changed, I don't know if he has anything in his system that might have been built with the alignment/padding removed09:05
rfajardoNice that you fixed that :).09:05
rfajardoblueCmd, do you think I should try with the development version of GCC?09:09
rfajardoAnd is gcc alignment?09:09
stekernblueCmd: ok, let's start over from scratch on the Linux "SMPing", this is the first commit towards that: http://git.openrisc.net/cgit.cgi/stefan/linux/commit/?h=smp&id=ae421650e81dabc4f9cddb3f705f81acf2f19c1009:14
stekernwe'll need to properly bring up the "spr scratch" reg though09:16
stekernI'm thinking maybe if we define that it could be possible to implement another GPR set without having the whole "fast context" thing...09:17
blueCmdrfajardo: yes, please try with the latest shiniest09:18
stekern*"spr scratch" reg discussion09:18
blueCmdstekern: looks fair09:19
stekernthe ifdefs didn't become as hideous as I had imagined neither09:20
stekern...but only because I extended the SPR_ISRs from 2 to 8...09:21
rfajardothanks blueCmd, I will try it soon enough09:23
rfajardogotta run now. Take care folks. See you soon.09:23
blueCmdlogging off from IRC? what is this, the 1980s?09:24
blueCmd:)09:24
juliusbhow do I respond in-line to a comment on the github: https://github.com/openrisc/or1k-src/pull/709:32
juliusbI want to respond to the comment about the "patching"09:32
juliusbMy guess is that there was a test for the presence of a peripheral at some point by inserting a jump instruction in the bus exception vector so that when the access occurred, the exception was redirected to a function which indicated it wasn't there, and then cleaned up and continued with that knowledge09:37
juliusbI vaguely remember either writing or working with something like that09:38
juliusband hence the comment about disabling the cache or something, at that point, so that writing the new instruction would work09:38
juliusbAnyway, I wanted to write ^^^^ on the github page but can't figure out how to respond inline like stekern did :-/09:38
stekernjuliusb: you put your mouse over the line you want to comment, and then on the left side there's a "talk bubble" with a plus sign in it, press that09:53
juliusbahh, too easy, thanks. I was looking for the comment button on the main page there09:59
blueCmdstekern: if you have time, could you please test http://openrisc.debian.net/tmp/atomic-compare-exchange-1 (there are a couple of files named atomic-compare-exchange in that directory), run them and report exit codes?10:10
blueCmdI had a set back in my development environment so I need to set up a new NFS and or1ksim host, which I don't have time to do just now10:10
stekernblueCmd: sure10:13
stekernroot@or1k-debian:~# ./atomic-compare-exchange-110:14
stekernAborted10:14
stekernah, sorry "directory"...10:15
stekernit downloads a file when I open that link10:15
blueCmdyes10:16
blueCmdit's a file10:16
stekernok... you m10:16
stekerneant in the /tmp dir10:17
blueCmdyes10:17
blueCmdsorry if I was unclear10:17
stekernwhen you spoke about directory10:17
blueCmdtry -310:17
stekernroot@or1k-debian:~# ./atomic-compare-exchange-310:18
stekernAborted10:18
blueCmdah I see. it's going to abort anyway, I don't care about the memory model and it does some stupid things and expect failures10:18
blueCmdstekern: I updated -1 with traces10:22
blueCmdalso updated -3 with traces10:25
stekernroot@or1k-debian:~# ./atomic-compare-exchange-1\ \(2\)10:26
stekern2310:26
stekern2610:26
stekern3010:26
stekernAborted10:26
blueCmdoh, nice!10:26
blueCmdtry again plz!10:29
stekernsame10:39
blueCmdreally? hm10:39
blueCmdfor both -1 and -3?10:39
stekern(wget is confirmed to work now)10:39
stekernroot@or1k-debian:~# ./atomic-compare-exchange-310:40
stekern2210:40
stekern2510:40
stekern2910:40
stekernAborted10:40
blueCmdstekern: mind redownloading them?10:45
blueCmdI haven't changed anything since last time, but rebuilt them and rebuilt gcc10:45
stekernno problem, but the result is the same10:52
blueCmdhm. the test that is failing is in that case:10:52
blueCmdfirst this one is successfully executed: __atomic_compare_exchange_n (&v, &expected, max, STRONG , __ATOMIC_RELAXED, __ATOMIC_RELAXED)10:53
blueCmdthis is then what follows: __atomic_compare_exchange_n (&v, &expected, 0, STRONG , __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)10:53
blueCmdhm. the test says that the later should fail10:55
blueCmdexpected contains the old valud of v, i.e. 010:57
blueCmdthat it prints 30 confirms that expected is 010:57
blueCmdv is then max = ~010:57
blueCmdthat means that cas(v, 0, 0) should fail since v != 010:58
blueCmdbut it doesn't fail10:58
blueCmdstekern: you should give me shell access to the thing you're testing on ;)11:01
stekernI'll try running it in or1ksim too, this is on real hw11:04
stekernfix login-as-normal-user and I will ;)11:04
blueCmdl.sfeq          r4,r4    # cmpxchg: cmp11:04
blueCmdI think that has something to do with it :P11:05
stekernI suppose that's not intended ;)11:06
blueCmdhah, no11:06
blueCmdoh well, "the latency is too damn high" to code on this bus anymore11:14
blueCmdgood progress though11:14
stekernis it a short bus?11:18
blueCmdstekern: haha11:20
blueCmdstekern: there! try again :)13:10
blueCmdI only recompiled -1 and -313:12
stekernblueCmd: sure, will do. right when I'm back home13:37
blueCmdstekern: I configured or1ksim and running it with static binaries and embedded initramfs14:11
blueCmdfor me -1 runs to "40"14:11
blueCmd-3 runs to 10414:11
juliusbdoes a fusesoc usage guide exist anywhere?15:23
juliusbdoc/ in the sorce?15:23
olofkjuliusb: Not really. We got Andrew Back's article, the orconf2013 workshop stuff and _franck_'s blog post15:24
olofkdoc just contains the format specification of the .core and .system files15:24
juliusbcool, OK. I'm looking at it for chiphack in a couple of weeks, so I'll try to do what I can15:24
juliusbwhere would be the preferred location/format for a usage guide?15:24
olofkGood question15:24
olofkIn fusesoc/doc I guess. I'm not that picky about formats, so markdown, asciidoc, latex is fine15:25
olofkOr Microsoft Works15:26
olofkBest not-compatible-with-anything-not-even-with-itself office suite I have ever used15:26
juliusbI'll do my best ;)15:27
olofkAnd I must say that starting work on a user guide is awesome. Please pester me with questions if I can help out15:28
juliusbOh yeah, you didn't need to ask me to do that ;)15:28
olofkI suspected as much :)15:28
juliusbI've already modified the INSTALL file. It wasn't obvious that I had to do the autoreconf ./configure etc. stuff if I was going to use it in developer mode (not install it )15:29
juliusbbut I'm too stupid to remember how to work with git to submit it :-/15:30
olofkHmm.. do you really need to do that?15:30
juliusbI'll figure it out15:30
juliusbyeah fresh out of git there was no fusesoc file15:30
olofkI'm using "python /path/to/fusesoc.in"15:30
juliusbjust fusesoc.in and it refused to run15:30
juliusbah right15:30
olofkAh yes. You can't run it because of the unexpanded env stuff15:31
juliusbI did autoreconf -i, ./configure && make, then I could export PATH=$PATH:/path/to/fusesoc/bin15:31
olofkCool. Yeah that works too15:31
olofkYou could use the tar ball as well. There aren't that many commits since I released it15:32
juliusbYa, true. It is "./configure && make"'d in the tarball?15:32
olofkyesp15:32
olofkyes15:32
juliusbkk, i'll make a note15:32
olofkI've been thinking about making a .deb for the released versions15:34
olofkApart from the EDA tools, I think that python and SVN would be the only deps15:34
juliusband git?15:35
olofkActually no15:35
juliusboh wow15:36
olofkYou can just ask github to give you a tarball for any state of the tree, so I figured that would be more lightweight and could drop the git dep15:36
juliusbAh cool, handy.15:37
juliusbso I go and run the wb_bfm test. All good. how come it prints out nothing but a success message? I want the gory details man.15:37
juliusb... and there's no indication of such an option in fusesoc sim --help15:37
olofkYes. That's pretty fucked up since it takes some time to run it15:38
olofkThere's no fucking clue that it's doing anything15:38
olofkRun the wb_ram tb instead. It's at least a bit more fun to watch15:39
juliusbanother Q - is it possible to compile the doc .txt files? They look like asciidoc or something15:40
olofkNo, run wb_intercon test bench instead. That one gives a bit more output15:40
olofkYes. It's asciidoc15:41
olofkhtml is the default output. You should be able to generate a PDF as well via docbook or something, but I haven't tried that15:41
olofkAs usual it probably takes the route via latex15:41
juliusbdo the scripts know how to make it though? 15:42
olofkWhich scripts?15:42
juliusbthe make flow which is in there15:42
olofkThe fusesoc make flow?15:43
juliusbya, like I can't go "make doc" to make it compile the documentation it seems15:43
olofkah no. Sorry. Hadn't thought of that actually15:43
juliusbwant me to lodge a feature request?15:43
olofkPlease do. That's probably the way we want it15:43
juliusbi like github. That's such a nice, simple, integrated way to track this sort of stuff15:46
olofkYeah. They have a lot of nice extra features15:47
olofkI like the markdown integration. I've started dropping README.md files in the cores for quick documentation15:47
veprblDo we really need this autoconfig magic in fusesoc?15:51
veprblIs it really working? I think there is no point in remembering all these python paths because libpython still has to be found somehow...15:51
veprblFor example I'm using RHEL based distro with python2.7 from scl repos (installed in /opt)15:53
olofkAll right then. My blog has been updated http://olofkindgren.blogspot.se/2014/05/openrisc-health-report-april-2014.html15:53
veprblI do ./configure and it's all warm and fuzzy15:53
veprbl#!/usr/bin/env /opt/rh/python27/root/usr/bin/python15:53
veprbl    sys.path[0:0] = ['/usr/local/lib/python2.7/site-packages']15:53
veprblbut once I disable scl environment it just goes15:54
veprbl% /opt/rh/python27/root/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory15:54
veprblolofk: And I've never seen anything like that in any python program. Did you invent all that by yourself?15:55
stekernblueCmd: 104 and 40 here too15:58
_franck_veprbl: FWIW I use a RHEL based distro. When I use fusesoc, I install python2.7 in /bla/bla then "export PYTHON=/bla/bla/python2.7" then ./configure15:59
veprblIf it's all pure python, I would imagine that it will be managed by setuptools/distutils/pip16:00
veprbl_franck_: yes, I understand that. SCL is a fancy way to do the same. but if you take away that env var it will break and ./configure magic probably was made for this16:03
juliusbis there any way to expose what fusesoc is doing to the terminal? like the exact commands its running?16:04
juliusbalso, is there only one testbench per core it can run? is it possible to run the core sim but with a different test?16:04
veprbljuliusb: maybe some echo in Launcher@fusesoc/utils.py will help16:07
olofkveprbl: I thought that was the standard way of doing it actually. I looked through a couple of autoconf powered python projects16:11
olofkjuliusb: All external commands are wrapped in a launcher in utils.py. Easiest way would be to make the Launcher class put the command in the log16:15
juliusbcool yep. I'm hacking some bits and pieces into Launcher's run function16:16
juliusbAh, I love it. Seriously easy FPGA image building :)16:24
olofkAnd currently only one tb is supported. Three solutions come in mind16:59
olofk1) Add a command line option to select alternative tb16:59
olofk2) Create an additional core with only a tb that depnds on the first core17:00
olofk3) Use plusargs to select tb at runtime17:00
olofk3 is of course the coolest option, but will probably need the most hackery in the RTL17:00
juliusbwell, yeah, it would require you elaborate all testbench RTL, which probably isn't the end of world17:02
olofkjuliusb: If you want som plusargs inspirations, you can look at the wb_intercon testbench where you can set --transactions=<number of transactions>17:02
olofkYeah, I think it's an ok trade off as well. Just keep the unused stuff in reset and kill the clocks to bring down the number of simulation events17:03
olofkveprbl: I originally planned to use setuptools/distutils/pip/pypy/distribute/easy_install... but the problem was exactly that. Packaging in python is a fucking mess. A few lines of autoconf stuff turned out to be way more sane17:04
olofks/pypy/pypi17:05
veprblolofk: could you be more specific: what was the problem that was solved?17:07
veprblI mean we definitely want "make install" or "python setup.py" or "pip install fusesoc", but the part with fusesoc.in is just confusing17:19
blueCmdstekern: cool, thanks17:33
blueCmd(qemu) I wonder if we can implement ll/sc as simple load/store and always set the flag for l.swa17:35
stekernhmm, yeah... at least in usermode17:46
stekernbut doesn't mips et al implement their counter parts?17:46
stekernheh.. http://www.tldp.org/HOWTO/SMP-HOWTO-3.html18:26
stekern"MIPS, m68k and ARM does not support SMP; the latter two probly won't ever."18:27
stekernblueCmd: are you ready for todays SMP milestone in form of a commit?18:50
stekernwell, ready or not, here we go: http://git.openrisc.net/cgit.cgi/stefan/linux/commit/?h=smp&id=44ba9499db6fdd99e492ca066a423594080183a018:51
stekernnext milestone - fix the torrent of build errors that happens when that is enabled18:52
stekerna lot are related to atomics18:52
olofkveprbl: This fixes the problem where the fusesoc modules is installed in a path that is not in PYTHONPATH19:43
olofkDefault make install without setting PREFIX installs fusesoc into /usr/local/ somewhere, and python won't normally look there, so the fusesoc binary can't find the fusesoc module19:47
olofkBut I'm all for finding a better method. I totally agree that it would be great to get rid of fusesoc.in19:47
blueCmdstekern: woha woha woha21:46
blueCmdthat commit. it changes too much21:46
blueCmdand where are the tests? how do I know it works?21:46
blueCmdthis is not agile / webscale / ms-pl21:46
blueCmdstekern: I couldn't find any real "aha, that's how they do it" looking at MIPS - since qemu doesn't support threads anyway I figured that it might work just fine anyway21:48
--- Log closed Mon May 12 00:00:44 2014

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