IRC logs for #openrisc Wednesday, 2015-04-15

--- Log opened Wed Apr 15 00:00:07 2015
olofkstekern: Thanks. Maybe I should have made sure to understand the spec before I started coding, but on the other hand it turned out to be a good learning experience05:23
olofkAnd I would very much like to update some parts of the wishbone spec05:24
stekernreading before starting to code? never heard of that ;)05:29
stekernolofk: since you were so fond of my veroboard pr0n, here's some more: http://1drv.ms/1b1YQ1705:30
stekernonly atari joystick connectors missing05:31
stekernsome things works too: http://1drv.ms/1CWCJis05:32
stekernthe mor1kx I added to the build is 300 LUTs smaller (2400 vs 2700) than the or1200 that was there05:33
stekernand I have icache enabled on the mor1kx, it's not enabled on the or120005:34
stekernstill a bunch of stuff that can be disabled in the mor1kx I have there too, like addc and range/overflow05:35
stekernI had some weird problems with the PS/2 connections, one pin on the de0 nano GPIO1 pin header is pulling down the signal for some reason05:37
stekernand I had a similar problem with the audio output, the left channel volume  was a lot lower than the right, and when I measured the pins with a scope without the RC filter, the left pin high level was something like < 1V05:40
stekernand exact the same pin settings in quartus05:40
stekernI suspect some PCB problem, but I just moved over to use some other pins instead of the problematic ones05:41
stekernactually, it was the right channel that was lower than the left. Not that it matters ;)05:42
olofkCool!06:27
olofkstekern: Maybe your nano is tired of you performing experiments on it? :)06:31
olofkstekern: What is the build system like for minimig? I could take a look at FuseSoCify it if you haven't done that yourself06:35
stekernolofk: it's just Makefile based06:47
stekernhttps://github.com/skristiansson/minimig-de1/blob/master/Makefile06:47
wallentohey guys, please review those for upstream: https://github.com/openrisc/newlib/tree/for-upstream06:54
daliasstekern, no problems with new stuff in musl still?06:54
olofkwallento: I looked at the patches and realized I don't understand enough to review. Sorry06:57
stekerndalias: not that I have noticed, I haven't got around to do any elaborate testing though07:02
olofkHesham: I haven't looked into HTIF. What is it?08:10
olofkAnd if you want to have Wishbone over ethernet, there is etherbone. It's included in the Linux kernel08:11
HeshamIt's how RISCV SoCs communicate with the host machine08:11
HeshamHost Target Interface..08:11
olofkhmm... when is that used?08:11
HeshamEvery time I think. It's how the Linux port communicate with FPGA now.08:12
HeshamFor console output and debugging08:12
HeshamAnd uploading binaries ...08:13
HeshamI've seen htif_rs232 (used by frontend server) variant but don't know if it has been already used.08:14
HeshamAnyway, I'm going to write a simple serial driver to load some data to RTEMS using USB-UART. If it works I'll move to loading binaries on fusesoc using this driver.08:16
olofkHesham: Hmm.. so you basically have Host computer <-> Ethernet <-> HTIF <-> Target system?08:18
Heshamolofk: I am not sure, but I think the Ethernet can be any other sort of communication channel like rs23208:19
olofkHesham: Yeah. Something to load binaries through UART would be great. I think the zmodem protocol or just passing SREC/Intel Hex files would be the best option08:19
olofkHesham: It sounds like the Ethernet/UART <-> HTIF conversion might use up a lot of FPGA logic08:20
HeshamWhy SREC format? Can't it just be a raw binary?08:20
HeshamIf UART <-> HTIF hardware logic is not already there, I may think of implementing it, depending on the amount of effort.08:21
olofkThe problems with binaries is that UART controller might interpret some data as control characters08:21
olofkUARTs are messy08:22
olofkBut it might work just fine. Maybe this is just problems with legacy systems08:22
_franck__Hesham: if you parse SREC or Intel Hex you can have offsets for datas embedded in the file08:22
HeshamI think it's the only good option at least on my Atlys board08:24
olofkHesham: I think it should be pretty easy to do a Hex loader in C. There are probably a few already available08:25
Hesham_franck_ I will give it a look if the driver worked fine with RTEMS.08:25
olofkI started doing mine in asm because I wanted to have it as an initial bootloader to be embedded in a Block RAM. That requires that it's really tiny08:25
Heshamolofk: So you will put the bootloader on the BRAM and make the core jump by default to it?08:26
olofkHesham: Exactly08:28
bandvigolofk: Does kermit protocol solve problem with UART control characters? I used "Kermit" with u-boot for loading binaries through UART.08:28
olofkkermit and zmodem are similar08:28
olofkAccording to the zmodem spec it is intended to solve some issues with kermit08:28
Heshamolofk: To make it easy, I'll write both drivers (Host Side + RTEMS/Target side) first, then see the RTEMS driver can be ported to FuseSoC BRAM08:29
HeshamI can't download kermit, the download links are broken08:29
olofkHesham: Cool. Do you have a feeling for how large it is? Ideally we would like to embed u-boot directly, but that's far too big08:29
Heshamolofk: Not yet, I'll have to get the feeling by doing it today :)08:30
olofkbandvig: And yes. Kermit, xmodem, ymodem and zmodem are all protocols to work around control character problems among other things08:30
HeshamBut yes, why can't we use kermit and zmodem?08:30
olofkstekern proposed zmodem. I just figured that my crappy asm skills wouldn't be enough to implement it08:31
Heshamolofk: You mean from OpenRISC side?08:33
olofkHesham: Yes. Whether we go for zmodem/kermit or a hex loader, someone must implement the loader on the OpenRISC side08:33
HeshamI see. I'll let you know about any good progress I make regarding this bootloader issue.08:35
olofkHesham: Cool. I'm very interested in this, so let me know how things proceed and what you find out08:35
bandvigGuys, really for me it looks like that you are trynig to implement minimum version of u-boot. Perhaps, it is easier just to reconfigure the u-boot with minimal set of features and fix issues on both sides (host PC / target). Am I wrong?08:39
olofkbandvig: Yes. That would be ideal as we don't really want to maintain any unnecessary code08:41
olofkProblem is that I haven't been able to make u-boot small enough. I can only get it down to ~100kB08:42
olofkWe need to make it like at most 32kB. Preferrably something like 4kB08:43
olofkI forgot to mention that u-boot has also recognized this problem and created something called SPL, which is a tiny bootloader intended to load a full u-boot (basically what our SPI bootloader does)08:45
olofkThat could be worth investigating08:47
bandvigolofk: investigating what? SPL? If the SPL is small enough and open sourced, perhaps it is a good solution.08:49
olofkJust search for uboot spl08:51
bandvigolofk: Ah, uderstood.08:57
wallentoolofk: np09:09
wallentodoes anybody have a clue where in binutils I can properly set the byte 0x20 (format) in objects created by objcopy?09:10
wallentoeh, 0x1309:19
olofkwallento: Is that the old bug for which you had a small python hack?09:36
stekernwallento: is it this you are speaking about? https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=25cfef2d6b1ae8e3f976f1e55576d0fbaff79027;hb=HEAD#l19609:57
olofkHaha. I was just reading some x86 asm and caught myself looking at the instructions after each jump. Forgot that not all CPUs use branch delay slots :)10:52
ysionneauahah10:53
wallentoolofk: yes, I have a bash hack now also: bash -c "printf '\x5c' | dd conv=notrunc of=$BINARY bs=1 seek=$((0x13)) 2> /dev/null"11:04
wallentostekern: yes, that is what should be there11:04
wallentobut it isn't11:04
olofkwallento: You should make a matlab version too, and port it to Ruby on Rails perhaps11:04
olofkMake an Android app to while your at it and launch a cloud service called objcopify11:06
olofkI should probably work more :(11:06
stekernwallento: what do you mean "it's not there"?11:18
stekernit's there in the elf I just built11:19
wallentono, I mean in objcopy11:19
wallentoIf I generate an object from binary data11:19
stekernah11:19
wallentothen it has no architecture set11:20
stekernok, but that's a generic objcopy problem then, right?11:20
wallentoI dont' know11:21
wallentowill check this11:21
wallentoahh, found it11:23
wallentosorry to bother11:23
wallentoit is required to set the architecture11:24
wallentoeven if -O elf32_or1k is used it is required to set -B or1k when using -I binary11:24
wallentowhich is confusing, but that solved my oldest "bug"11:25
ysionneauthe input file had an explicit architecture?11:25
wallentonope, its plain binary11:53
wallentoI assumed that the output architecture is set by -O elf32-or1k11:53
wallentoand -B is only necessary for other architecture-independent formats11:53
ysionneauah ok12:02
olofkwallento: Does this mean you will update bugzilla? :)12:24
bandvigolofk: Is it a bug or feature? :)12:49
olofkbandvig: Hard to say. Maybe we need a featurezilla as well :)13:18
bandvigolofk: with comments like "works as designed" :)13:41
wallentoah, this bugzilla-thing14:31
wallentoyes14:31
wallentobtw. there is one patch in the newlib branch that should solve your uart issues14:31
stekernthis is starting to become frustrating, I've searched high and low but can't find how you enable the internal pull-ups on cyclone iv devices with quartus16:52
stekernthis claims you *can*, but I can't find anywhere that it would say *how*: https://www.altera.com/en_US/pdfs/literature/hb/cyclone-iv/cyclone4-handbook.pdf16:53
olofkset_instance_assignment -name PASSIVE_RESISTOR "PULL-DOWN" -to16:56
olofk?16:56
olofkThere seems to be a WEAK_PULLUP keyword as well16:58
olofkI recognize the last one17:00
olofkBut I'm not sure anymore. Can't find any definitive answers either, and I know too that I have done that17:05
stekernwell, that's at least something I can try17:21
stekern"This option is used in functional simulations only." for PASSIVE_RESISTOR17:26
stekerntoday alteraforum.com doesn't have a broken database like yesterday at least, that's where most of my google efforts yesterday pointed to17:28
stekernset_instance_assignment -name WEAK_PULL_UP_RESISTOR ON -to17:37
olofkstekern: Ah. I saw that one, but thought it was something else18:07
olofkAltera apparently aren't very good at building websites. I have problems connecting to alterawiki all the time18:07
olofkHmm.. there's no instruction to set a word in memory to a constant value without first putting it in a register18:36
olofkWhose stupid idea was it to write a hex loader in assembler?18:40
olofkAnd what's going on with FuseSoC...? It doesn't recognize --elf-load for mor1kx-generic18:49
olofkWhoops. There wasn't any dependency on elf-loader18:52
stekernoh lord... I so need this game: http://www.johannesrojola.com/msc/index.html#media19:54
olofkhaha20:09
olofkI love the homepage too20:10
stekernit's simply brilliant20:10
olofkCouldn't find any <blink> tags in the source20:10
olofkI wonder what the requirements for the games are. My guess is 486DX2, 16MB RAM, VESA adapter and 16-bit sound card20:12
stekernhuh? did you watch the video?20:15
olofkJust meant that the homepage took me back to 199720:17
olofkI did look a bit at the video now. Not all 51 minutes though :)20:18
stekernthere's a slight offset of the quality of the game graphics and the quality of the web page design ;)20:18
--- Log closed Thu Apr 16 00:00:09 2015

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