IRC logs for #openrisc Monday, 2016-03-21

--- Log opened Mon Mar 21 00:00:44 2016
shorneolofk: I did some more testing on my memcpy routines. Intestingly doing the microblaze type analigned word copies is not that much better than byte copies it seems02:59
shorneIn terms of instruction counts at least.02:59
shorneBut it makes sense I think: with byte copies for 1 word you need to do 4 loads, 4 stores03:00
shorneFor the unaligned word copy you do: 1 load, (shift, or)  (shift, or), 1 store03:02
shorneos its maybe 2 instructions less03:02
shorneIll work on posting some findings03:03
shorneanyway some numbers:  memcpy word copies (supporting non-alignment) with loop unrolls, during linux boot avg cycles 1880.303:05
shornememcpy  byte copies, during linux boot avg cycles 7603.003:06
-!- heroux_ is now known as heroux03:23
wallentohi all. I am wondering if we support Linux+barebox with device tree03:40
wallentoor something similar03:40
shorneI published some commits on my linux tree03:46
shornehas some of the 4.6 merges already though its a bit messy but works03:46
shornehttps://github.com/stffrdhrn/linux/commits/openrisc03:46
shorneThe memcpy stuff is here:03:46
shornehttps://github.com/stffrdhrn/linux/commit/eb6b230a8c0c241a37ba7a8ba014dce47dd4955f03:47
shornewallento: I dont know anything about barebox...03:47
wallentoI think it is supported upstream03:47
wallentolike U-Boot03:48
wallentoit would be ideal to have barebox with device tree for each board (+generic) and a common Linux kernel, right?03:48
shorneright, I was just reading the page, I dont use u-boot yet I am just always booting form openocd03:48
wallentookay, so barebox and the DTB build04:16
wallentodon't have the board here for testing04:16
shorneWHy do you bring it up? does it do something uboot doesnt?04:19
shorneJust reading the manual, it looks like it has a lot built in, I guess first we could try to boot barebox by itself. probably you can do with openocd and play with it04:21
shorneI could probably do on de0 nano04:22
wallentoI always trust the fork ;)04:23
wallentoI think both u-boot and barebox are okay04:24
shorneI see, barebox is a fork of uboot04:27
wallentoyeah, they claim they did it nicer04:27
wallentoit is starting in or1ksim04:43
wallentoone warning, but the shell works04:43
wallentoI will push the patched one04:43
wallentohttps://github.com/openrisc/barebox/tree/or1k04:44
wallentoLeaving my comfort zone now. I think we need to build a ramdisk or so, right?04:45
shornewallento: for linux? I am guessing you need to tell barebox where the kernel image is. It can understand file systems, or probably some memory mapped blob05:11
shornelike on an spi flash chip05:11
wallentoI found it has a ramdisk builtin05:11
wallentoI was hoping there is something like an image elf05:12
wallentowhere I can load the image as binary into the ramdisk05:12
wallentobut as you can see I have no clue .)05:14
olofkwallento, shorne: _franck_ is the barebox expert here05:22
olofkwallento: Another thing that I experimented with a while back is how to rebuild the initramfs (busybox) from scratch. It's not really documented anywhere. We ship a pre-built one in our kernel fork, but for upstream kernels we need to build it ourselves05:24
shorneolofk: thanks, wallento: I am not looking at barebox, but I am guessing it expects to find the boot image on some kind of flash.  You can configure that in the or1ksim.cfg I assume you can point it to simulate a flash with a existing filesystem05:25
shorneolofk: I was noticing that too.  I think stekern did some work to update libs in there last year.  I guess its close to the documentation on the busybox website.05:25
olofkshorne: Yeah, I haven't played with or1ksim enough to know the details, but I believe it can emulate flash05:25
shorne(2 subjects there, I was noticing busybox too...)05:26
olofkshorne: Yes, 2 subjects. Just wrote it while I remembered, since it's a bit connected to the cleanup and tutorials we're doing now05:27
shorneOne thing in the kernel config is the pointer into the location of initramfs root and config.  If you where building your own busybox I guess we could update the kernel to point out of the tree to your busybox location.05:28
shorneIt is a good point, we should document it05:28
olofkThat would be nice, so we don't have to shove busybox into the kernel tree05:28
olofkDamn, I thought I had written down this stuff :705:28
olofk:/05:28
shorneI pushed one kernel patch here to my tree for the openrisc.io updates and readmes etc.05:29
shornehttps://github.com/stffrdhrn/linux/commit/7c4d6d98f1dd6abe3fe6dad58869d21d423cc1ce05:29
shorneyeah, it would be nice if our tree didnt have so much stuff marked (not for upstream)05:29
olofkah yes. Thanks. I've been trying for some time to hunt down the last references to openrisc.net05:29
shorneI can make a pull request to stekern05:30
olofkat least I got a script for rebuilding busybox05:30
shorneAlso I have my strcpy there.  But its currently in RFC state. Its a 1.5 second boot time saver which is good05:30
olofkWhat? 1.5s just by improving strcpy?05:31
olofkOr did you mean memcpy?05:31
shorneolofk: thats what it loks like. sorry memcpy...05:31
olofk(kind of the same I guess) :)05:31
shorneits in string.h (so I just typed the wrong thing)05:31
shornewell, not in string.h, but some parts of the patch are there05:32
olofkWould be great to get that upstreamed as well. memcpy will probably improve things during runtime as well05:32
olofknot only at boot05:32
shorneyeah, I want to get them both upstreamed05:33
shornestekern has some more important stuff as well though so waiting on that05:33
_franck__shorne: wallento : https://github.com/fjullien/or1ksim/commit/61abfa177cee3f420fd9a44b551b0e2c6231a91a05:51
_franck__^ you can put your Linux image in a CFI flash05:51
_franck__olofk: I use this: https://github.com/fjullien/build_rootfs all the time for my initramfs. I needs some cleanup but it is very simple and lightweight05:52
wallentothanks, _franck__!05:54
shorne_franck__: cool, just as I thought05:54
wallentois there a path that allows me to have one elf/binary blob with barebox and Linux packed in05:55
_franck__I don't think so05:55
_franck__but I haven't looked at barebox since a long time. You should ask #barebox05:56
_franck__wallento: are you going to use or1ksim or real hardware ?05:56
wallentoboth05:56
wallentothanks, I will ask them after I have a clear picture of it05:57
_franck__for hardware, if you don't have ethernet you can use serial protocol like kermit. Never used it myself05:57
wallentoyeah, thats why I am asking. Just pre-loading the RAM seems so much easier :)05:57
_franck__but yes, that would be great to link an cramfs (because it is supported in barebox) to the barebox binary05:58
olofkI tried to implement both a zmodem and a ihex boot loader in assembler06:00
olofkThat would be really handy to have06:00
_franck__olofk: once you have romcc running that wil be easy :)06:01
olofkBut I finished the uimage loader at least, so that we can load files that are packed with the u-boot image format06:01
olofk_franck_: Haha. Yes. Unfortunately, not a single student seems interested06:01
wallentoshorne: I will build Linux from your repo for the moment, right?06:02
shornewallento: officially it would be stekern but you can try mine :)06:11
shorneits running fine for me06:11
wallentoI get memcpy undefined :)06:12
shorneoh really? can you do "grep OPT_LIB .config"06:13
wallentoCONFIG_OPT_LIB_FUNCTION=y06:13
wallentoCONFIG_OPT_LIB_WORD_NONALIGNED=y06:13
wallento# CONFIG_OPT_LIB_WORD_UNROLL is not set06:13
wallento# CONFIG_OPT_LIB_WORD is not set06:13
wallento# CONFIG_OPT_LIB_BYTE_UNROLL is not set06:13
wallento# CONFIG_OPT_LIB_BYTE is not set06:13
shorneyeah, thats correct06:13
wallentoI will clean and retry06:14
wallentomaybe I had something in there from a previous build06:14
shornehmm, it should be rebuilt if anything was there before06:14
wallentoyep, the problem still exists06:17
wallentoERROR: "memcpy" [crypto/sha256_generic.ko] undefined!06:17
wallentoERROR: "memcpy" [crypto/jitterentropy_rng.ko] undefined!06:17
wallentoERROR: "memcpy" [crypto/hmac.ko] undefined!06:17
wallentoERROR: "memcpy" [crypto/echainiv.ko] undefined!06:17
wallentoERROR: "memcpy" [crypto/drbg.ko] undefined!06:17
wallentoscripts/Makefile.modpost:91: recipe for target '__modpost' failed06:17
wallentobut vmlinux is built :)06:18
wallentoit during "Building modules, stage 2."06:18
shorneok, maybe I do need to export it06:19
shorneI disabled modules06:19
shornelet me put a patch for that :)06:19
wallentogreat, thanks06:19
wallentoit boots, great06:24
wallentoI will push many updates to the tutorials06:25
wallentoIt unpacks now with a bootstrap-quick-start.sh06:25
wallentothat downloads prebuilts of the toolchain, or1ksim, fusesoc and openocd06:25
shornewallento: I pushed an update06:25
wallentothanks, I will test06:25
wallentoworks!06:27
wallentoI am really proud of the openrisc community. I feel like the first time I just pull stuff, build it and everything works06:28
shornewallento: you are doing a big part. :)06:31
wallentothats just a snapshot :)06:31
wallentobut it is really great that it is "just" a community of hobbyists and yet we get a lot of cool stuff going06:32
olofkwallento: Yeah, we have really cleaned up our stuff since a few years ago :)06:36
wallentoon next ORCONF we should have a slide that compares irc logs from a few years back and today, starting with "I am new and I want to run Linux"06:38
olofkhaha06:39
wallentoolofk: https://rawgit.com/myriadrf/STREAM/master/stream_openrisc_soc/doc/linux.html07:54
wallentothis is how you can view html in a repository as website07:54
wallentojust replace github.com in the URL with rawgit.com07:54
wallentoI switched the theme of openrisc.io08:13
wallentothis one is responsive, meaning you can also use it on a smartphone ;)08:14
wallentofrom the design I did not like any of the both we had now, but they are shipped with jekyll-bootstrap..08:15
wallentoso, here we are: https://github.com/openrisc/tutorials/releases/download/2016.1/openrisc-tutorials.tgz09:10
wallentopeople can download this and follow the quick start instructions: https://github.com/openrisc/tutorials/blob/master/README.md09:11
olofkwallento: Cool. Great work09:11
wallentofrom download to Linux on or1ksim and de0 nano in less than five minutes09:11
wallento:)09:11
wallentothanks, olofk09:11
olofkI'll try to do it in four minutes :)09:11
wallentohehe09:12
wallentothe prebuilt stuff is kinda lame, but I think it makes it really easy09:12
wallentoand we can bundle it with each release09:12
olofkI like the new openrisc.io theme, but it's on the border of being too dark09:12
wallentoso it is reproducable09:12
wallentoyep, I would also like it lighter09:12
wallentochanging colors is easy09:12
olofkprebuild is excellent. That way you can have known good checkpoints09:13
wallentohttps://github.com/openrisc/openrisc.github.io/blob/master/assets/themes/hooligan/css/style.css09:14
wallentoyes, I moved a lot of stuff to Github releases now09:14
wallentoolofk: the verilator feedback is good, not much to change actually09:16
robtaylorwallento: nice work :)09:18
wallentothanks, rob09:28
olofkwallento: Yeah, it looked like he had mostly style complaints09:47
olofkregarding verilator09:47
olofkI'm almost done with the icestorm backend now too. Just need to find out how to send in top-level parameters there too :)09:48
wallentohehe, you cannot trick me into another patch :)09:49
olofkhaha09:49
olofkNo worries. Clifford is very responsive09:49
olofkwallento: Still got access to questasim, or any modelsim version running on 64-bit?10:23
wallentoyeah10:23
wallentoat university, still have remote10:23
olofkThe free version that Altera supplies only support 32-bit, and there is a bug with the VPI handling10:23
olofkI remember that you had to remove some arguments when you used 64-bit modelsim10:24
olofkI would like to check if my fix works10:24
wallentookay, please send me a mail with the instructions10:25
olofkcool. I'll do that later today.10:25
andrzejrolofk, you mean it is possible to make Modelsim work on 64 bit Linux?10:32
andrzejrwhat about Icarus Verilog? Does Altera (Cyclone IV, at least) uses any encrypted components?10:33
andrzejrLooking at the activity in DE0 Nano development it makes sense to me to dump Xilinx and move to a better supported platform. Especially that 7-series FPGAs are an overkill for my application.10:35
olofkandrzejr: No encrypted ip for the de0 nano10:37
olofkThe only altera IP we use at all is a generated wrapper for the pll, but that is just plain verilog10:38
olofkAnd we `ifdef away the pll when we run icarus10:38
andrzejrwhat about Modelsim? Occasionally I may need to mix in some VHDL modules (although that was usually needed for Xilinx IPs).10:39
andrzejrDE0 Nano is no longer that cheap when you want to get it in your hands. Anyone with spare ones?10:42
olofkandrzejr: Altera supplies a free 32-bit modelsim that actually supports mixed-language nowadays10:45
olofkAnd they have the same strange thing as Xilinx where you can have an IP where all files except for one is in verilog :)10:45
_franck__andrzejr: I can lend you a Neek board if you want. But it is Cyclone III on it. That means Quartus =< 13.110:48
olofkandrzejr: Actually, you could borrow my ordb2a board. Haven't powered that up in a while10:49
olofkhttp://opencores.org/or1k/Ordb2a-ep4ce2210:50
* _franck__ see how much openrisc people want contributors :)10:50
olofk:)10:50
olofkmithro tries to find users for th numato opsis, and I got an Icoboard in the mail some weeks ago10:52
olofkSo I don't think it's only an OpenRISC thing :)10:52
olofkandrzejr: You could also borrow my Stream board, come to think o fit10:52
olofkhttps://github.com/myriadrf/STREAM10:53
mithroHello, hello10:55
andrzejrThank you guys. :-) DE0 Nano became sort of a reference platform for orpsoc, which is tested and kept up to date. In my experience bringing up a new board, solving tooling issues and maintaining it was simply to much work for a newcomer.11:00
andrzejrSo I want to take step back an *use* orpsoc, contribute fixes, peripherals etc.11:01
olofkandrzejr: Yeah, you've done a great amount of fixes to fusesoc itself. Thanks and sorry about that :)11:03
olofkBoth Stream and Neek already have FuseSoC ports. I never finished the one for ordb2a however11:04
olofkIt's funny, because ordb2a was supposed to be the first board with a FuseSoC port11:04
wallentoI definitely want to establish the nexys 4 board as an openrisc reference board too11:05
olofkBut as you say, the de0 nano turned out to be a reference platform. Talk to jeremybennett and see if he has any boards11:06
olofkwallento: Yes, it would be nice to have a cheap Xilinx board too11:06
andrzejrwallento, the ddr2 version?11:06
olofkMany people have used the Atlys port11:06
olofkAnd the Arty might be quite popular too11:06
wallentothe nexys 4 ddr11:07
wallentoits also a reference board for lowRISC11:07
wallentoand will become for OpTiMSoC11:07
andrzejryay! that would be great.11:07
wallentoboth the latter have the KC705 and Nexys4 DDR as reference board11:07
wallentoI don't like the DE0 nano because of the lack of an available UART :)11:08
andrzejrbtw, what lowRISC uses as a memory controller? The AXI4 slave IP?11:08
olofkwallento: Yeah, ordb2a is pretty similar to de0 nano, but with built-in UART, ethernet and usb. It's a shame that ORSoC didn't produce more of them11:10
wallentoI really like the Pmods11:10
olofkBecause I agree. It's annoying to have to use an extra UART adapter11:10
wallentothere are also altera boards with it, right?11:10
andrzejrolofk, is STREAM board publicly available?11:10
olofkandrzejr: Good question. I didn't know actually11:11
olofkThey were supposed to. Not sure what happpened11:11
olofkDidn't someone ( _franck__ ? ) experiment with tunneling UART over JTAG with adv_debug_sys and openocd11:12
olofkThat would make the de0 nano nicer to use11:12
wallentoyeah, it should be straight forward11:13
wallentoI also have one in Open SoC Debug11:13
wallentoUART device emulator11:13
wallentoWill create some fusesoc demo systems with this one too11:13
andrzejrThings I don't like about Nexys4DDR: DDR2 controller and its encrypted SERDES IPs, proprietary JTAG (fixed), RMII LAN interface, some minor annoyances like QSPI for flash download, single (emulated) PS2 port.11:14
andrzejrArty at least uses regular MII ethernet i/f. Plus it's cheaper so it may be better suited for a reference platform.11:15
wallentoyes11:18
wallentoit is also cheaper11:18
wallentodamn, need to buy another board :)11:18
wallentoI also have a STREAM11:18
wallentoI think they are not available still11:18
wallentothe arty seems to have arduino headers, right?11:19
andrzejrwallento, well, you can start with Nexys :-) Disabling some stuff for Arty port should be easy.11:20
wallentoyeah, I will keep both11:20
wallentothe arty is pretty small11:21
wallentonexys has the largest artix11:21
wallentobut it should be easy to maintain both11:22
olofkwallento: Oh, I didn't know. You got rev1 or rev2?11:22
olofkof stream11:22
wallentov2 r111:22
wallentowe got a donation for our GSM work11:23
andrzejrHas anyone tried to talk to Digilent or Terasic about sponsoring the project? It would be great if we could get a pool of free boards or a discount.11:23
wallentobut never really got it going11:23
wallentono, we haven't11:23
olofkcool. I only have v1, and couldn't test the DVI output for v2, so I never pushed support for that11:23
wallentoits probably something we should try once we have a reference11:24
olofkandrzejr: I think that's a good idea. For myself, I have the opposite problem with too many boards right now :)11:24
wallentohehe11:24
olofkBut wallento had an idea of having a pool of boards for contributors. That would be really cool11:24
wallentoyes, we had this idea where people could request and donate boards to people11:25
andrzejrLooks like Digilent has an ambition of making Arty a "reference platform for Artix7", at least for some other applications.11:25
wallentolike "I would port the SPI controller to the new Xilinx Ultrascale board if anyone donated me one" :)11:25
wallentoas I am ordering already, I of course should add Pmod :)11:27
andrzejr:-)11:28
wallentoI am going for the OLED11:29
olofkThe icoboard is pretty cool actually. Hooks into a raspberry pi, and you can run the whole toolchain on the pi11:30
wallentoyeah, also cool11:30
olofkGot 4 pmod connectors and some other stuff too11:30
wallentobut the ICE40 are pretty small11:30
olofkyeah11:30
olofkPlan is to port a minimal or1k-based soc for it, even though I guess people will mostly be running riscv11:31
wallentoyeah, sounds like a good plan11:31
olofkSo far I haven't got it to route yet. Too big :)11:31
wallentoso, arty and oled pmod on the way11:37
_franck__olofk: wallento :UART over JTAG is present in openocd and is working. However, there was problem with Linux. It seems to be related to IRQs11:43
wallentookay, cool11:44
wallentoI will add this in the de0 nano then11:44
_franck__https://github.com/fjullien/orpsoc-cores/blob/de1_jsp/systems/de1/rtl/verilog/orpsoc_top.v#L39911:45
olofkdamn. Clifford is fast. Top-level parameters are fixed in yosys now :)11:45
olofk_franck_: Ah yes. Now I remember11:45
olofkIt looked like it worked while it was in polling mode11:45
olofkIt might be a bit tricky to debug. Best way would probably be to see if this can be reproduced with a small bare-metal program. Then we can simulate the whole thing, including JTAG11:47
olofkBooting linux in icarus with jtag_vpi is not something I would recommend :)11:48
olofksignaltap/chipscope would probably help too11:48
_franck__you can debug under verilator11:48
olofk_franck_: Ah cool. Didn't think of that.11:49
andrzejrwallento, interesting, lowrisc uses a ddr2 controller with AXI4 i/f generated with MIG from Vivado (not ISE). The options are somewhat different from mine but that doesn't seem critical. More likely some bugs were fixed in later MIG releases.16:58
andrzejrPlus having a tested AXI4 wrapper is handy. My WB bridge was causing problems even got rid of all performance enhancements.17:00
--- Log closed Tue Mar 22 00:00:46 2016

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