IRC logs for #openrisc Thursday, 2014-09-25

--- Log opened Thu Sep 25 00:00:09 2014
-!- Netsplit *.net <-> *.split quits: bentley`00:52
olofkFuck you Quartus!07:44
olofkAt least give me a warning when I'm passing a 16-bit value through a 8-bit register, instead of quietly setting the top half to zero07:46
-!- ed-jones_ is now known as ed-jones09:58
blueCmdpoke53282: THANKS soo much for doing that, I never was able to get full runs without weird errors10:12
blueCmdpoke53282: did you try to use profile-dir=. ?10:13
olofkTook me a while to reverse-engineer this weird format conversion. Apparently I should take three 16-bit words, reverse the order of them, and then treat them like four 12-bit words11:08
olofkstekern, hansfbaier : Are the SPI and I2C masters in the de0 nano port connected to anything on the de0 nano, or just forwarded to the pin headers?11:12
olofkaha... pinmap.tcl had some clues here11:12
hansfbaierolofk: Yes, they are connected to some peripherals11:16
hansfbaierbut one of them is forwarded to the port IIRC11:16
olofkhansfbaier: Yes, one I2C and one SPI from what I can see11:16
olofkAnd I assume that "bottom header" is the shorter one at the short end of the board11:17
hansfbaierYes, the file should be quite readable11:17
hansfbaierolofk: sorry have to go, got a gig tonight11:17
olofkhansfbaier: Knock 'em dead!11:17
hansfbaier:)11:29
stekernolofk: what are you doing?11:45
stekernbtw, I have added a 'tx_cnt' register that can be read at address 4 to my wb_writer11:46
olofkstekern: Working on my OpenRISC-SoC for MyriadRF11:48
stekernto be able to get information about how much has been transmitted11:48
olofkstekern: Cool. Does linux use it, or just for debug purposes?11:48
stekernbut, I'd like to get some input before I propose it in the form of a pull request11:49
olofkIt should shut down the core when more than 1MB has been transmitted, and there is no valid license. That's my only opinion11:49
stekernnow, the buf_size is in bytes, but the tx_cnt is in words11:49
stekernI think those should be of same magnitude11:50
olofkI think we should use bytes11:50
stekernok, good, one question down ;)11:50
olofkI have a few ideas how to extend the core to handle unaligned accesses in the future11:50
olofkwhich is useful for ethernet packets or just moving arbitrary memory regions11:51
olofkburst size can still be any unit. That is really only used to control bus utilization11:51
stekernsecond question, do you want the register to be seperate or should we use write of register 2 as buf_size and read as the current transmitted bytes11:53
olofkAre there any good reasons to reuse the register? Having it separate sounds more straight-forward11:54
olofkIs tx_cnt per transaction, or total?11:54
stekernI have renamed adr and made it visible to _cfg.v11:55
olofkah ok. Yeah, then it makes a little more sense to reuse reg 211:55
stekernbut I don't know if there's really much benefit of saving one reg like that11:56
olofkNo opinion here really. If you have a feeling for what would be more standard, go with that11:56
stekernreg 2 could just read out the buf_size as written if someone cares to get to know the current setting11:56
olofkTrue. I think that is better actually, in case someone wants to know what the driver has set it to11:57
stekernlet's leave it as a seperate register11:57
olofkSoftware sometimes does crazy shit to hardware11:57
stekernand to answer the question if it's needed or just for debugging, Linux can make use of it, but it's not mandatory11:58
olofkI need an i2c slave. Any ideas?11:58
olofkI think it's a good addition11:59
stekernbut since the logic already is there and it's just a matter of making it visible on the wb bus, I thought I throw that in11:59
stekernit might help me sort out the buffer underrun problems I have with my sound setup too11:59
stekernI think the DMA driver is ok, so it has to be something with how I set up the 'sound card'12:00
stekernalsa is a mess...12:00
olofkAre you using one or several buffers?12:00
olofkYeah, you should go with pulseaudio instead ;)12:00
stekernthe DMA driver setup a set of software descriptors12:02
stekernand then those are used as a ring buffer12:02
olofkgood. That's how I assumed it would work12:03
stekernthe problem seems to mostly arise when the ring "starts over"12:03
olofkYou're using linux, right?12:04
olofkBecause windows xp 32 bit is the only supported platform for this hardware12:05
stekernah... no, I'm currently using windows 712:05
stekernthere's a 32-bit windows xp machine next to me, will that help?12:08
olofkAnyone about to move to Sweden and is looking for a job?15:45
stekernolofk: what's the offer? ;)15:52
olofkOur company is looking for experienced people in HW/layout/schematics/FPGA15:53
poke53282blueCmd: You are welcome. I am wondering, why you had problems. I use your binary.15:53
poke53282I didn't used the profile-dir in the end. This option didn't change anything.15:54
poke53282but some problems aren't related to gcc.15:55
poke53282but to QEMU.15:55
poke53282this C file is a weird one: 20030125-1.c http://pastie.org/959396115:58
poke53282I don't have a clue why it crashes in QEMU.15:58
poke53282I haven't compiled qemu for a long time. Maybe it's time.16:13
poke53282to fix a few things.16:13
poke53282Finally I could also run the testsuite for libffi.16:14
stekernpoke53282: iirc, that one failed in my setup too16:49
stekerndoesn't it fail when running it in jor1k?16:50
poke53282no16:50
poke53282qemu: uncaught target signal 6 (Aborted) - core dumped16:50
poke53282I can compile qemu, but my distribution got rid of all static libraries :(16:51
poke53282so I can't compile a static qemu.16:51
stekernhmm, measuring the time it takes for my i2s logic to pull out 8192 bytes of wb_streamer, I get around 11.7 ms18:34
stekernbut 8192 bytes should be 1024 samples 8192/(4*2), which should take 21.3333ms @48kHz18:35
stekernright?18:35
stekernsome stupid mistake somewhere, for certain...18:36
poke53282each sample has 32 bit? two channels?18:48
poke5328248kHz?18:48
stekernyes18:53
stekernI just measured the period of my lrclk, and that is 48kHz18:54
stekernso the mistake is not there at least18:54
stekernand my logic pulls a sample out of the wb_streamer at each edge of the lrclk18:55
stekernalso a sanity check of the kernel time keeping turned out ok18:57
stekernat least the error is a sensible divide by 218:59
poke53282The no of channels are most obvious thing, that could give you a factor of two.19:06
stekernyes19:07
stekernbut I get the 8192 from my dma driver19:07
stekernand that's the value I write to the wb_streamer core19:07
stekernso the number of things that can be wrong is quite limited19:08
poke53282blueCmd: If I compile with my static qemu version the error seems to be gone. I rerun the testsuite now19:42
poke53282and then I will take a look at your swa and lwa implementation.19:43
stekerndoh... of course the time doesn't add up, I have a 1024 word deep FIFO. so when the interrupt comes, I've read out ~1024 words to the i2s interface and ~1024 words are in the FIFO21:23
stekernseems like the underruns are actually real underruns, the sin test use sin() (no precalc)21:25
stekernand the .wav I tested was 44100, and resampling was obviously to heavy. If I convert it to 48000 I can play it21:26
stekern*too21:26
stekernI should add a small config core between that can switch clocks and do some 32->16/32->24 bit conversions so I can support all kinds of formats21:28
olofkCool21:35
poke53282stekern: you should trigger the interrupt when the fifo is half empty.22:04
stekernpoke53282: why?22:08
poke53282to refill as long as there is time? Ahh sorry, mixed this up with the pio mode I tried.22:09
stekernwhen I get the interupt, the fifo is full22:10
poke53282for DMA this is probably not necessary.22:10
stekernnot empty22:10
poke53282Hmm, in which way this method differ from the Soundblaster standard. This programmed (decades ago) by hand.22:10
poke53282You a ring buffer and at  position 0 and buffersize/2 an interrupt was triggered.22:11
poke53282You had a ring buffer and at position 0 and buffersize/2 an interrupt was triggered.22:11
poke53282And the DMA device read periodically this buffer.22:11
stekernyes, that's basically how this works too22:12
stekernbut we don't have automatic cyclic reading22:13
stekernand the ring buffer is split up in smaller chunks22:13
stekernso, you get an interrupt at the end of each chunk22:14
poke53282Ok, that's basically the same.22:14
stekernbut, to have time to start of the next chunk, we have a buffer FIFO22:15
poke53282But the FIFO is an internal part of the DMA device?22:17
stekernyes22:17
poke53282blueCmd: Sorry, I was wrong. This 20030125-1.c also crashes in jor1k. I compiled it without optimization.22:25
poke53282But I compile it with, it crashes too. Has nothing to do with qemu.22:26
poke53282blueCmd: Now I know, why I had never this error in uclibc. They don't test it there: "if { [check_effective_target_uclibc] } { return 1 }"23:02
poke53282Anyhow, this is a really weird testcase.23:09
--- Log closed Fri Sep 26 00:00:10 2014

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