IRC logs for #openrisc Friday, 2014-09-12

--- Log opened Fri Sep 12 00:00:48 2014
poke53281stekern: mplayer works too. Any ideas for a 1-2MB video? Of course I can simply take a cat video from youtube :)01:03
sb0so, why did that binary grow to 5MB while doing exactly the same? that's 10x the memory capacity of the atari st01:21
poke53281because of the c conversion in between01:52
poke53281every 68k opcode must be translated to pure C code. And the compiler translates this to openrisc.01:53
poke53281Hmm, playing h265 videos isn't fun. But the compression ratio is so good.03:37
stekernpoke53281: mpeg1 is maybe more realistic?04:44
poke53281At the moment the problem seems to be the resolution and not the codec.04:55
poke53281mpeg1, mpeg2, h264. The speed differ not that much.04:55
poke53281But e. g. scaling to fullscreen is not possible.04:55
stekernhmm, ok05:00
stekerncan't you play it unscaled?05:00
poke53281I can. But I use videos with the correct resolution, they are also too slow.05:01
poke53281I think, it's the yuv->rgb conversion05:02
stekernI see05:02
poke53281640x400x25  = 6400000 conversions per second. How many instructions do you need?05:03
poke53281I have only around 50MIPS. So, a smooth fullscreen is not possible.05:04
poke53281they use even bicubic interpolation if I scale this up.05:04
stekernmmm, I remember that 320x200 MPEG1 was barely watchable on a 166MHz pentium05:07
poke53281Are you sure.05:07
poke53281Wing Commander 4 was playabler on a 486 and had full screen mpeg2 movies.05:07
poke53281Of course assembler optimized code.05:07
stekernwell, I was watching VCD's on that computer, and it worked, SVCD's didn't05:11
stekern(so the resolution was actually 352x288 or something)05:11
poke53281wing commander used also some tricks like showing only every second line if svga was on.05:22
poke53281I converted around 20 movies to test, which format is the best. No result so far.05:26
stekernisn't it legal to bitreverse a vector like this in verilog: b[31:0] = a[0:31];05:37
poke53281Don't ask me05:38
daliaspoke53281, dropping to bilinear scaling could help (and is arguably better quality anyway)05:39
daliasideally you don't want to scale at all, but you have to do colorspace conversion and scaling of the chroma planes which are sampled at half the rate05:40
poke53281I tried a few things like this "-sws 4" for example. But didn't change anything05:46
poke53281dalias: I hae updated my official version.
poke53281two videos are in /usr/share/mplayer05:59
poke53281If you can find good parameters to watch the videos in fullscreen would be fantastic.05:59
stekernpoke53281: but the fact that mplayer works (but not fast enough) is still good news IMO06:01
poke53281Yes, good news.06:02
poke53281Interesting is, that mpeg4 videos seem to use the floating point numbers.06:03
stekernwe just need a fast enough implementation for it ;)06:03
poke53281The codec is a factor of two slower with soft float06:03
stekern...but it gives new interest angles to hw accelerated videos etc06:03
stekernand I can use that once I got audio working on my sockit board ;)06:04
poke53281what about a real graphic card with layers and hw supported color conversion.06:04
poke53281Yes, you can use it. I can give you a soft-float version if you want.06:05
poke53281Or just the compile script06:05
stekernthat'd be nice06:06
poke53281wait, I have to add one sed.06:06
stekernbut that mpeg1 video isn't all *that* bad, I was expecting worse. Like 0.25 fps or something06:06
stekernthat looks like at least 5-6 fps06:07
poke53281No, I use only 60-70% of maximum performance of my cpu.06:07
poke53281So, the cpu is idle when you watch the video.06:07
stekernand this is on this crap i3 laptop06:08
poke53281you should also change the fps at the bottom of the terminal.06:08
poke53281It seems that the effort to decode mpeg1 and mpeg4 is only a factor 2 or 3 different.06:10
stekernI want to explore this and this at some point06:11
poke53281do we need Xorg and Linux drivers for this?06:18
poke53281stekern: this is the first part.06:22
poke53281and the soft-float  mplayer.tar.bz2 you can find here:
poke53281compiled for SDL and fbdev06:24
poke53281if you want direct X  support (not via SDL) you have to compile it yourself.06:25
poke53281stekern, dalias : If you have an idea for a nice 1-2MB video, please tell me. No funny cats please.06:27
poke53281youtube link is Ok.06:28
poke53281but not more than 1 minute.06:29
stekernsorry, I've got no good video-clip advices06:46
poke53281some short animation movie? The add from Apple in the year 1984?06:48
poke53281But one thing is sure. I need sound :)06:49
poke53281you know what it means, to time sound in Javascript? And this together with an emulated machine?06:50
poke53281Quantum mechanics is easier.06:51
poke53281By the way. There is a good chance that I will join the orconf in Munich.06:55
poke53281i am in stuttgart during that time06:55
olofkstekern: Yeah, I'm interested in those GPU projects as well. I'm also curious about the h264 project on opencores07:13
olofkpoke53281: That's really good news. Hope you can make it there07:14
stekernolofk: do I remember wrong that you wrote a l.ror test?07:14
olofkstekern: No, I'm pretty sure I did that07:14
poke53281h264 project?07:14
stekernI can't seem to find that we would have any test for that07:14
olofkDon't know any more about it though07:15
olofkstekern: I see what I can find here07:15
olofkaha. I have it here locally at least07:16
olofkIt's extremely comprehensive07:18
poke53281Hmm, nowadays video encoders are basically ARM cpus(or any other cheap cpu) with a lot of fixed function units. Am I wrong?07:18
olofkI have no idea, but that sounds reasonable07:19
poke53281Otherwise it makes no sense. The complexity is too high to make it different. You have internal memory and a flash with the firmware for the controller cpu.07:20
mor1kx[mor1kx] skristiansson pushed 1 new commit to master:
mor1kxmor1kx/master ccdb613 Stefan Kristiansson: execute_alu: optimize barrel shifter...07:21
stekernolofk: great, now I can actually test that ^ change too ;)07:22
poke53281olofk: I ask this, because I wonder, what this project should be at the end.07:22
stekernwell, I did test the shift ops, and they work07:22
olofkstekern: Looks like I didn't push everything in wb_streamer yesterday07:23
poke53281Just the fixed function units or together with controller(openrisc?) and firmware?07:23
stekernolofk: mind committing that to
olofkpoke53281: This project = openrisc in general?07:24
poke53281I am talking only about the h264 project. How do they want to implement it.07:24
olofkpoke53281: I think that project is dead. There was some talk about it when I joined the project, but nothing since. I'm just thinking we could scavenge it for useful parts :)07:26
stekernthat new barrel shifter is a lot smaller than the old one, it's also still smaller than the old one with l.ror enabled in the new one and disabled in the old07:26
olofkstekern: That's how you make sb0 happy :)07:27
stekernwell, it was actually a #m-labs guy, Florent Kermarrec, that hinted on the implementation07:28
stekernapperantly that's how LM32 does it, but I didn't really look at their code, it was pretty straight forward from his description07:29
stekernbut I'm also pleased that in the end, the implementation also became a lot cleaner than the original with a lot of code duplication07:31
sb0stekern, excellent, thanks07:32
sb0let me try that07:32
olofkIs the barrel shifter mandatory? Some of the shift operators are optional, but not all of them, right?07:32
stekernsb0: a word of warning, (as I mentioned in #m-labs) the other thing florent hinted on *added* some LUTs... beats me why ISE hated that...07:33
olofkstekern: Any ideas for a nice clean wishbone slave with a few registers that I can get some inspiration from?07:35
stekernolofk: we have a serial shift implementation too07:36
sb0overall FPGA utilisation went down a few %, so it's moving in the right direction nevertheless08:00
olofkThere's a wb config interface for the stream writer now as well08:42
stekernolofk: why, oh why did you add a _m_ to the data/valid/ready signals???09:24
stekernit screwed up my tab amount to line up the signals in the instantiation09:25
olofkSorry :(09:53
olofkm for master. It's a master port that sends data09:53
stekernyeah, I got that09:55
mor1kx[mor1kx] skristiansson pushed 1 new commit to master:
mor1kxmor1kx/master 64bf7e1 Florent Kermarrec: mor1kx_store_buffer: avoid unnecessary subtractor09:58
olofkmor1kx is on fire with new commits now09:58
stekernyes, I heard that that guy with a beard had mentioned an openrisc core starting with 'm' on some conference, so I thought it might be good to keep up the appearance that there's activity in the repo if someone goes look there ;)10:02
olofkI also said it was a multi-issue, out-of-order 128 bit CPU, so you might have some work to do here :)10:04
stekernwell, if it can be out-of-order, I can easily give you such a 128-bit multi-issue implementation -
olofkI like the implementation, but we should change the color10:11
stekernwb_streamer builds now, so feel free to ship it10:14
olofkIcarus is quite a lot faster than the free modelsim version10:17
olofk14s versus 24s when running 10000 transactions in wb_streamer10:19
olofkstekern: Does it really build? I noticed that some of the wb signals had wrong size and direction10:24
olofkBut I pushed fixes for that10:24
stekernok, but it did build without that10:25
olofkThey were probably optimized away at an early stage10:35
olofkSo if I add an IRQ, this should be ready for basic usage I guess10:35
stekernyes, that's at least enough for my needs10:36
olofkSo how would one use this? Write data to an area, press enable, write to another area and update the start address on interrupts?10:41
olofkRunning tests on different buffer sizes will be next. Especially the corner cases of small buffers10:42
stekernolofk: tbh, I'm not entirely sure what's the best, but that sounds like an option at least10:43
olofkFirst idea was to add read/write pointers to be able to implement a circular buffer, but this is easier10:44
stekernolofk: don't ship, it doesn't build anymore10:47
stekernah, I had made an error in the instantiation10:49
olofkDid you pull my latest changes?10:50
olofkYou need to update orpsoc-cores as well in that case to run simulations10:50
stekernstraight to ASIC, that's how real men do it10:51
stekernI'm trusting that my supplier have verified their cores, is that unwise?10:52
olofkOf course, but I mean when you simulate the ASIC in your web browser10:52
olofkhmm... buffer size currently has to be a multiple of the burst length11:00
olofkEasiest fix. Always require buffer size and burst length to be power of two11:00
olofkBut I'm not sure if that's a good restriction11:01
stekernwhat does 'burst length' mean in this context?11:08
olofkAs I don't want to hog the bus to read out the complete buffer in one transaction, I'm doing shorter bursts instead11:09
stekernisn't that a job for the arbiter to decide?11:10
olofkAs long as cyc is raised, I don't think that the arbiter is allowed to interfere11:10
stekernah, right, there's no fixed length on the linear bursts11:11
stekernbut requiring that to be a power of 2 doesn't seem like a crazy restriction11:11
olofkNo, but I want to figure out what causes the least amount of corner cases11:12
olofkI've pretty much decided on at least requiring burst lengths to be power of two.11:15
olofkBut I probably need to add arbitrary buffer sizes11:15
olofkBut that opens up some corner cases, so that will have to wait for a bit11:16
stekernhmm, maybe you can solve that in some other way11:19
stekernbut is that a runtime or compile time option?11:21
olofkIt's runtime, with a compile-time maximum11:22
olofkbuf size that is11:22
stekernwell, can't burst size be runtime too?11:23
olofkIt is11:23
stekernthen it's probably not a problem if the buf size has to be a multiple of the burst size11:24
olofkI think I'll encode burst length as 2^value in the register to ensure that I always have a good value there11:24
stekernand no problem that burst size has to 2^11:24
olofkBut then the user/driver has to make sure that these conditions are fulfilled. Sounds risky to me11:26
stekernif you need some odd transfers, then you can do bursts down to 111:26
olofkYes, but that doesn't work either with the current logic :)11:26
olofkTwo might work11:26
stekernno, but that sounds like something that would be easy to implement without corner cases11:27
olofkYes, sure. That must work eventually11:27
stekernI think reasonable restrictions that the user/sw needs to follow is less risky than potentially buggy hw implementations ;)11:28
stekernand the cost of fixing buggy sw is usually cheaper than fixing buggy hw11:28
olofkBut if I want to send a 268 byte packet, I don't want to send 256 byte, then 8, and then 4 and having to update burst size for the smaller buffer sizes11:30
olofkBut fixing buf size = 1 will take care of most of the problems actually11:32
olofkOr actually buf size = 4, since it is specified in bytes11:48
PaulfraOSAAJust a quick question, mor1kx is "just" a newer version of orpsoc, and I can use that instead of orpsoc when setting up?17:42
PaulfraOSAAOk, I asked too soon, aparently not17:43
PaulfraOSAASorry about that17:43
stekernmor1kx is a cpu core, orpsoc is/was a reference SoC18:00
PaulfraOSAAYeah, but the orsop-cores imports mor1kx, so I clone the two repos (orsopc-cores and fusesoc) and I should be ready to go (if i've got the cross complier chain in place) right?18:03
PaulfraOSAAThat's the danger of having the IRC channel open while downloading: Your'e tempted to start asking questions prematurely :)18:12
olofkPaulfraOSAA: There's a new fancy feature in fusesoc that makes it a tad easier to set up. Just run 'fusesoc init' after you have installed fusesoc18:15
PaulfraOSAAthat will do what exactly? Install the orsop-cores as well?18:16
PaulfraOSAABTW Mike might have said that going from VHDL to Verilog is much easier, I pitty the fool that goes the other way then...18:17
olofkYes, and write a configuration file that will make fusesoc find orpsoc-cores automatically18:17
olofkNo one does :)18:17
PaulfraOSAAThey should, It's far better for systems programming18:17
olofkYes, it is, but otoh system verilog is probably a better choice for that18:18
PaulfraOSAADuring our thesis project we came over a cordic that really should have been paramereized, the authors had given up on doing it in verilog, it took me half a day to port and implement parametrization18:18
PaulfraOSAA(that was in the gnu radio ettus radio project)18:19
olofkMany older cores uses `define instead of proper parameters18:19
olofkbtw, check out if you want to see the current level of VHDL support in Icarus verilog18:20
PaulfraOSAAYou mentioned, and I saw some places on the web that you had done a LX9 port, but I can't find it anywhere18:20
olofkAh no. I never pushed it. I should do that18:21
olofkBut it might need some cleaning up first18:21
PaulfraOSAAYou really should, I don't want to install quartus just to put it on my de1 board, if the build files are there for lx9 :)18:22
olofkProblem with the lx9 is that you need an external JTAG debugger to connect to the CPU since the JTAG protocol through USB hasn't been reverse-engineered yet18:23
PaulfraOSAAI also thought about it, it might be that it is actually the Xilinx simulation tool and not the modelsim that allows multilanguage simulation18:23
olofkXilinx ISIM doesn't support VPI, so it's unfortunately quite useless for many of the OpenRISC-based systems18:24
olofkBut yes, you might be right that it at least supports mixed-language18:24
PaulfraOSAAYeah, you could skip the part of the sentence beginning with for...18:25
olofkI tried to build my lx9 system, and it still builds. I can send you the bit file if you want. Unfortunately I have no idea if it does anything useful. In best case it might blink some LEDs :)18:26
olofk(but probably not)18:26
PaulfraOSAA iverilog looks very much like ghdl (from the readme)18:27
PaulfraOSAAWould it be possible to fit a bare bone system with an Ethernet peripheral on there + room for custom code?18:28
PaulfraOSAAOr is that (still??) pushing the 200% utilization envelope?18:28
olofk_franck__: Didn't you add some basic support for running ghdl under fusesoc a while ago?18:28
olofkPaulfraOSAA: I haven't tried it since then, but I don't think it should be impossible.18:29
olofkI think the big problem back then was that it failed to use Block RAMs efficiently18:30
olofkmor1kx+UART+debug stuff fits ok, so maybe we could try to add minimac if a full ethmac doesn't fit18:31
PaulfraOSAACool, I have a crazy idea and I want to use as much open hardware for it as possible,18:31
olofkI haven't used minimac though, but sb0 might have some info here18:31
olofkPaulfraOSAA: Bitcoin mining? ;)18:31
PaulfraOSAAYep, as a hackerspace workshop, named after Mike Dini :) I got his permission at the conference18:32
olofkWe should launch DiniCoin18:32
olofkGot to run now, but here's a snapshot of the LX9 Microboard port if you want to take a look at it18:36
PaulfraOSAAolofk: Should you read the log, I succeeded in making all four red leds blink at about 1Hz, so if that is a sucess criterion, whell then yay :)19:00
_franck__olofk: ghdl support for fusesoc is on my TODO list. I just started to play with GHDL and it's VHPI feature, nothing more.19:25
PaulfraOSAA_franck__: does ghdl support verilog? Isn't that just substituting one problem for another? Or is the idea to be able to simulate both vhdl and verilog?20:00
-!- PaulfraOSAA is now known as exparrot20:05
olofkexparrot: It only supports VHDL, but it's nice to have support for all major Open Source simulators20:10
exparrotolofk: my or1k asm is not all too sharp, but it seems the blink pattern is wrong, all leds lit up at the same time.20:12
exparrotBut it was easy to do :D20:12
exparrotOn the build instructions for the newlib toolchain, there is a _lot_ of --disable-xxx, why would I want to disable stuff like gdb?20:19
exparrot <- this instruction20:20
olofkexparrot: Is the led blinker on the lx9 or the de1?20:42
exparrotThe one on the lx920:42
exparrotI haven't got Quartus set up XD20:42
olofkRegarding the disable stuff, you can probably enable gdb in the first pass20:43
olofkYeah, I remember trying that about a week ago20:43
exparrotYeah, I'm doing it the hard way and pretty tired20:45
exparrotI just hope i don't fsck up my box20:45
olofkNo worries. It shouldn't touch anything outside of --prefix20:45
olofkFuseSoC on the other hand installs a browser toolbar and a live background20:46
exparrotdid you notice the thing about tired? ;)20:46
olofkah yes. Tiredness has a tendency to make things worse than they have to be :)20:46
exparrotAlso, I go to and from... need to pack a backpack for tomorrow20:47
olofkWell, compiling toolchains generally leave you with a lot of spare time20:48
olofkHas everyone registrered for orconf btw?21:00
--- Log closed Fri Sep 12 21:46:24 2014
--- Log opened Fri Sep 12 21:46:41 2014
-!- Irssi: #openrisc: Total of 39 nicks [0 ops, 0 halfops, 0 voices, 39 normal]21:46
-!- Irssi: Join to #openrisc was synced in 24 secs21:46
-!- Netsplit *.net <-> *.split quits: sb0, rah, funfunctor22:18
-!- Netsplit *.net <-> *.split quits: rokka_22:25
-!- Netsplit *.net <-> *.split quits: mboehnert22:30
-!- Netsplit *.net <-> *.split quits: simoncoo1, mboehner1, arokux, jeremypbennett22:32
-!- Netsplit *.net <-> *.split quits: ams, trevorman, rah_, jeremy_bennett, knz22:38
poke53281olofk: I know if I will come to orconf next week.22:57
--- Log closed Sat Sep 13 00:00:50 2014

Generated by 2.15.2 by Marius Gedminas - find it at!