--- Log opened Sun Sep 14 00:00:51 2014 | ||
-!- sb0_ is now known as sb0 | 02:32 | |
mor1kx | [mor1kx] skristiansson pushed 2 new commits to master: https://github.com/openrisc/mor1kx/compare/77a24c1d4900...3eeca5da89c7 | 06:38 |
---|---|---|
mor1kx | mor1kx/master a14d275 Florent Kermarrec: mor1kx_execute_alu: try some optimizations on logic operations | 06:38 |
mor1kx | mor1kx/master 3eeca5d Stefan Kristiansson: follow-up on Florents logic optimization | 06:38 |
mor1kx | [mor1kx] skristiansson force-pushed master from 3eeca5d to 4f9d080: https://github.com/openrisc/mor1kx/commits/master | 06:39 |
mor1kx | mor1kx/master bba8660 Florent Kermarrec: mor1kx_execute_alu: logic operation optimizations... | 06:39 |
mor1kx | mor1kx/master 4f9d080 Stefan Kristiansson: execute_alu: tidy up logic optimization... | 06:39 |
stekern | *that*s how the rebased version should look like... git should warn if you try to push a branch you currently are doing a rebase on... | 06:40 |
stekern | sb0: the bloat should be reduced from 1.6k to around 0.7k now, be sure to use p_FEATURE_STORE_BUFFER="NONE" to experience the full extent of it. | 06:45 |
stekern | (that means we are still about 700 LUTs larger than lm32) | 06:46 |
stekern | trce claims you can run the papilio pro board at 90 MHz though | 06:47 |
stekern | so we might have got slightly faster as well | 06:48 |
sb0 | cool | 06:50 |
sb0 | how does the store buffer impact performance? does lm32 have one? | 06:50 |
stekern | lm32 doesn't | 06:50 |
stekern | and it improves performance under certain circumstances | 06:51 |
stekern | it's a really simple implementation, stores are buffered up in a fifo, and the pipeline is not stalled until either: 1) the FIFO is full 2) there's a load in mem stage | 06:52 |
stekern | i.e. no content based decision are made, and no content is read from the store buffer | 06:53 |
stekern | so, it's useful for e.g. typical stack stores in function prologues, without having to resort to a write-back cache | 06:54 |
stekern | it also have the advantage of making non-cached stores faster even if a write-back cache would have been implemented | 06:56 |
stekern | and that's how cache-coherency for 'dma' operations under openrisc Linux currently works, cache is inhibited on those pages | 06:58 |
sb0 | hmm by board does not boot anymore | 07:01 |
sb0 | could be a ISE bug though. an unrelated code change made it boot ... | 07:04 |
stekern | oh, did you expect it to be smaller *and* work? sigh, you are high maintenance ;) | 07:06 |
sb0 | I think it does work | 07:07 |
stekern | ok, great, I haven't tested running anything more elaborate than basic stuff on the changes, so there might be dragons | 07:07 |
sb0 | I've experienced similar breakages before, and they definitely look like ISE bugs | 07:08 |
sb0 | so, 884 LUTs to go ;) | 07:08 |
stekern | I only got 732 as the difference on the ppro board | 07:11 |
stekern | but, yes, there's still room for improvement | 07:11 |
poke53282 | stekern: Finally I have managed to get linux recognize something which he assumes to be a sound device. | 07:34 |
poke53282 | This asoc abstraction is complicated. | 07:35 |
poke53282 | tomorrow I will try to get some signal out :) | 07:36 |
stekern | poke53282: cool! | 07:36 |
poke53282 | you need three devices in the dts file to get it work. | 07:37 |
stekern | I'm currently writing some baremetal test code for the wb_streamer, so I'm hoping on getting some signal out soon as well ;) | 07:37 |
stekern | codec, config, dma? | 07:37 |
poke53282 | hardware, codec and a driver which connects both. | 07:37 |
poke53282 | http://pastie.org/9552231 | 07:39 |
stekern | my setup needs the opencores i2c driver, a ssm2603 driver and a wb_streamer dirver | 07:39 |
poke53282 | opencore i2c driver? Do you have a link? | 07:40 |
stekern | http://lxr.free-electrons.com/source/drivers/i2c/busses/i2c-ocores.c | 07:41 |
poke53282 | you mean ssm2602? | 07:41 |
poke53282 | I guess you need the "simple-audio-card" too | 07:42 |
stekern | no, I mean ssm2603, but the ssm2602 driver probably covers that | 07:43 |
stekern | I have baremetal drivers for both i2c and ssm260: https://github.com/skristiansson/sublime/tree/master/sw/drivers | 07:44 |
stekern | so I figured the easiest forward to test wb_streamer is to just write a small POC with these | 07:44 |
poke53282 | POC? | 07:47 |
stekern | proof-of-concept | 07:47 |
poke53282 | Ok. Looks like, it would be easy to build a driver under Linux. | 07:49 |
stekern | I know that my ssm2603 and i2c driver works, so then the only variable is the wb_streamer, without layers of Linux ASOC logic to potentially mess things up | 07:49 |
olofk | stekern: You got a papilio pro? | 07:51 |
olofk | And of course wb_streamer works. It's got a test bench :) | 07:53 |
stekern | olofk: no, I just do misoc test builds against that to get some LUT usage numbers, it's a minimal soc that is quick to build | 07:54 |
stekern | olofk: yes, but I might not have hooked it up correctly ;) | 07:54 |
olofk | stekern: That's true. I sometimes forget that my sensitive code is handled by mortals | 07:55 |
stekern | ...and since there's no known to work driver for it, I was speaking about getting the sw side to work as well | 07:55 |
stekern | haha | 07:55 |
stekern | + I might want to upgrade sublime to use wb_streamer instead, so I'll need a baremetal driver then anyway | 07:58 |
poke53282 | you can send the sound also via network :) | 07:58 |
poke53282 | stream I mean | 07:58 |
poke53282 | also loop device. | 07:58 |
poke53282 | alsa loop device | 08:01 |
poke53282 | what I have seen, a backend hardware driver is not complicated to write. | 08:09 |
poke53282 | there are tons of example drivers. Some of them are really small | 08:09 |
stekern | I remember that writing the ac97 driver was messy | 08:13 |
stekern | but maybe the asoc interfaces are less of a mess | 08:14 |
stekern | hmm, the tinysid site doesn't seem to exist anymore :( | 08:16 |
stekern | http://www-stud.rbi.informatik.uni-frankfurt.de/~sinsch/TinySid.htm | 08:16 |
poke53282 | You can use my online player http://simulationcorner.net/Sidplayer/index.html | 08:17 |
poke53282 | but there are tons of other players out there. Why tinysid? | 08:17 |
poke53282 | ahh, because of Linux? | 08:17 |
stekern | that, and it's tiny... and I have used it before | 08:18 |
stekern | but then on baremetal | 08:18 |
stekern | I probably have the sources on my hd still somewhere | 08:19 |
poke53282 | Well, when I get sound running I will add a sid player if I find one | 08:19 |
stekern | https://www.youtube.com/watch?v=2X3lo6msDpI and https://www.youtube.com/watch?v=qYdOhU_aUH0 | 08:19 |
poke53282 | timidity, aplay, xmp | 08:19 |
olofk | stekern: Added some tests for different buffer sizes in stream writer now. Looks like it works fine as long as buffer size is a multiple of burst length | 08:21 |
poke53282 | :) even with a small screen | 08:21 |
olofk | Right now burst size is in words, and buffer size in bytes though. Not sure if that's how I want it | 08:22 |
olofk | stekern: haha. Cool demos :) | 08:23 |
poke53282 | So, which sid-files where those? | 08:23 |
poke53282 | do you still have them? | 08:23 |
stekern | poke53282: the one with the old-school demo effects is done by yours truly | 08:23 |
stekern | the ones with the real sid chip is from various games (taken from HVSC) | 08:24 |
poke53282 | Ok, and the HVSC collection is huge .,, I mean really huge. | 08:24 |
poke53282 | stekern: https://github.com/robn/tinysid | 08:27 |
stekern | http://oompa.chokladfabriken.org/whizkid/mistertwister.sid | 08:30 |
stekern | that's the one and only sid I've made | 08:31 |
olofk | How did you make it? Are there any trackers available? | 08:32 |
stekern | in goattracker iirc | 08:32 |
olofk | Time to vote! | 08:43 |
stekern | olofk: some wb_streamer feedback/questions | 09:54 |
stekern | I'd like to see the 'enable' reg become a ctrl/status reg, where I could poll the completeness of a transaction (and the irq would be connected to that bit) | 09:55 |
stekern | the 'enable' would then just be a write-only bit in that reg | 09:55 |
stekern | second, I haven't dug through the code yet, but what does 'buf_size' actually mean? is that in any way connected to the FIFO size? | 09:56 |
stekern | or is it just "end address"? | 09:56 |
-!- expert is now known as PaulfraOSAA | 10:15 | |
olofk | stekern: (enable) Agreed. There's an internal 'latch_enable' that does exactly that. I should rewire and hook that up to the reg instead | 11:35 |
olofk | buf_size is the size of the memory area to read from (in bytes) | 11:35 |
olofk | So, yes start_addr+buf_size = end address-1. A very novel idea that I came up with. I should patent it :) | 11:36 |
olofk | The FIFO size just determines the maximum burst read length. | 11:40 |
olofk | Well, start_addr+buf_size = end address+1 to be exact | 11:47 |
stekern | right, that's what I figured, just wanted to make sure | 11:48 |
olofk | The component only handles full words. What would be the appropriate thing to do if someone sets start address or size to something unaligned? | 11:55 |
olofk | Just ignore bits 1:0 and/or set an error flag? | 11:55 |
olofk | No l.rol in OpenRISC? | 12:08 |
stekern | nope, no l.rofl neither | 12:08 |
olofk | l.lol :) | 12:09 |
stekern | with the new optimized barrel shifter in mor1kx, implementing l.rol would be no-cost | 12:10 |
stekern | but, since you can just do 32-rollbits in sw, it's really no point | 12:11 |
olofk | c00l | 12:11 |
olofk | Are both ror and rori class II instructions? | 12:11 |
stekern | yes | 12:12 |
olofk | Couldn't find anything in the arch spec | 12:13 |
olofk | But then I extend the testcase to handle both | 12:14 |
stekern | just look at the instruction description for them and the footer | 12:14 |
olofk | Great. I see it now | 12:15 |
olofk | So, should the ror test be in mor1kx_cappucino.tests? | 12:29 |
olofk | I guess not, since it will fail | 12:33 |
olofk | Or do we want that turned on in mor1kx-generic perhaps | 12:37 |
olofk | hmm.. should burst length be specified in bytes instead words as well? | 13:04 |
-!- expert is now known as Guest42420 | 15:23 | |
-!- Netsplit *.net <-> *.split quits: lauri, atgreen | 15:38 | |
stekern | is buf size in words? | 15:53 |
stekern | or in bytes? | 15:53 |
stekern | hmm... doesn't this mean 'end_address' and not 'buf_size': https://github.com/olofk/wb_streamer/blob/master/rtl/verilog/wb_stream_writer_ctrl.v#L66 | 16:16 |
stekern | ah, no, adr is not an adr, but an offset to start_adr | 16:17 |
stekern | olofk: how d'ya like this? http://pastie.org/9553155 | 17:58 |
stekern | also, this would be slightly cleaner than separately assigning active: assign active = (state == S_ACTIVE); | 18:03 |
stekern | olofk: wb_streamer locks up after a couple of transitions | 19:35 |
stekern | without probing deep, it looks like the fifo is signaling empty, but cnt != 0 | 19:35 |
stekern | https://github.com/olofk/fifo/blob/master/rtl/verilog/fifo_fwft.v#L58-L59 if wr_en & full or rd_en & empty can occur, then you already are in trouble | 19:44 |
stekern | but I bet that is accounted for elsewhere | 19:45 |
stekern | at least the rd_en isn't connected straight to the fifo | 19:46 |
stekern | I'll signaltap some more to see what's going on | 19:50 |
stekern | I couldn't see anything obvious from the code | 19:51 |
stekern | you should update the fifo code from mor1kx btw ;) | 19:51 |
stekern | fifo is signaling empty, but cnt = 0x1b | 20:23 |
stekern | looks like wr_en is asserted when full is asserted | 20:29 |
Guest42420 | Is there any place where I can learn more about fusesoc? I can't really seem to find any way to read up on where to go from the install | 20:36 |
Guest42420 | Specifically how I can configure the system to have other components (such as my own IP) and how to set up the memory map | 20:37 |
Guest42420 | I've rumaged around the fusesoc-systems, but can't find any place where a memory map is defined. I know that the blinkenlights program doesn't need a map, but in the setup olofk showed me there was one (and I wanted to try out C/C++) | 20:39 |
-!- Guest42420 is now known as PaulfraOSAA | 20:46 | |
stekern | the memory-maps are defined in the wb_intercon.conf files | 20:50 |
stekern | olofk: there are several problems with wb_stream_writer_ctrl | 21:11 |
PaulfraOSAA | stekern: ok, found them. Thank you! Now I just need to figure out how to use the build system :) | 21:11 |
PaulfraOSAA | Goodnight all | 21:11 |
stekern | night | 21:12 |
stekern | 1) the fifo_cnt is delayed by two clock cycles from the write, but you only wait one cycle after the last write in a burst before you read it to determine if there's room for another burs | 21:13 |
stekern | 2) your end of wishbone burst will only work if the slave acks the last request directly | 21:14 |
stekern | this is how my (completely untested) modified version looks like now: http://pastie.org/9553488 | 21:17 |
olofk | stekern: (busy flag) Looks good | 21:44 |
olofk | I might drop the fifo count and start reading on fifo empty instead. My original idea was to use the count as a watermark, but it's much simpler to just wait until the fifo is empty | 21:47 |
olofk | And I should also make a memory model with variable ack delays. That would have caught the bug you found | 21:48 |
olofk | stekern: I just improved the memory model to handle variable ack delays, and it works fine with your pasted wb_stream_writer_ctrl.v | 22:16 |
olofk | But it fails with mine | 22:16 |
--- Log closed Mon Sep 15 00:00:53 2014 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!