IRC logs for #openrisc Friday, 2013-03-22

stekernhave you read this btw:
stekernI'm not sure if I'm superconvinced, but it's well written and fun with some less conventional ideas05:37
stekernfrom what I can understand, the concept of function pointers would be hard to implement.05:38
stekerncould be me not fully understanding the concept of the cpu though05:39
glowplugThis is extremely interesting...05:40
glowplugPossibly even more interesting than that is a 50 MIPS CPU design he links to that is 200 lines of Verilog.05:42
glowplugHow does that CPU compare to mor1kx?  I realize it lacks an MMU but are there any other massive differences?05:48
stekernI haven't looked closer, but it's a bit like comparing apples and oranges05:51
glowplugI'm starting to see that now.  Forth CPU's are very strange...05:52
glowplugAnd it looks like the entire processor is essentially an optimized interpreter for Forth code.  Very strange.05:53
stekernso if you want to run forth code, it's probably a winner05:54
stekernbtw, 8-bit avrs do 50 MIPS @50MHz too, it's not really a good measure of performance05:55
stekern+ performance is context dependant, the processors with most muscles aren't necessarily the ones with best performance for for example realtime applications05:57
glowplugAgreed.  Even at the highest level performance between different applications written in different high level languages varies dramatically.05:58
stekernto translate to your area of interest, for motor control in a drive, you don't want _any_ latency in your interrupt handling05:58
stekernwhile fo running example Linux and android etc, that has little importance06:00
glowplugI wonder if a RISC CPU (or some other architecture) could be optimized to execute C.  A J1 CPU for C instead of Forth.06:00
stekernthat's what RISC CPU's are...06:00
glowplugWait really?  They are literally optimized C interpreters?06:00
stekernoptimized for compilers06:00
glowplugThat I did not know at all.06:01
glowplugSo the mor1kx architecture is specifically designed to execute compiled C code?06:01
stekernyeah, the original idea with the risc design was to move the burdon of complexity from hardware to compilers06:02
stekernmor1kx is not an architecture btw, it's an implementation of the or1k architecture06:04
glowplugI only care about mor1kx anyways so to me it's an architecture.  =)06:05
glowplugI knew that the purpose of RISC was to simplify hardware compared to x86 which translates instructions in hardware.06:06
glowplugBut I had no idea that RISC is optimized for C.  That is extremely interesting.06:06
stekernif you design a machine that relies on the compiler to be efficient, you probably aim for a design that also maps well into what a compiler can do06:50
glowplugHave you guys made any design decisions for mor1kx that specifically relates to C optimization?07:12
stekernnot really, since that part is mostly an architecture design decision07:14
glowplugIt seems extremely important.  Linux is all C and the next generation of high level languages will be compiled down to C (pypy/topaz ect.).07:15
glowplugC probably represents the next 20 years of nearly all software.  Maybe longer.07:16
glowplugI wonder how much speed you could get with an architecture specifically designed to execute C as fast as possible.07:16
glowplugThis is something I need to do more reading on.  =)07:16
stekernwhat a compiler can do is of course a subject to change too, for example until recently, close to all DSP code was written in assembly, while now compilers are starting to be able to emit that kind of code07:18
glowplugSpeaking of that.  What is your opinion of LLVM?07:19
stekernvectorisation and compiling codes for VLIW processors are also areas where there is a lot of progress currently07:19
stekernI've done most of the openrisc LLVM backend07:20
glowplugWhat is your experience with it so far compared to GCC?  Do you have any bias against it being written in c++?07:21
stekernnot really, I prefer C, but the designers of LLVM have done a good job not abusing the features of C++ (which usually is the language's biggest problem)07:22
glowplugAre you familiar with RPython/PyPy?07:30
stekernnot to a greater extent than that I have heard the names before07:35
glowplugI really think that it is the future of all software.  The implimentation is much more pure than LLVM and it also can compile arbitrary languages.  There is a Ruby compiler called Topaz built with RPython.  And many other languages too.07:37
glowplugIt seems that implimenting a new langauge with LLVM is a much more difficult task.07:37
glowplugAnyways It's pretty late here I'm off to bed.  8)07:40
stekernquickly reading up on PyPy, it's translating into C, so it's way higher up the stack than LLVM07:41
stekernso I don't understand your comment07:41
glowplugPyPy can compile Python into C bytecode.07:42
stekernC doesn't have bytecode07:43
glowplugI'm sorry I mean machine instructions rather.07:43
glowplugCompiling to C is an intermediary step.07:44
stekernbut it doesn't do the steps after that07:44
stekernso you got PyPy->C->C-compiler->machine code07:44
glowplugI believe that is what the JIT is.07:44
stekernand LLVM does: C (clang)->LLVM asm->machine code07:45
stekernso you could easily just drop clang/LLVM into the PyPY chain07:45
stekernthen dropping the C step in between should be "trivial"07:46
glowplugThe JIT generates assembly.  I just don't know exactly how.07:46
glowplugTheir aproach is novel.07:46
stekernno, from what I understand the PyPy JIT generates C07:46
glowplugThe translator generates C.07:47
stekernah no, I missread that sentence07:47
glowplugThe PyPy system includes an application called the translator which generates .c files.07:47
glowplugThe JIT generates assembly at runtime using black magic.07:47
glowplugI've watched all of the talks on it and still don't understand exactly how it works.  Or even half.07:48
glowplugI have to get to bed though.  I will be on tomorrow.  8)07:49
stekernsleep well07:50
olofkInteresting with a modern Forth CPU. Could be quite useful for doing an Open Firmware implementation in FPGA09:31
stekernvery good point olofk, I didn't consider that at all09:44
stekernand wb btw ;)09:49
olofkThanks. It's been a while. Things have been a bit hectic with work and my girlfriends nine month place & route10:24
stekernoh, you've had one of those going on?10:29
stekernI assume you meant "girlfriend's" though? =P10:30
olofkhrrm... ok, you're right. I'm not that much of a playboy10:47
stekernsure you are =P congrats anyway10:50
olofkNot quite there yet, but so far so good. I expect to have a lot more spare time when it's out :)10:52
_franck_you won't :)10:54
stekernyeah, that's usually the way it goes... not... ;)10:54
olofkMaybe I should get a house too. I heard that also frees up a lot of time11:06
olofkI'm trying to dump part of an elf to some format that I can later use to preload a RAM. It looks like objcopy or objdump is the right tool for that, but objdump doesn't seem to generate binaries, and objcopy doesn't seem to have the --start-address option. What to do?11:22
stekernolofk: I can confirm the house thing...12:14
stekernwhat's the problem you try to solve? you want the binary to "start" at 0x100?12:14
stekernthere is an --adjust-vma option you could try12:16
juliusbI'm looking at hosting the IRC logs for this channel somewhere12:34
juliusbI'm too much of a n00b to figure out how to set up a nice little web host for the log12:35
olofkWell, the problem is that I have a stupid closed-source soft CPU from vendor X that I have to work with. I have a program that runs from an internal block ram and then jumps to external memory, but as I can't download the ELF directly to the simulation model, I need to pre init the block rams and external memory with different methods12:35
juliusbI just tried to upload it to :P but that doesn't take any more than 4kB12:35
juliusbI can't find a suitable solution, where I can a) run it on this machine (I host on this guy,so it would be easy to add a little page there with it on) b) present the logs in a searchable, portioned way12:36
olofkjuliusb: Maybe dump the data daily at opencores svn perhaps?12:37
juliusbolofk: ahh, a perennial problem with FPGA development :)12:37
juliusbolofk: yeah I was thinking opencores could host it, but a nice web interface would be best I think12:38
juliusbI could do periodic dumps12:38
juliusbbut, how to make them nicely searchable for people via the web isn't immediately obvious to me12:38
juliusbI would just host the text file, but it'd chew my bandwidth (I think) on this server12:39
juliusbI could just try it12:39
olofkMany places have searchable IRC logs. Might be worth contacting a few of them and see what they are using12:39
stekernI think what they are using is good12:41
stekernlogs2html, apperantly12:42
juliusbhmmm, but is it serachable?12:42
juliusbbecause the benefit of logs to me is that I can grep through it for something12:42
stekernyes, it is12:42
juliusbahh search bar12:42
stekernuse the "search bar"12:42
juliusbwya over in the top right! my screen is wide, I missed it :P12:42
stekernheh ;)12:42
juliusblooks good12:42
stekernolofk: can't you just include/exclude the sections then when objcopying to the bin?12:47
stekernI assume that the internal block ram part is in it's own section?12:48
olofkstekern: I'm debugging right now, so I'm not sure how the split between internal block ram (addr 0x0) and external ram (0xa0000000) will be in the end, so it will be a pain to explicitly list the section that I want to dump12:55
olofkstart-address in objdump is what I really want, but with something else than asm as output12:56
stekernwell, you can always just use 'dd'12:56
olofkThat's true, but when you said it I also realized that I need to write a custom converter anyway, so I could just let that start reading from 0xa000000013:01
juliusbok I have this so far:
juliusbalmost there....13:09
juliusbjust do add the fancy stuff...13:09
--- Log opened Fri Mar 22 12:57:10 2013
-!- Irssi: #openrisc: Total of 26 nicks [0 ops, 0 halfops, 0 voices, 26 normal]12:57
-!- Irssi: Join to #openrisc was synced in 0 secs12:57
LoneTechjuliusb: did you consider hard links?13:14
juliusbLoneTech: you can't do hardlinks for directories can you?13:42
juliusbI have :
juliusbbut search doesn't work (it's broken, I've contacted the dev with details)13:43
juliusbI have just made a little script to update things13:43
juliusband will run it as a cronjob13:44
olofkAnyone handy with hexdump? I need an endian swap14:12
LoneTechright, normally directories are not hardlinkable because .. would be ambiguous14:13
LoneTecholofk: dd is rather scary for that (conv=swab)14:14
_franck_juliusb: you just add a "/ignore -channels #openrisc * JOINS PARTS QUITS NICKS" somewhere and that will be perfect14:14
LoneTechnot sure hexdump can do specific endianness14:14
olofkLoneTech: I find hexdump syntax a bit scary too14:17
LoneTechsorry, can't think of the right tool right now. od can hexdump custom width, but again no endianness chocie14:19
LoneTechobjdump has -EB and -EL but doesn't byteswap its -s dumps, afaict14:22
olofkI haven't worked much with the obj* tools before, but my impression now is that they are not very user friendly14:25
olofkWhy both objcopy and objdump to start with? They both seem to do roughly the same thing14:26
juliusbolofk: I wrote my own python tools to do that last time I needed to :(14:39
juliusbI found things like srec_cat etc couldn't help me either14:39
olofkjuliusb: Yeah, I'm doing my own implementation too right now, but I just realized another complexity. This fucking never ends14:40
juliusbit seems it's a bug with the logs2html thing, the author responded saying he'll put in  afix asap :)14:41
LoneTecholofk: they do very different things; objcopy produces object files and objdump produces readable analysis such as disassembly14:43
juliusb_franck_: I'd like to see that as an option on the logs2html stuff perhaps...14:49
olofkLoneTech: I might have a simplistic view of this, but in my eyes, both tools take an elf as input and converts it to another format (asm, binary...)14:54
glowplugGood morning.  8)16:12
glowplugThis is a fantastic IRC logger.
glowplugHere is an example of a page it produces.
glowplugIt is also grep searchable (I believe it creates tarballs).16:20
glowplugEven more interesting is that by generating HTML pages the logs are searchable to anyone using google.  Lets say I search "open source processor" I will get google results for this IRC channel where normally you might not.  It also can be used as a "lazy mans grep".16:22
juliusbwhoops, I pasted into the wrong room before16:32
juliusbI have search working now :)16:33
juliusbhmm my cron job doesn't appear to be updating things?16:33
glowplugThese logs look pretty good too actually.  =)16:49
stekernI like that you have all days in a long list instead of dividing into year->month->day17:06
stekernmy mor1kx@atlys debugging is making progress, I've managed to catch the the place where things go wrong17:08
stekernan alignment exception is triggered on address: 0xc013fe3c17:09
stekernthis sounds awfully familiar... let's see what the irc logs says ;)17:10
stekernah, this was it:
glowplugGood morning.  =)17:17
glowplugThere are IRC logs now.
GentlemanEngineeI have set ERC to be making logs.17:20
GentlemanEngineeStill snowed in.17:20
glowplugMine does too.  Its always nice to have them on the web though.  =)17:20
glowplugMakes it easy to link others to conversations ect.17:20
GentlemanEngineeYesterday, the neighbour attempted to make it out via Ski-Doo. He didn't make it.17:21
GentlemanEngineeStated that over the drifts, he hit a four foot vertical wall of snow.17:22
GentlemanEngineeAlso, enjoying attempting to make the mor1kx test bench.17:24
glowplugA jetski to drive through snow!  Hahaha17:27
glowplugWhat about a snow mobile?17:27
GentlemanEngineeA Ski-Doo *is* a snow mobile.17:29
glowplugOH interesting!  I did not know that Ski Doo brand made snowmobiles.  Here all of the Ski Doo's are Jet Ski's.17:31
glowplugLearn something new every day.  =)17:31
GentlemanEngineeI believe the Jet Skis are Sea-Doos...17:33
glowplugAhh yes.  I should probably wake up before joining channels.  This will forever be saved in the logs of time.17:36
GentlemanEngineeThat is what an EMP is for...17:37
GentlemanEngineeActually, what is rather amusing is when those suffering from ennui use a Ski-Doo as a Sea-Doo.17:45
glowplugThis is something that I now have to YouTube....18:00
juliusbstekern: found a nice little bug in mor1kx - when hammered with IRQ and tick, it will behave badly18:01
juliusb2 corner cases have emerged - should be simple to fix on all pipelines18:01
juliusbhave test and fix18:01
juliusbwill commit tomorrow18:01
glowplugAre you guys familiar with Contiki?18:06
glowplugIts a realtime networked OS for microcontrollers.18:09
stekernjuliusb: nice, what's it related too?18:15
stekernmore than it emerges when hammered with irq and tick18:15
stekernI like this part of bug hunting, when you know you have found the place where things go wrong and you just have to figure out why they go wrong18:18
GentlemanEngineeI detest the stage just prior to that.18:20
GentlemanEngineeThere is nothing wrong, so there is nothing to correct. It simply does not function.18:20
stekernexactly, maybe I like this part so much, because you've just left that annoying part behind you18:41
stekerns/maybe I/maybe that's why I18:42
GentlemanEngineeI do like your perl corrections...18:49
stekerngiven that sed predates perl, I believe a more correct term would be 'sed corrections'19:01
GentlemanEngineeFair enough.19:02
GentlemanEngineeIn other words, "That's what he sed"...19:02
stekerneven more correct would be if I'd make less mistakes while typing...19:02
stekernanyone fluent in gdb scripting?19:04
stekernor even the slightest clue is probably enough to solve my problem19:05
stekernI want to do a loop where I do: spr npc 0x100; si; si; until the result is 0x10419:05
stekernno wonder things weren't working... I had misspelled the name in my define...19:18
GentlemanEngineeA recipe for guaranteed failure...19:21
stekernbut I still can't figure out how to get the output of the si into a variable19:22
stekernif at all possible19:22
GentlemanEngineeI have yet to review the assembly for the processor.19:22
stekernit's pretty straightforward19:23
GentlemanEngineeNo, I was stating that I could not assist you on this matter, as I had not yet familiarized myself with the assembly.19:24
stekernah, I see. But 'si' is a gdb command, stepping one instruction.19:27
GentlemanEngineeSorry, I thought it was being used as a register.19:28
GentlemanEngineeHello stekern.21:26
stekernhello, still here :)21:30
GentlemanEngineeI am attempting to find the results of the Icarus Simulation from the Makefile in boards/generic/or1kx/sim/run.21:31
stekernare you running make rtl-tests?21:34
GentlemanEngineeI did a simple make.21:34
GentlemanEngineeApparently I require ork1k-elf-gcc.21:36
stekernah, yes21:37
stekernbuild instructions:
GentlemanEngineeLooking at building it from source.21:39
GentlemanEngineeAlso has a tendency of complaining that "mor1kx-dev-env-master/boards/generic/mor1kx/sim/run/../../modules: No such file or directory"21:39
stekernyeah, you can ignore that...21:40
stekernor just create the directory to get rid of it21:40
GentlemanEngineeI was concerned that I was missing some source files.21:41
GentlemanEngineeIs that not the case?21:41
glowplugIt may be that the folder does not exist because git does not commit empty directories.21:45
GentlemanEngineePerhaps place a token file in it.21:45
stekernor just remove the whole thing from the makefiles21:47
stekernit's not used for anything21:47
GentlemanEngineeThat could accomplish well as well.21:47
stekernlook, you're already things that needs improvement, and you haven't even got to examining the mor1kx core yet! =P21:48
GentlemanEngineeI can make myself a frequent irritation...21:51
stekerncritical eyes on stuff are always good21:53
GentlemanEngineePerhaps I should request write access at some point to start adding fixes...21:53
stekernyou can just get a github account and post pull requests21:59
GentlemanEngineeI thought it might be invite only...22:00
stekernanyone can make a github account22:01
GentlemanEngineeNo, the posting changes to the mor1kx...22:02
glowplugEnginee are you trying to push your fork to your own repo?22:03
GentlemanEngineeNo. No.22:04
stekernno, there's no restrictions on posting a pull request. a bit of the same story as there are no restrictions on posting patches to the mailing lists.22:05
GentlemanEngineeI was referring to changes such as the token file, and eventually my memory controller...22:05
glowplugYou can make any changes you want and then put in a request which can either be accepted or denied by the repo maintainer.22:05
glowplugThe best way to do that is to clone.  Then push everything to your own fork.  Then make changes on your fork.  Then ask for requests later when you think that it is ready.22:06
glowplugHave you already created your own repo with the entire contents of the project cloned?22:07
GentlemanEngineeNone of that yet.22:07
GentlemanEngineeI was not ready.22:08
GentlemanEngineeI was commenting after you had stated me finding little issues to be corrected.22:08
glowplugIts best to commit to your repo right away that way you can start a public record of your changes and descriptions of your commits.22:09
glowplugThat lets everyone understand better the work you have done.22:09
glowplugPushing to the main repo is an extremely late-stage step.22:09
glowplugThe nice thing about git is that we can see exactly what you changed and when which gives the least effort for determining whether to commit the changes to the main branch.22:10
glowplugIf you make changes only locally its a lot harder.22:10
GentlemanEngineeAlright, that is a differing philosophy from what I am used to.22:13
GentlemanEngineeHowever, I can work with it...22:13
glowplugThere is a talk by Linux about why he created git and how it is completely alien to subversion ect.  Let me find it.22:14
glowplugIt is extremely different.  Haha22:14
glowplug*by Linus22:14
glowplugLong story short he completely refused to develop the kernel at one point until a decent source management software was available.  Nobody made one so he wrote it himself.  xD22:15
glowplugHe explains it a lot better than I can though.22:16
GentlemanEngineeYes I am used to the CVS/SVN Paradigm...22:16
glowplugYou are really going to enjoy his talk then.  Hahaha22:17
glowplugI think at one point he says that anyone using subversion should "kill themselves".  LOL22:18
glowplugVery opinionated....22:18
glowplugHe explains a lot of high level things.  From a physical command level basically there is a folder with some log files that contain file locations, directory structure, and history of file changes including what lines changed ect.  When you create a new repo from an empty directory or clone one there is a ".git" folder with this data.22:20
GentlemanEngineeI am rather opposed to suicide.22:21
GentlemanEngineeYou see, I intend on living forever.22:21
glowplugYeah he's not the nicest guy on earth.  Unfortunately nobody can live without him.  8)22:21
GentlemanEngineeAnd I must state that the plan is working rather well so far...22:21
stekerngood thing you're on your way to start learning git then :)22:22
glowplugIt is a very slow process to master git.  I'm really new to it also.22:22
glowplugSo you already have a cloned repo and you created a github account.  Now you need to commit your changes (dont forget a description of your changes) then push to your own repo (this will require setting up some SSH keys which is explained on the github page).22:23
stekernyou can just push to the https address and use your github username and password22:24
glowplugDon't encourage that!  Haha22:24
glowplugOnce you have whats called an "initial commit" things get easier.22:24
glowplugEverytime you make a change commit those changes to your repo with another description of those changes.  Your repo will reflect all of these commits as a history or a log of changes.  Including saving deletions ect.22:25
stekernwell, if you don't want to go through the hassle of setting up ssh keys first thing (which is rather easy, though)22:26
GentlemanEngineeMore to do...22:26
glowplugIt is quite a bit better to use SSH.22:26
glowplugIt's faster, more secure, and easier after the initial setup (no entering password every single time you commit).22:27
glowplugIf you commit alot that can get annoying.22:28
GentlemanEngineeMore yak shaving...22:28
glowplugHaven't heard that in 10 years! Hahaha22:29
glowplugI would say that typing passwords over and over into a terminal is the hyak shaving.  Setting up SSH really is much more efficient.22:30
GentlemanEngineeI was referring to creating the github &c.22:30
glowplugNot to mention the obviously worthless security of SSL vs SSH.22:30
glowplugOh yeah you *need* the github account.22:31
glowplugYour future as a distributed free developer depends on it.  =)22:31
stekernyou only have to enter passwords when you're pushing, you can do however many commits and not push22:32
glowplugI'm sorry thats what I meant.  Pushes.  =)22:32
GentlemanEngineeIt definitely sounds pushy...22:33
stekernI still "have" to enter my password when I push, even if I use SSH22:33
glowplugThat is because your initial commit was likely done over HTTPS.  If you navigate to your .git folder and change the url to you can push without a password prompt.22:36
stekernI've never used the https22:36
glowplugDid you use the clone command to create your local copy?22:37
glowplugI believe that uses HTTPS which will retain your hardlink to the HTTPS repo location.22:38
glowplugThe .git/config file has the location data.22:39
stekerndepends on the repo, usually I've created them locally first and then just added a seperate github remote22:40
glowplugIt should deffinately not ask for a password...22:41
GentlemanEngineeActually, I just downloaded a Zip.22:44
GentlemanEngineeI was wishing to see if the code was something I could work on.22:44
glowplugOh I see.22:45
glowplugGetting the code through git is super easy.  Just do "git clone" in a terminal.  =)22:46
glowplugIt will automatically download everything for you.22:46
glowplugHere is some information about push/pull without password prompts.
stekernI _want_ it to ask for the password22:47
glowplugUnless someone else has physical access to your files its impossible for someone to access your account.22:48
glowplugThey need your private key.22:48
stekernI know22:48
glowplugFair enough.  =)22:48
glowplugThat is *extreme* tier security.  =D22:49
glowplugFor Enginee's purposes though configuring SSH so he can do pushes without a password is a very nice convenience.22:51
GentlemanEngineeI have gitted mor1kx. Hazzah!23:29
GentlemanEngineeFree bits for all! *23:30
GentlemanEnginee*Limited time only. Only one bit per customer. No additional offers may be used in conjuction with this offer.23:30
glowplugOne small step for man. One giant leap for distributed development.  8)23:34
GentlemanEngineeSo, now I stay fresh by gitting from
GentlemanEngineeAnd I push to my own tree when ready?23:36
glowplugThis is where things get a little tricky.23:38
glowplugYou can pull from the master branch and work on your own branch simultanously.23:38
glowplugOh wups you got d/c.23:39
GentlemanEngineeOf a sort...23:39
glowplugIf you need to pull from the master branch you need to read on how to pull from master and work on your own branch simultanously.23:39
glowplugThat is the part of git that can get a little complicated.23:40
glowplugBasically you are working on a single codebase and each branch represents a group of changes over time.  You can make changes to files and commit them to your branch using git.  And also pull from the master branch.23:41
glowplugAnd everything stays together in your same local directory.23:41
glowplugIts an elegant system but takes some time to get the commands down ect.23:42
GentlemanEngineeI would imagine...23:42
GentlemanEngineeDid a Linux Fairy just get its wings?23:42
glowplugVery possibly.  =)23:43
--- Log closed Sat Mar 23 00:00:35 2013

Generated by 2.15.2 by Marius Gedminas - find it at!