IRC logs for #openrisc Monday, 2014-09-15

--- Log opened Mon Sep 15 00:00:53 2014
-!- Netsplit *.net <-> *.split quits: wallento, tariq786, lauri__, fotis2, zama_, jeremy_bennett00:13
-!- Netsplit over, joins: tariq78600:14
stekernolofk: I think using the counter makes sense, otherwise it will become inefficient when burst size < fifo size03:02
stekernI also think that my 1) claim from yesterday was false, there's just 1 cycle latency on the counter logic, not 2. the second cycle came from that you had fifo_wr and fifo_d registered, which I removed03:04
stekernbut I don't understand the read logic in fifo_fwft03:07
stekernwell, tbh, there are much in that module I don't understand. ;)03:09
stekernok, I start to understand, you use three levels of buffers to implement the read-ahead-logic03:16
stekernI think this might fix the problem with the fifo counters I'm seeing: http://pastie.org/955410203:17
stekernrebuilding now03:17
stekernwell, that !empty is probably bogus too, I think that should be fifo_empty03:20
stekernbut, another question, why do you use the fwft fifo for wb_streamer?03:25
stekernI think I've misunderstood the semantics of the 'ready' signal, it's not to latch out data, it's an ack that you've used the data that is on stream_data.03:51
stekernthen 'ready' makes sense as a name too03:52
stekernyay! it works! I've got a ~440Hz square coming out of my speakers ;)03:53
mor1kx[mor1kx] skristiansson created withfpu (+11 new commits): https://github.com/openrisc/mor1kx/compare/5687a92e4f35^...13159333015804:45
mor1kxmor1kx/withfpu 5687a92 bandvig: Initial port of OF32S from OpenRISC-1200...04:45
mor1kxmor1kx/withfpu 67f0644 bandvig: Fix float to integer conversion...04:45
mor1kxmor1kx/withfpu 2d6af6c bandvig: Local list of mor1kx modules04:45
olofkc00l. So it actually works?!07:05
olofkI used an fwft FIFO because it has the same transaction mechanics as AXI4 Stream (and Avalon stream too, I think)07:06
olofkThe fwft wrapper itself I found somewhere on the internet07:06
olofkI like the simplicity. Both valid and ready must be active for a successful transmission. That's all there is to it07:07
stekernyeah, I figured that out, that you need a fwft to get the semantics right. It was just that I had misunderstood the semantics of the streamer ;)07:08
olofkDidn't you read the documentation? :)07:08
olofkBut if the fifo count isn't delay two cycles, can we remove the wait state from your pastie then?07:09
olofkS_BURST_DONE07:09
olofkSeems to work07:10
stekernyes, this is how my current version looks like: http://pastie.org/955486807:11
olofkSeems to work as well07:12
olofkI haven't tried it with different FIFO readout speeds, but at least 10000 buffer reads with different buffer size, start address and burst length seems to work fine07:13
olofkAnd variable ack delay from the wb memory07:14
stekernyou'll need this too: http://pastie.org/955488007:17
stekerncan you take that patch from there? I don't feel like forking fifo into my github right this second07:17
olofkSure07:18
olofkYou had some updates to the dpram as well. Anything I should update?07:19
olofkHaving common stuff like fifo and dpram as submodules in mor1kx would be nice as well, but I guess it might be a bit more overhead for you07:20
stekerntip of the day: wget http://pastie.org/pastes/9554880/download -O ../fwft.patch && git am < ../fwft.patch07:22
stekernyes, you need the new dpram as well07:23
olofknice07:23
olofkI'll copy that then07:23
stekerndon't you need the bypass enabled though?07:23
olofkI have no idea :)07:24
stekernwhat that does is to output the new written data on the read port when read address == write address07:25
olofkHmm.. I get errors in my FIFO test bench with the new dpram07:25
stekernI'll admit that one secret reason why I wanted you to update is to get more use coverage of the changes ;)07:27
olofkhaha07:27
olofkI'll update my FIFO test bench to get a better feeling for where it fails07:27
stekernit should function the same as the old, the changes are mostly cosmetic07:28
olofkstekern: Need to do some other stuff before I look at the FIFO07:49
stekernno hurry ;)07:53
olofkLike finding where the hell I put an archive that I downloaded07:54
olofkStupid big hard drives07:54
stekernolofk: you just have too small files09:12
stekernthat's why EDA programs are so large, so you will find them easier09:13
HeshamRegarding Cache functions, qemu gives reasonable timing results BTW09:31
stekernreally? why?09:32
HeshamDo not know, I tested the Cache test on both or1ksim and qemu.09:34
Heshamor1ksim does not give sensible results as you told me before, the opposite case happens with qemu09:34
HeshamFor the same exe09:34
Heshamload 4096 bytes with flush entire data09:36
Hesham  duration with normal cache 8986 ns09:36
Hesham  duration with warm cache 2421 ns09:36
Hesham  duration with flushed cache 2483 ns09:36
stekernwell, I wouldn't call that "sensible" cache behaviour09:36
stekernafaik qemu doesn't even try to emulate caches09:37
stekernwhat you see is probably jus an effect of how qemu does machine translation09:37
stekernsince the flushed cache is as fast as the warm cache09:38
HeshamI see09:38
Heshamhttp://qemu.weilnetz.de/qemu-tech.html#Translation-cache Does this apply for all architectures including or32? A higher level maybe?09:43
stekernyes09:45
-!- _franck_ is now known as _franck__10:06
olofkSDR is fun! Still haven't got a clue what all the different graphs mean though, but they are pretty10:11
stekernthis is from the wikipedia page about SDR: http://en.wikipedia.org/wiki/Software-defined_radio#mediaviewer/File:Perseus_SDR_receiver.jpg10:17
stekernI don't think that's a good choice of name in Finland10:17
stekernperse == ass10:17
olofk:)10:21
stekernhmm, the arg to isr handler change from void * to uint32_t in the or1k support code was IMO a bit unfortunate...12:29
stekernolofk: I've added an irq to the writer as well now, I've connected it to bit 1 of reg 012:37
stekernhttp://pastie.org/955546412:39
stekernseems to work fine12:39
olofkcool12:56
olofkMaybe you should fork after all. I have way too many pasties to test now :)(12:56
olofks/(/12:56
stekernI'll try to put something together ;)13:02
olofkWhat should I hook up to re in the dpram?13:26
olofkI just set it to '1' and now it passes the FIFO regression tests again13:34
olofkWith your updated dpram and fifo_fwft patch13:34
olofkDoh.. there's no support for float plusargs in fusesoc13:36
olofkahh. but strings work just as well13:39
olofkBut it looks like there are problems when I write to the fifo faster than I can read13:40
stekernolofk: you should connect it like it's connected in the storebuffer13:41
poke53282Finally I got around 5 ms sound output.16:36
poke53282But the sound device sends the stream with a samplerate of 96000 over the bus. Is this a usual quantity nowadays. I stopped reading about this after the CD which had 44100.16:38
stekernI think it depends, but I send data to the i2s device at 96khz16:42
poke53282Hmm, HD content use this rate.16:44
poke53282Then it's true.16:45
poke53282I use PIO to a FIFO at the moment instead of DMA.16:45
poke53282So, maybe I should reduce this rate.16:47
daliasthere's no point in 96khz audio16:47
dalias48khz is the highest that makes sense16:47
poke53282audiophiles might have a different opinion about that :)16:49
daliaswell their opinion is invalid until they sit down for a double-blind test16:49
stekernI agree, but iirc it was easiest to generate for this chip16:50
daliasbtw 96khz sampling actually arguably has WORSE quality16:50
stekernI have crappy ears, so 44100 was certainly good enough for me16:51
daliashttps://xiph.org/~xiphmont/demo/neil-young.html16:51
daliashas nothing to do with your ears being crappy16:51
poke53282I wonder whether all this matters if you have compressed sound. Probably not.16:52
poke5328216 Bits persample is also quiet high. I wonder if my magnet in my sound box can differ between 65536 positions.16:54
poke53282And now we have 24 bits or even floating point numbers.16:55
stekernthe i2s chip I'm using is 32 bits17:00
poke53282I am pretty sure that in my audio equipment is no 32 bit DA converter implemented.17:02
poke53282If they use the output of +- 1 Volt to my loud speaker, that means they try to differ in the nano-Volt region.17:04
poke53282It makes sense in audio software for calculations of course.17:04
dalias16bit is actually rather low17:06
poke53282dalias: so they argue about hardware limitations and distortions because of the limitations.17:07
daliasit lacks dynamic range17:07
daliasa 16-bit logarithmic scale would be fine17:07
poke53282the article says, that 16 bits is Ok.17:09
poke53282the Javascript audiocontext takes floating point numbers between -1 and 1.17:10
poke53282Yesterday I tried different values (like NaN) with the result, that I had to reset my sound card. Never had this problem before.17:11
poke53282Yes, I can break the specific sound card just by opening a web site.17:12
poke53282Maybe I should write a bug report.17:12
poke53282Dalias: Thanks for the article. It makes several thinks clear.17:15
dalias:)17:25
olofkpoke53282: Haha. That's a new attack surface then. If you hear a radio station that plays really bad music, you could convince them to try out jor1k and hopefully break their equipment ;)18:28
poke53282I already fixed the bug. But I think this can easily reproduced with a few lines of code.18:45
poke53282For me a simply reset of my sound card driver fixed it.19:16
HeshamCan I use -fstack-protector* flag for the current gcc port?19:56
stekerncompiling tinysid with anything > O0 makes it not work20:28
poke53282hmm, that's strange.20:38
poke53282so, has nothing to do with endianess and alignment20:39
poke53282the cpu has a 16 bit address-bus and is capable to do non-aligned accesses.20:40
poke53282ok, the databus is 8 Bit. But the instructions are non-aligned.20:41
poke53282But the source code seems to take care of it.20:42
stekernyes, it does20:42
poke53282maybe the fixedpoint math?20:42
stekernwell, we are probably looking at different tinysids20:43
poke53282https://github.com/robn/tinysid20:43
stekernI just remembered that you pasted a link to another tinysid20:43
stekernyes, that's not the one20:43
poke53282But this is an error you should investigate.20:44
stekernhttp://git.rockbox.org/?p=rockbox.git;a=blob;f=lib/rbcodec/codecs/sid.c;h=6e39d3f759c92a99bad73f7aac3727c43cca2a0f;hb=HEAD20:45
poke53282that's all?20:46
stekernyes20:46
poke53282I can't see anything unusual in the code.20:51
stekernyeah, it's not 8086tiny:ish ;)20:53
poke53282Maybe you should valgrind it. There might be a bug. Otherwise I don't see a reason why it should not work when you turn on -O220:53
poke53282static inline int quickfloat_ConvertFromFloat(float f) { return (int)(f*(1<<16));  }21:17
poke53282...21:17
poke53282filtmul = quickfloat_ConvertFromFloat(21.5332031f)/mixfrq;21:17
poke53282he uses also strange conversions. Could this be a reason?21:17
poke53282static inline int quickfloat_Multiply(int a, int b) { return (a>>8)*(b>>8); }21:19
poke53282this is strange enough for me21:19
poke53282Might be, that he assumes some special C behavior or some undefined behavior in C which works just fine on x86.21:20
poke53282there are some examples about C optimizations which are unexpected but according to the standard valid.21:23
-!- Netsplit *.net <-> *.split quits: martinboehnert23:52
-!- Netsplit over, joins: martinboehnert23:54
--- Log closed Tue Sep 16 00:00:54 2014

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