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

--- Log opened Wed Nov 05 00:00:14 2014
poke53282stekern: Can you write a non-zero file with the vi of busybox and check the output size of the file?02:35
poke53282please02:37
stekernpoke53282: absolutely04:07
stekern~ # ls -al test04:08
stekern-rw-r--r--    1 root     0                0 Nov  5  2014 test04:08
poke53282you might take a look in the musl irc channel04:08
poke53282I have found an error.04:08
poke53282in musl04:08
stekernok, I assume that when you do that it's not 0?04:09
poke53282Did you write an empty file?04:09
poke53282It is always zero. And this is the problem.04:09
poke53282At least for me.04:10
stekern?04:11
stekernI've just woken up, you have to speak slowly and very clearly ;)04:12
poke53282open vi, write some text and save the file. And check the size.04:12
stekernyes, that's what I did?04:13
poke53282and the size turns out to be zero, which is obviously wrong.04:13
stekernis it?04:13
poke53282This would be a bad text editor otherwise.04:14
poke53282at least, this is what you posted above. Zero04:15
poke53282004:15
stekernwell, this is what happens when I do the same on my x86_64 ws:04:16
stekern$ ls -al test04:16
stekern-rw-rw-r-- 1 stefan stefan 0 Nov  5 06:15 test04:16
poke53282":wq test" in vi?04:19
stekernyes04:19
poke53282Either you didn't write a text in vi or you must be kidding, or it is indeed too early.04:20
stekernmaybe it's my turn to ask 'stupdd' questiions today, why isn't an empty file expected to be 0?04:20
poke53282!!!non-empty!!!04:21
stekerndon't write empty when you mean non-empty then ;)04:21
poke53282"open vi, *write some text* and save the file. And check the size. "04:21
stekernok, *now* this conversion begins to be a lot less confusing ;)04:23
poke53282Good, let's reset.04:23
stekernyes, it's still zero even when there's content in the file04:23
poke53282*GOOD*, or let's say *BAD*04:23
stekernright04:24
poke53282musl/arch/or1k/syscall_arch.h04:24
poke53282#define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))04:24
poke53282the "0, " is wrong here.04:24
poke53282because our 64 Bit values are not aligned04:25
poke53282you can test yourself with the code http://pastie.org/969689504:27
poke53282"file.dat" must exist before of course.04:27
stekernright, I see04:28
poke53282dalias is informed. If you give your Ok, he will patch it.04:29
stekernso, it should be: #define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))04:33
poke53282Yes04:34
stekernyeah, that's an obvious bug (obvious once you get it pointed out for you)04:34
poke53282It's only obvious if you see, how it is used.04:36
dalias:)04:36
stekerndoes microblaze align 64-bit types?04:37
daliasyes04:37
stekernsince that's where I think I copy-pasted it from04:37
stekernok, good04:37
stekerndalias: so, could you make the musl source a couple of bytes slimmer for us, or do you want poke53282 (or me) to post a patch for it?04:40
daliasi can do it04:42
daliasi just wanted to know if this fix is correct04:42
poke53282Ok, thanks04:46
olofkDidn't you just miss a great opportunity to save disk space, if all files can be 0 bytes?08:12
olofkAnyone got a nice DDR2 controller for me?10:03
olofkLooks like there is one in OpenSPARC. Time to check out OpenSPARC then11:18
stekernolofk: doesn't misoc have one?11:31
olofkstekern: Oh, right. I should have checked there first of course11:41
olofkCan only find a DDR controller in verilog, and some target specific other ones written in migen11:46
olofkysionneau: Do you have any info here?11:46
maxpalnolofk: I have something that is starting to do the right thing now. Although as I have developed it I have realised this will probably be most useful as a 2nd stage debug tool - since the reads/writes are out of sequence it is a bit of a pain to track back through the transactions to find where things went wrong. As such, I expect your original Write-Then-Read test will be the best place to13:58
maxpalnstart - then once the controller is doing the right thing, this second test that produces more real world traffic can be applied.13:58
maxpalnI still need to implement the variable wait states but the random read/write transactions of arbitrary type and length appears to be working.13:59
ysionneau12:31 < stekern> olofk: doesn't misoc have one? < yes13:59
ysionneauLASMIcon is sdram/ddr/ddr2/ddr3 controller13:59
ysionneauand there is a PHY for Spartan6 and kintex714:00
ysionneauI'm working on a smaller sdram controller right now14:00
ysionneauit already works for sdram but I have a few stuff to fix for DDR14:00
ysionneauI don't have a lot of knowledge of the features of LASMIcon, but as far as I know it's quite performant14:02
ysionneaubetter ask sb0 about it14:02
ysionneauolofk: the 3 RAM PHYs : https://github.com/m-labs/misoc/tree/master/misoclib/sdramphy14:03
ysionneaugensdrphy is SDRAM only (no ddr)14:03
ysionneauk7ddrphy is working successfully on KC705 board with DDR314:04
ysionneaus6ddrphy for spartan 6 boards with DDR/DDR2 (like M1, Mixxeo)14:05
ysionneauinterface between controller and PHY is DFI14:05
ysionneaucontroller is LASMIcon : https://github.com/m-labs/misoc/tree/master/misoclib/lasmicon14:06
ysionneauif you want specific examples I could point you to it14:06
olofkysionneau: Ah cool. I didn't know about DFI. I was actually thinking of defining something like that14:42
olofkWhich revision are you using?14:44
olofkJesus christ. There's an insane amount of signals here14:49
ysionneaudon't know the exact version though :p14:55
ysionneaubut you can have a look at the available signals over there: https://github.com/m-labs/migen/blob/master/migen/bus/dfi.py14:56
ysionneauit's pretty easy to use, I am using it also for my small sdram controller14:56
ysionneauit's basically the physical wires + some others like rddata_en (that you should assert when you issue the READ command), rddata_valid (that is asserted when the PHY has received the data), rddata (contains the data sampled by the PHY)14:57
olofkysionneau: Ah ok. So you're only using three of the channels? That makes it quite a bit simpler14:57
ysionneauand same kind of stuff for the write14:57
ysionneauI haven't actually read the spec :p14:58
ysionneauI'm just using the dfi implementation in Migen14:58
ysionneauit's quite simple and it works14:58
olofkAlso quite similar to the interface I defined for the stuff I've been working on for the last weeks14:58
ysionneauyou can also connect a dfi injector that allows you to take over control of the PHY (via dfi) from the software14:58
ysionneauuseful for doing the init_sequence from software bitbang14:59
ysionneauinstead of wasting fpga space for that14:59
ysionneauyou get this for free by using the dfi from migen :)14:59
olofkAren't there any flow control signals that the phy can use to deny requests?14:59
ysionneaunot sure15:00
ysionneauyou want to be able to deny ?15:00
olofkI mean that I can't find a way for the phy to indicate that it can't handle any more requests15:00
olofkHow will the mc know that?15:01
ysionneauthe way it works right now is that the dfi has several "phases"15:01
ysionneauthe controler runs on system clock15:01
ysionneauthe phy has multiplied clock15:01
ysionneauthe controller puts commands in the phases15:02
ysionneaulike dfi.phases[rdphase].ras_n.eq(0) etc15:02
ysionneauand the phy presents the data at the right moment15:02
ysionneauon the physical lines15:02
ysionneauso there is no way of "overflowing" the phy15:03
ysionneaubasically the phy runs faster than the MC15:03
ysionneauand MC can only put N commands per system clock cycle (N being the number of phases)15:04
ysionneaunot sure if I'm clear :p15:04
ysionneauif by flow control you mean taking into account all the tRAS tCAS tRRD etc timing restrictions, this has to go inside the MC state machine15:08
maxpalnwell, what do you know? The more stringent wishbone transactor is already paying dividends. Just discovered a bug on back-to-back read bursts!!16:36
poke53282Firefox compiles and links23:03
poke53282Only three points prevent me from running it.23:03
poke532821. A limitation of the OpenRISC port in the binutils package (16 Bit R_OR1K_GOT16)23:03
poke532822. xpcom of Firefox (two hundred lines to implement the ABI)23:03
poke532823. To run it, you would have to download approx 50MB of compressed data. (I want Firefox 1.0 back)23:03
poke53282libxul.so has a size of 100MB.23:05
poke53282uncompressed23:05
daliaswtf23:06
poke53282Well, it has a size of 64MB on a x86-64 machine.23:08
daliasnot quite that big for me on alpine, but almost23:09
daliasand holy shit, over 300k relocations23:09
poke53282The binaries here are a little bit larger. But they compress well.23:09
poke53282Yes, the 16 Bit limitation prevents me from linking correctly.23:09
poke53282I removed the error message ;)23:10
daliasat least most of them are relative tho23:11
poke53282Maybe there is a way in Firefox to reduce separate the lib. I think, I have seen something like this. To have the Javascript part separated.23:12
daliassplitting it out is likely to make it load a lot slower23:13
daliassince there will be more symbolic relocations23:13
daliasreally binutils just needs to support making arbitrarily many GOTs23:13
daliasi think23:13
daliasthat's how ppc and other archs with 16-bit offsets work, i think23:14
daliasreally just with or1k had 32-bit immediates like microblaze tho...23:14
daliasit's by far the nicest of the "ugly risc isa" family :)23:14
daliass/with/wish/23:15
daliasapologies for my lisp :)23:15
poke53282Well, we have to live with it. 32-bit immediates would not fit in the 32 Bit instruction size limit.23:17
daliasmicroblaze also has 32-bit instruction size23:17
daliasthey have a really cool system for making it work :)23:17
poke53282how?23:19
daliasthe assembler generates a pair of instructions where the first contains the upper half of the immediate23:20
daliasi don't know exactly how it works with interrupts/faults but it does, and it's transparent as far as i can tell23:21
poke53282l.movhi r1, 0x1234; l.ori r1,r1,0x567823:22
poke53282This is how you load a 32 Bit value for OpenRISC. Two instructions.23:22
poke53282--enable-shared-js  Create a shared JavaScript library.23:25
poke53282this I can try23:25
poke53282The microblaze ABI doesn't look like that different to OpenRISC23:30
poke53282But honestly, it was never intended by the one who wrote the binutils port to link Firefox 31 with it. who would have known, that there is such a limit. The community for the other CPUs is just larger, that such things get fixed.23:37
daliasyeah but you have to load them into a register in 2 instructions, then have another instruction to use the register23:46
daliasand lots of the advantages of an immediate are thereby lost23:46
daliasand if that exhausts your call-clobbered registers, you need a lot more code to push and pop a stack frame, etc. :(23:47
--- Log closed Thu Nov 06 00:00:16 2014

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