IRC logs for #openrisc Friday, 2013-08-30

--- Log opened Fri Aug 30 00:00:33 2013
hansfbaierHi can I use the same SD parameters for altera as for actel? there are no others defined.01:09
hansfbaierLooks like SD support is broken01:13
stekernknz: I'm not sure what the actual "l" stands for (long?), but the "l." instructions are integer 32/64 bit instructions. They started on a 16-bit instruction set as well, which was "h." IIRC02:55
hansfbaierstekern: Is there a linux driver for the simple_spi in the orpsoc?03:49
hansfbaierI can't find one yet.03:49
hansfbaierThere is one for the tiny_spi from opencores?03:49
hansfbaierWhy did orpsoc not use that one? It is also wishbone compatible...03:50
stekernhansfbaier: there is a linux driver for simple_spi, but not upstream04:20
stekernhansfbaier: ask _franck_ what he thinks about the rtl code quality of tiny_spi ;)04:21
stekernthe rtl for simple_spi is very well written04:22
stekernand tiny_spi probably didn't exist when the very first orpsoc was created04:24
hansfbaierstekern: thanks04:36
hansfbaierstekern: I can't find it in jonas' either04:36
hansfbaierIn which repo could I possibly look for it?04:36
stekernit's in jonas repo04:36
stekernit's perhaps called opencores_spi or something like that04:37
stekern"OpenCores Simple SPI Controller" is the description in config04:39
hansfbaierstekern: Ah great04:44
hansfbaierI have jonas'source04:44
hansfbaierneed to figure out dts04:44
hansfbaierstekern: Do you know where I could find a sample dts for the GPIO?04:45
hansfbaierThe kernel doc is not terribly helpful (yet)04:45
hansfbaiergoogle wasn't so friendly either04:45
stekernyeah, wait a sec04:46
hansfbaierstekern: wow great04:48
hansfbaieralready sitting hours in front of the screen looking for something like that04:48
hansfbaierWow that is awesome04:48
stekernhansfbaier: there's a small pitfall with the gpio driver under linux, if you remember I told you to change a row in the rtl to get _franck_s ledblinker working?04:49
hansfbaierstekern: need to reverse that?04:49
stekernthat line was in there as a workaround for a bug in the jbtrivial driver04:49
stekernI've posted a series of patches with some fixes to that, and this fixes that bug:
stekernthere was a couple of compile error fixes in that series too that you need for it to compile in newer kernels04:51
stekerneasiest for you is maybe to just grab my .c and replace yours with it:
stekernultimately, I'd like to use the generic-gpio driver, but unfortunately there is no device tree support in that driver04:53
stekernotherwise it suits us just fine04:54
stekerncool, I just booted linux on de0 nano with mor1kx running at 75 MHz05:00
hansfbaierstekern: wow05:01
stekernunfortunately I had to set the SDRAM clk to wb clock, otherwise there was some timing errors in the clock domain cross05:01
hansfbaierstekern: I tried to swap out the or1200 and in the mor1kx, after changed the instance in top to mor1kx I got lots of errors05:02
stekerncould be that they should be marked as ignorable, since the CDC should be handled correctly05:02
hansfbaierabout missing signal names etc05:02
stekernhmm, ok05:02
stekernyou don't happen to remember what signal names? ;)05:05
hansfbaierstekern: no, I am afraid :)05:09
hansfbaierwas quite a bunch, so I just quickly swapped it back05:09
hansfbaierwant to get myENC28J60 board get working first05:09
hansfbaierstekern: the sd controller seems broken somehow.05:10
hansfbaierIf I compile with ACTEL05:10
hansfbaieri get errors05:10
hansfbaierif with ALTERA errors too05:10
hansfbaierdisabled it05:10
hansfbaierBut SPI would be another option05:10
stekernI have no experience with the sd controller05:15
stekernbut I think orsoc used it on their ep4 devboard, so it should be possible05:16
stekernfor that board, I would start out with SPI anyway, seems to me that will be a lot easier to debug initially05:18
stekernthat board = ENC28J6005:18
stekernor are your sdcard adventure unrelated to that? ;)05:19
stekernbecause looking a bit closer, I can't see how they would be related05:21
hansfbaierstekern: eint_pad_i[24] is that wired to interrupt 24?05:21
stekernI thought the card would have some weird sdcard emulation thing going on05:22
stekernhansfbaier: yes, in my setup05:22
hansfbaierstekern: no not related05:22
hansfbaiereth: enc28j60@0 {05:22
hansfbaier//#address-cells = <1>;05:22
hansfbaier//#size-cells = <1>;05:22
hansfbaiercompatible = "microchip,enc28j60";05:22
hansfbaierspi-max-frequency = <1000000>;05:22
hansfbaierreg = <0>;05:22
hansfbaierinterrupt-parent = <&pic>;05:22
hansfbaierinterrupts = <24>;05:22
hansfbaiernot sure about those comments, but I'll throw 'em out05:23
stekernbut it's probably not connected to interrupt 24 in your setup05:23
hansfbaierstekern: I connected the Interrupt out pin of the board to the eint_pad_i[24]05:24
stekernwait I'll check05:24
hansfbaiershoudn't that go into the interrupt controller?05:24
stekernah, ok, eint[24] is OK, I was thinking about eint[26]05:25
hansfbaierstekern: I wired all interrupt in pads [30:24]05:25
stekernyeah, that sounds correct then05:25
hansfbaierstekern: how about 25?05:25
hansfbaierstekern: where do you look?05:25
stekernlook in orpsoc_top05:26
* hansfbaier still looking05:26
stekernwhere the interrupts are assigned to the cpu (somewhere near end of file)05:26
hansfbaiergot it05:26
hansfbaiersearched for int_pad05:26
hansfbaierstekern: 25 is negated05:28
hansfbaierthat's nice05:28
hansfbaierthe INT on the enc is low active05:28
stekernyeah, so just edit there if you need more of them05:29
stekernso, in my local tree I have eint[26] added there, and it's probably referenced in the dts I gave you, that's why I'm confusing you with comments like "in my setup"05:30
stekernit's a bit of a work-in-progress I have, I use that for the pen irq for a touch screen, but the driver for the touchscreen chip wants to read a gpio that holds the value of the irq line, and that's not possible with some changes to how the gpio work05:32
stekernhence still only in my working tree05:32
stekerns/with some changes/without some changes/05:33
stekernbut if you add more of them, you of course have to change the EINT tcl file too, but I assume you already knew that05:34
hansfbaiertcl file?05:35
stekernyeah, the pin assignment file05:35
hansfbaierstekern: i have [30:24] wired up in tcl05:35
hansfbaierled2 {05:37
hansfbaierlabel = "led2";05:37
hansfbaiergpios = <&gpio0 2 0x0>;05:37
hansfbaierthat 0x0 does it mean the led lits low active?05:37
hansfbaierstekern: ^05:40
hansfbaierstekern: Ahhh I know what you mean in de0_nano it's all in those different tcls05:40
hansfbaierstekern: I don't use them ATM05:41
hansfbaierstekern: I use quartus directly05:41
hansfbaierjust need to remember to stuff it back to those, when I am "finished"05:41
stekernI'm not sure what the 0x0 indicates in jbtrivial, if it's even used05:45
stekernah, or is that specific to the led driver?05:46
stekernyou ask hard questions ;)05:46
stekernwhich is good05:46
stekernno, I think that's specific to the gpio controller05:48
hansfbaiercool found a dts entry for my pcf856305:53
hansfbaierstekern: On a PC it's plug and play, with openrisc, you play until it plugs ;)05:59
stekernah, if I understand this right, it's gpio controller specific, but only if it overrides the default. and the default for the flag is that 0x1 is active low and 0x0 would be active high then06:05
stekernheh, that should be our slogan "Play until it plugs"06:06
stekernI wonder if the flags are automatically used though, might be that they have still no effect06:09
hansfbaierstekern: Hey cool, thanks06:10
stekernnp, you gave me a reason to look something up that I've been wondering about myself ;)06:14
olofkTop of the morning to you, Sir!06:30
hansfbaierstekern: drivers/spi/spi_opencores.c06:40
hansfbaiergives me compile errors :(06:40
hansfbaierHow do i get the compile messages in english LANG=C doesn't work06:41
hansfbaierI'll try LC_ALL06:41
hansfbaierdoesn't work either06:41
stekernah, they are probably in german now, right?06:42
stekernbut, you now remind me that I fixed those in my repo, but I haven't sent those to the ML06:44
stekernlocal repo06:44
stekernbecause I wanted to take a look at this too: "oc_spi_simple b0000000.spi0: master is unqueued, this is deprecated"06:45
hansfbaierah thanks, just started fixing it...06:47
stekernyeah, they are no real hard nuts to crack, remove the devinit and add module.h iirc06:48
hansfbaierstekern: would be nice to push to jonas06:48
hansfbaierbetter than compile errors06:48
stekernyup, I will send them to the mailing list eventually06:49
hansfbaierstekern: THE LEDs BLINK06:53
hansfbaierheartbeat and timer06:53
hansfbaierI don't have serial since06:53
hansfbaiermy USB stack has gone bonkers again06:53
hansfbaierand I can't reboot, because still downloading or1k-gcc06:54
hansfbaierbeing not able to resume large downloads is my biggest grudge against git06:54
stekernyes, I agree on that06:55
stekernwhat's up with your USB stack, does seem very unstable06:55
hansfbaierwhen I disconnect the pl2303 by switching off the FPGA06:57
hansfbaiermy USB stack refuses to recognize any new devices06:57
hansfbaierusing Ubuntu 12.0406:57
hansfbaierLinux jack-desktop 3.2.0-41-lowlatency-pae #45-Ubuntu SMP PREEMPT Fri Apr 26 11:26:31 UTC 2013 i686 athlon i386 GNU/Linux06:58
hansfbaierstekern: low active leds work like a charm06:58
hansfbaier4 of my GPIO leds are low active (onboard) 4 active high06:58
stekernok, so that flag is automatically used, good to know06:59
stekerndo you have to turn off the fpga?07:00
stekernI assume you mean power toggle it07:02
hansfbaierstekern: no, not really07:04
hansfbaierstekern: only if I connect new hardware, and even then I often do it online07:04
_franck_hansfbaier: LANG=EN && what_ever_you want but you may have figured out yourself already07:04
hansfbaier_franck_: I used LANG=C, LANG=en_US, LC_ALL=C, LC_ALL=en_US nothing worked07:14
hansfbaieror1k-gcc git clone sucks big time at 9kb/s07:14
knzhansfbaier: if you run git gc / git pack on the other side beforehand it's slightly better07:16
knzalso, I usually tar+bz2 the .git and copy using ftp instead07:16
* olofk is longing for the day when it can be safely assumed that all tools handle multidimensional verilog arrays in functions07:20
stekernthat and . notion in synthesis tools07:31
hansfbaierknz: I already regrettet I didn't do that07:34
hansfbaierhave a VM in germany07:34
hansfbaierif it fails another time i'll do it07:34
knzwget -c is your friend :)07:35
stekernjuliusb: pull requests ahoy!07:37
olofkstekern: The . notion = Avoid having to explicitly list connections with the same name as the wire on instantiations?07:41
olofkstekern: Do you have to say "Pull requests ahoy!" to do a pull request? Couldn't find that in the git man page, but I'm still learning07:42
olofkShould that be "git pull requests ahoy!" ?07:42
knzolofk: no it's not necessary :)07:42
stekernit would be fun if it was though07:43
knzalthough I'd rather not have an exclamation mark in a standard command07:43
knzit would make it a pain in most shells07:43
olofkI !disagree with that07:43
stekernolofk: ". notion" => assign some_sig = top_module.sub_module.sub_sub_module.internal_signal;07:44
olofkAh ok... I thought that was definitely supported07:45
olofkI can imagine it will cause some confusion for ASICs, but the FPGA tools shouldn't care07:45
stekernbut maybe j random hw designer can't be trusted with that...07:45
olofkThey still gave us defparam, which is equally fucked up in that regard07:46
stekernbecause it's of course a potential mess maker07:46
stekernbut for debugging purposes it would make a whole lot of sense07:47
olofkSpeaking of J Random HW Designer... haven't seen him around for sokme time. :)07:49
olofkMaybe he's busy preparing for his OHS appearance07:51
stekernmmm, he has been even more quiet than usually the last couple of days07:52
olofkI'm adding a orpsocv3 talk to the meeting page. No need to route through the mailing list.07:56
olofkIs there anyway to remove the annoyingly large whitespace in front of links on the opencores wiki?07:59
stekerndunno, but I find them ugly too08:01
olofkHaha! The oldest page on the openrisc wiki is "News"09:38
olofk...and it's empty :)09:39
olofkDo we have an ABI extension for PIC now?09:49
olofkOr was the implementation done before setting the ABI?09:49
olofkI need to stop asking questions with an or between the statements10:05
stekernyup =)10:11
stekernwe have an ABI for it, it haven't made it into the arch spec though10:11
stekernand it kind of evolved during implementation10:12
stekernthe only "discussion" about the ABI was on some wiki page, but that's kind of sparse10:16
stekernfilling out the empty page in the arch spec is on my TODO list10:16
stekernbut for some reason stuff like playing DOTT on openrisc seems utterly important when it start to get close to the top of the list ;)10:17
hansfbaierstekern: GPIO and RTC seem to work10:35
hansfbaierethernet appears,10:35
hansfbaierbut when I plug in the cable the system freezes shortly after10:35
hansfbaierprobably has to do something with the interrupt10:35
hansfbaierstekern: I can ping it:10:38
hansfbaier# ping
hansfbaierPING ( 56 data bytes10:38
hansfbaier64 bytes from seq=0 ttl=64 time=22.658 ms10:38
hansfbaier64 bytes from seq=1 ttl=64 time=18.111 ms10:38
hansfbaier64 bytes from seq=2 ttl=64 time=18.266 ms10:38
hansfbaier64 bytes from seq=3 ttl=64 time=18.168 ms10:38
hansfbaier64 bytes from seq=4 ttl=64 time=18.295 ms10:38
hansfbaier64 bytes from seq=5 ttl=64 time=18.209 ms10:38
hansfbaier64 bytes from seq=6 ttl=64 time=18.140 ms10:38
hansfbaier64 bytes from seq=7 ttl=64 time=18.222 ms10:38
hansfbaier64 bytes from seq=8 ttl=64 time=18.164 ms10:38
stekernheh, did it bring his network down now?12:14
olofkMaybe he's got a USB-connected NIC :)12:47
jeremybennettHi all - are we going to have a DE0-nano workshop session at ORConf?14:51
jeremybennettWe have the materials from ChipHack, and we can bring alone 7 DE0-nano boards14:51
juliusbstekern: saw those pull requests this morning, will do it now14:51
juliusbjeremybennett: good question - I'd really like to do some sort of OpenRISC hacking on the de0 nano14:53
juliusb(sadly, in general lately, too, not just at the workshop!)14:54
jeremybennettjuliusb: Let's make time for it at the conference.15:06
jeremybennettBTW am I right that mor1kx comes in three flavours, 2 with 3-stage pipelines and one with no pipeline at all?15:06
jeremybennett(I'm preparing a blog post about ORCONF13)15:07
stekernjeremybennett: almost correct, the one with no pipeline have 6 stages ;)15:13
jeremybennettclose :(15:14
stekernand the 3-stage has 2 stages ;)15:14
stekernit's 1 2-stage with delay slot (espresso), 1 2-stage without delay slot (pronto espresso) and a 6 stage (cappuccino)15:15
stekernjuliusb: thanks for pulling15:20
stekernolofk: are you taking notes about the lingo?15:21
jeremybennettdid we agree on an OpenRISC logo?15:30
stekernjeremybennett: there was at least a proposal that looked closed to what I'd want at least, and juliusb liked it too15:42
stekernmaybe we can have a voting session during conference?15:42
_franck_jeremybennett: is that better to be at 10:25 at Gatwick or 10:55 at Luton ?15:46
stekernjuliusb, jeremybennett are there any hotel suggestions?16:19
olofkMaybe I should get myself a de0 too. Doing an orpsocv3 port would be a good workshop exercise. Especially if there are many boards available19:29
olofkjeremybennett, juliusb : What do they cost in England? The swedish imports were more expensive than I thought19:37
hansfbaierlooks like interrupts in or1200 are active high (not edge triggered) am I right?19:54
stekernthey are level interrupts with a twist19:56
stekernthe interrupt controller register the interrupt lines, so it will still signal an interrupt even if the line goes low19:57
_franck_is anyone has a working setup with or_debug_proxy connected to the mohor debug interface ?20:01
_franck_I just wanted to know if wb byte and half word read/writes are working20:02
stekernI had a couple of months ago, but then it broke down20:04
_franck_ok no problem20:04
hansfbaierstekern: can't understand your last statement "the interrupt controller register the interrupt lines"20:14
hansfbaierstekern: looks like a verb is missing "the interrupt controller register [...] the interrupt lines"20:17
hansfbaierstekern: you mean, if an interrupt goes high, then the pic register still signals an interrupt even if the line went low again?20:23
stekern'register' is a verb in that sentence20:42
stekernyes, what you said last is what I'm saying20:42
hansfbaierstekern: I have a problem with my enc28j6020:44
hansfbaierif the first interrupt comes, linux freezes20:45
hansfbaierwhile looping in interrupt handling code20:45
hansfbaieri looked at picsr20:45
hansfbaierand irq25 is high20:45
hansfbaierstekern: what would you suggest, connect a logic analyzer to the line?20:46
hansfbaierstekern: the enc28j60 driver is marked EXPERIMENTAL BTW20:46
hansfbaierstekern: the kernel runs well, until the cable is inserted where it freezes shortly after (possibly because the first interrupt comes in)20:47
stekernwhat does the datasheet for the device say about the interrupt20:48
hansfbaierstekern: let me see20:48
hansfbaierstekern: After an interrupt occurs, the host controller should20:51
hansfbaierclear the global enable bit for the interrupt pin before20:51
hansfbaierservicing the interrupt. Clearing the enable bit will20:51
hansfbaiercause the interrupt pin to return to the non-asserted20:51
hansfbaierstate (high). Doing so will prevent the host controller20:51
hansfbaierfrom missing a falling edge should another interrupt20:51
hansfbaieroccur while the immediate interrupt is being serviced.20:51
hansfbaierAfter the interrupt has been serviced, the global enable20:51
hansfbaierbit may be restored. If an interrupt event occurred while20:51
hansfbaierthe previous interrupt was being processed, the act of20:51
hansfbaierresetting the global enable bit will cause a new falling20:51
hansfbaieredge on the interrupt pin to occur.20:51
hansfbaierand a lot more ...20:51
hansfbaierbut irq can be driven by pkt, dma, link, tx, rx20:51
hansfbaieralso tx_error, rx_error20:52
stekern"clear the global enable bit"20:53
stekernisw that done over spi?20:53
hansfbaierstekern: yes, there is no other way20:53
hansfbaierI suppose20:54
hansfbaierstekern: is there any way to add a display expression for picsr20:54
hansfbaierin gdb?20:54
stekernapart from reading the spr?20:56
hansfbaierstekern: eg I can watch r5 by20:56
hansfbaierdisplay $r520:56
hansfbaierthen after each step it will automatically display r520:56
hansfbaierbut this does not work for sprs20:56
stekernah, no I suppose you can't20:58
hansfbaierstekern: connected a logic analyzer: Yes21:13
hansfbaierstekern: when I plugin the cable21:13
hansfbaierIRQ goes low (active)21:14
hansfbaierstekern: and system freezes21:14
hansfbaierstekern: maybe the driver fails to reset the interrupt21:14
hansfbaierstekern: will connect the analyzer to SPI21:14
hansfbaierstekern: hey cool21:20
hansfbaierI disconnected the enc28j60 (power down and up again), and lo and behold, the kernel awoke from its freeze21:20
hansfbaierand the heartbeat leds are happily blinking once more21:20
hansfbaier# cat /proc/interrupts21:24
hansfbaier           CPU021:24
hansfbaier  2:        414  or1k-PIC-level     serial21:24
hansfbaier 10:         36  or1k-PIC-level     a0000000.ocores21:24
hansfbaier 25:    1567043  or1k-PIC-level     enc28j6021:24
--- Log closed Sat Aug 31 00:00:14 2013

Generated by 2.15.2 by Marius Gedminas - find it at!