IRC logs for #openrisc Friday, 2014-04-11

--- Log opened Fri Apr 11 00:00:00 2014
LimbI can get openocd to connect if i hold the reset button down00:18
Limbwonder if its a driven high button -_-00:18
julzmb_Are there any services where a user pays for ssh access and the server has comercial EDA tools on it?02:04
julzmb_I am mainly looking for VCS access02:05
Findetonwow I finally got it working05:27
FindetonI'll upload the changes that I had to do so that no one needs to do it again05:27
stekernto the old toolchain?05:29
stekernfor the textinfo problem?05:31
olofk_julzmb_: You could see if plunify has VCS06:21
olofk_Limb: I'm writing wb_ram to replace ram_wb. They should be functionally equivalent, but the new one should be more modular06:40
olofk_Has anyone investigated using crosstool-ng for toolchain building?07:56
stekernhmm, looking at the mor1kx code, the using the F flag actually makes a lot more sense I think...08:29
stekernwith the branch prediction, all scary paths are already gone08:30
stekerns/the using/using08:30
stekernso, I most probably struggled with the or1ksim generator all in vain :(08:31
stekernolofk_: is there only a github provider? can't I use a arbitrary git repo?08:39
olofk_stekern: Nope08:40
olofk_I have been thinking all the time that I should make githubprovider a subclass of gitprovider, but so far no one has had any need for a non-github git repo08:41
olofk_And githubprovider doesn't even use git anymore IIRC :)08:41
olofk_But a gitprovider is most welcome08:42
olofk_Preferably, I would like the providers to use the section infrastructure as well, but it's no strict requirement08:43
stekernfair enough =)08:43
stekernhow does command line completion work in bash?10:55
stekernor how does it work in general10:55
stekernit'd be nice to be able to: fusesoc build de0<tab><enter>10:56
stekernah! ls /etc/bash_completion.d/10:58
olofk_stekern: I think it's a set of files under /etc/bash-completion that contains functions top return whole words from fragments10:58
olofk_You already found it10:59
stekernmy friend Mr Google is quicker than you ;)10:59
stekernolofk_: did you hint the moxie guy abut fusesoc or was it just a coincident that he came complaining about missing README files? ;)11:08
olofk_stekern: What? Haven't seen that11:09
olofk_That was fun :)11:13
stekernI've added nop-reporting support in the mor1kx-generic verilator tb now12:01
stekernand changed the 'exit(0/error)' message to look like or1ksims12:02
stekernoh, and mor1kx now passes the or1ksim atomic tests I modified yesterday to use the F flag instead12:05
olofk_awesome x 3 :)12:07
* stekern nods12:08
stekernhmm... making the verilator testbench return the error code of the program doesn't fly well with fusesoc13:07
kyrre_Hi, Im struggeling to understand how the sprs array works in or1ksim, from what i can see it is an array of size 32. But when i print it in gdb its 2¹⁶ (65536) large.13:11
olofk_kyrre_: The sprs are stored in the cloud13:13
kyrre_say what?13:13
olofk_When you access an spr in mor1kx, it connect to Amazon and starts up a new Virtual Machine that serves the contents of the SPR13:14
olofk_It's all written with responsive web technologies so it's very fast13:14
olofk_Sorry. Never mind me :)13:15
kyrre_good, cause i was just getting more confused :p13:16
olofk_I think that or1k defines the SPR space to be 2^16, but only a small part of that is actually used13:16
stekernare you sure that you are not looking at the gpr array?13:19
stekernthere are definetely more than 32 sprs in or1ksim13:20
kyrre_ye, ive spent the last hour or so looking into this... the "solution" is to read things correctly MAX_GRPS != MAX_SPRS13:22
kyrre_so ye, thngs make sence now ;)13:22
kyrre_more sense *13:22
stekernsurprisingly compact the changes to mor1kx:
stekernmost are just signal declarations and interconnect13:41
stekernI'm speaking about the new onedrive interface for the sprs here13:44
stekernit'll be a part of mor1kx ms-edition, released in ms-pl13:46
stekernmost of it will be autogenerated from excel scripts13:47
stekernall per olofk_'s requests13:49
Limbmor1kx reset should be high when you want to reset, correct?13:51
olofk_stekern: That's the spirit :)13:52
stekernLimb: yup14:04
Limbstekern: wish i had known that... was the cause of my debugger issue -_-14:04
stekernLimb: you can comfort yourself that you're probably long behind my wasted hours on reset polarity mistakes14:12
_franck_web_Limb: great ! so it is confirmed that openocd works with xilinx bscan14:13
stekernthat's very good14:13
Limb_franck_web_: well I havent gotten anything to show on the processor yet, so I don't know if I'd say that just yet :P14:14
Limb_franck_web_: but it looks like a hopeful yes!14:14
Limbopenocd mwb doesnt seem to be turning on my leds :(14:17
LimbHad to increment the address by 114:18
Limbwe have lift off!14:18
_franck_web_gpio base is its direction register14:18
_franck_web_base+1 is output value14:19
LimbThis is the most exciting day so far in my journey haha14:19
_franck_web_:) This is good feeling14:19
_franck_web_nothing better than a lighting led :)14:20
Limb_franck_web_: if im uploading your blink elf, should i set the start adress to 0x0 or 0x10014:22
_franck_web_start at 0x10014:23
LimbI'm gonna have to cherrypick that elf patch you have for openocd -_-14:24
_franck_web_yes. Or you can link my program and use a simple linker script14:24
_franck_web_then the elf file will have a program section14:25
_franck_web_(didn't know that)14:25
Limbcan you pastebin a example of a simple linker script? :)14:25
Limbcare to explain a bit more in depth? haha14:27
Limbmy build tools are or32-linux- is this even the right tool chain?14:27
_franck_web_for this simple kind of program yes14:28
_franck_web_this script will put your .text section at adress 0x10014:28
_franck_web_then .data after that then .bss after that14:29
LimbThat part I can understand. I meant more of how do i link it with the rest?14:29
Limbmy command line compile skills... have never been that great14:29
_franck_web_or1k-elf-gcc -c test.o14:29
Limbor32-linux-gcc is the same?14:30
_franck_web_or1k-elf-ld -o test.elf test.o -T $your_linker_script14:30
_franck_web_or32-elf-gcc is for baremetal applications14:30
_franck_web_or32-linux-gcc is for linux applications14:30
Limbah. so i need to get the baremetal toolchain14:31
Limball i have is linux14:31
_franck_web_that will work anyway here14:31
ysionneaujeremybennett: hi :) I think you might now a bit about the ARC cpu architecture, am I right ? :) What would be the "killer feature" or interesting advantages of this CPU ? (or can you point me to a document which explains a bit what are the good points ?) thanks :)14:48
olofkLimb: Congratulations. Good job!15:59
olofkIt will be a race between your nexys4, stekern's atlys and my lx9_microboard for which will become the first Xilinx-system in orpsoc-cores :)16:22
Findetonolofk:  so how fast is your openrisc fpga?16:30
Findetondo you think your xilinx system might have hardware-based backdoors for the NSA?16:31
Limbblink asm doesnt seem to work :(16:43
Limbmwb 0x9000001 25516:45
Limboh hey, this isnt the terminal :P16:45
FindetonI have a problem with texinfo while compiling the toolchain16:52
Findetonbasically, I have somethink like @code{16:52
Findetonblah blah16:52
Findetonbut it doesn't work, it says that the first line has a closing brace missing and that the last line has a opening brace missing16:53
Findetondo I need to do something special to put a multiple lines thing between braces?16:53
Limb... and somehow i reupload the same bitfile and now nothing works16:57
Limbdoesnt appear openocd is loading the memory with the program17:16
stekernFindeton: do you have a particular need to use th or32 toolchain?17:35
olofkLimb: What are you using for memory in your system?17:36
Findetonuhm stekern no but I'd like to17:36
olofkFindeton: I'm running the lx9 at 40MHz right now. Might be able to crank it up a little bit more17:37
olofkAnd no, I don't think there are any NSA back doors in the FPGAs. It would be a fucking pain to extract any kind of information that way17:38
stekernjust that it seems like a path with less resistance to use the or1k toolchain that doesn't have the problem, but if you like the problem solving, it's all fine17:38
Findetonstekern which toolchain doesn't have the problem?17:55
FindetonI am confused, I believe I am dealing with the or1k- toolchain18:04
Findetonam I wrong? lol18:04
Findetonalso, what is the difference? or1k is the new one and or32 is outdated18:06
FindetonIn practice this means that the stable toolchain uses the old CPU target or32 (e.g. or32-elf, or32-linux), while the new/developemnt toolchain uses or1k (eg. or1k-elf, or1k-linux)18:07
stekernyes, the old toolchain has the or32 prefix and the new uses or1k as the prefix18:09
Findetonand stekern, is the new or1ksim called or32-elf-sim?18:13
Findetonor that means I have the old thing?18:13
stekernthe prefix before sim only exists if you compile it together with a toolchain, otherwise it's just sim18:15
stekerni.e. or32-elf-sim, or32-linux-sim, or1k-elf-sim, or1k-linux-sim etc can all be the exact same executable18:16
stekernif you want the full history, the or32- toolchain was brought to a stable state (passing the gcc regression tests) by jeremybennett's company, embecosm.18:20
stekernthere was a defiency in the binutils of that port however, it was originally based on cgen, but then the machine generated files had been modified by hand (afair).18:21
stekernjuliusb then took the cgen based things and fixed things up, and at the same time he changed the name from or32- to or1k-, because the or32- had been a mistake18:23
stekernpeter gavin then picked that up and updated gcc to the or1k- naming and synced with upstream18:23
stekernthen I added dynamic linking and blueCmd TLS support, _franck_ brought gdb up to date etc etc18:24
Findetonthere's a history there that's for sure18:27
Limbolofk: your wb_ram18:28
Findetonout of curiosity, what's that attracts you to openrisc stekern18:28
stekernthe groupies18:30
stekernthere's a lot of fun problems to be solved, and in a lot of fun areas18:31
stekernand I'm a kind of learn by doing kind of guy, so I have to do a lot to learn anything18:31
olofkLimb: So.. it works then? That's cool18:33
olofkFindeton: As stekern said, we're only doing this to get laid18:33
stekernyes, and since that haven't happened yet, we just try harder18:34
Findetonstekern: yeah, like rockstarts18:34
Limbolofk: it doesnt work :P18:35
Findetonit is for the pussy (or whatever thing you fancy)18:35
Limbopenocd doesnt seem to write to the actual memory18:35
Findetonok the first set of tools has compiled (newlib/or1k), that's great!18:36
olofkLimb: rap :(18:36
olofkcrap :)18:36
stekernolofk: no, not like rapstars, rockstars18:36
Limbolofk: do you have a new copy you can send me to try?18:37
FindetonI'd like to have a working laptop with free hardware, openrisc might be able to achieve that18:37
Findetonwith some good fpgas and multiple openrisc cores lol18:38
olofkLimb: I just started looking into it. Don't have anything newer yet18:38
FindetonPerhaps with that I could get a decent 300Mhz laptop18:38
olofkBut I'm running my lx9 through simulations to get an idea what's going on18:39
AndroUserHi! Is here anybody who worked with or32-linux-gcc crosscompiler for orsoc system?18:45
stekernAndroUser: there might be18:49
AndroUserOh and who?:)18:54
stekernhmm, is it a known issue that there are 10 tests failing in the or1ksim or1k-master branch?18:55
stekernAndroUser: depends on what you mean with worked with, but if you mean used: stekern olofk juliusb jeremybennett _franck_ Limb LoneTech blueCmd poke53281 and probably many more18:57
olofkAndroUser: What kind of info are you looking for?18:58
AndroUserWell my problem is that i succeeded to compile the linux kernel for the orsoc but i want a simple program that reads and writes a physical address,a register.18:59
AndroUserI found an example program but it includes headers that the compiler dont find,even if i add the path.19:00
AndroUserSo probably i  doing something wrong19:00
AndroUserI am really new to this crsscomliping thing19:00
olofkAndroUser: Just to avoid confusion in the future, ORSoC is the company that owns OpenCores, ORPSoC is a SoC comprised of or1200 and a few peripheral cores19:01
olofkAndroUser: Just trying to fully understand what you're after :)19:02
olofkYou have compiled the linux kernel for OpenRISC, right?19:02
olofkSo your compiler works fine then I guess19:05
stekernAndroUser: can you paste the program that you are trying to compile19:05
AndroUserActully i have downloaded a virtualbox image that have the toolchain working19:06
olofkAh ok.19:06
AndroUserWell i cant now cause i am on mobile but i can write the includes that cause the problem19:06
AndroUserWait i rty to find the program19:07
Limbolofk: did you see my request for an updated wb_ram? :)19:08
olofkLimb: Yes. Ain't got anything better than what you got19:10
olofkYou could try ram_wb instead19:10
AndroUserWell i cant find the program.but i write what i want to eventually do.i made a simple peripheral that contains about 3 registers.i want to compile a program that is reading and writing the registers.and run this program on linux kernel that is running on this orpsoc  system.i hope it is understandable:s19:16
AndroUserCan u maybe show me a short code that can do this?19:17
olofkRead register => value = *addr;19:18
olofkWrite register => *addr = value;19:18
AndroUserOr maybe can somby give me some contact for skype or thing like that? Maybe its easier to describe the situation there:s19:19
olofkHaven't got time for that. Sorry19:20
AndroUserTheese are working functions? What header do i need for that?19:20
olofkNo. It's just plain C19:20
AndroUserNo problem,just tell me what headers do i need for this kind of operations19:21
AndroUserOh thats not working on linux kernel if i am right19:21
olofkAh yes. Things are probably more complicated under linux19:22 standard c i could write driver and it was working fine19:23
stekernAndroUser: normally, when you access hardware in linux, you write a device driver for your hardware. My guess that the example you've found is an example of that. But, if you're going to do that, make your device driver reside in the Linux tree instead.19:23
AndroUserYes it  was an example like that.19:24
AndroUserBut i cant compile it because of the headers19:24
stekernif you want to access 'memory' from userspace, you can mmap it19:25
stekernas an example
AndroUserAnd what header contains the mmap function?19:26
stekernbut if you want a driver for your device, why not just do it inside the kernel tree19:27
AndroUserWellaybe this is noobish from me so sry for it but i dont understand what that means:s19:28
AndroUserAnyways i want the most simpliest way for now,and i thought it would be a simple program that switches a bit or somethinf like that19:30
stekernbut it's not a "program", it's a kernel driver that you are trying to do, something that will be closely tied to the kernel19:31
stekerna simple program would be "Hello world!"19:32
AndroUserWell than how would u write and compile this program/driver?19:33
stekernwhat is it that your hardware does?19:33
AndroUserWell at the end it ll be a test enviroent but for now nothing just a register that can be written and read19:36
olofkWouldn't the gpio driver be a good example19:41
stekernI'd find a good place for it in the Linux tree and put it there19:41
Limbwith ram_wb what exactly are wbm0, wmb1 and wbm219:41
olofkLimb: Three different wishbone ports19:43
Limbolofk: what do they need to be connected to? withh data and instruction bus be fine?19:44
Limbwith = will*19:44
olofkLimb: oh. sorry. Forgot to say. You don't have to use ram_wb.v. You can use ram_wb_b3.v directly instead19:46
olofkThat is only a single port19:46
Limbah. i thought b3 was for simulation?19:46
olofkThe problem I had was that it wouldn't map to Block RAM, so I started to reimplement it with wb_ram19:47
stekernAndroUser: if you really want to build your module outside of the kernel tree, use a Makefile that looks something like this:
Findetonstekern: do you prefer the newlib or the uclibc toolchain?20:03
stekernI prefer the newlib toolchain over the uclibc toolchain when I compile baremetal and the uclibc toolchain over the newlib toolchain when I compile Linux userspace programs20:06
Findetonuh and why is that?20:15
stekernbecause they have those two different purposes20:16
Findetonso for example20:17
Limbolofk: you werent kidding... ram_wb is utilizing 83% of my slices20:18
Findetonif I want to run/develop linux programs on the or1ksim it's better to use uclibc20:18
stekernright, you can't use the or1k/or32-elf- toolchain for that20:19
Findetonuhm I don't understand that20:19
Findetonwhat's the toolchain actually used then for?20:19
stekernto compile baremetal programs, as I said20:22
Findetonah, you mean the newlib ok20:22
stekernyes, or1k/or32-elf- == newlib20:23
Findetonso for example if I want to create a baremetal assembler, I'd use newlib20:23
Findetonnow I'm trying to build gcc with newlib (it's the last step) but it gives me an error:20:25
Findetonchecking for the value of EOF... configure: error: computing EOF failed20:26
Findetonit's while compiling libstdc++20:26
stekernwhich toolchain are you now building, or32 or or1k?20:27
stekernand can you post the config.log20:27
Findeton1 seg20:31
LimbWhat I would give for multicore ISE. Been in PAR phase for half an hour :(20:36
stekernFindeton: the fail isn't in there20:40
Findetonstekern: oh, I'll put the console output too one sec20:41
stekernwas that the config.log from the libstdc++ directory?20:42
Findetonuhm no20:46
Findetonit's not that lol20:47
Findetonwhile I get to it, this is the console output20:47
Findetonshit I do not see the config.log on libstdc++ directory20:52
stekernmaybe there aren't one20:53
Findetonopenrisc@openrisc-VirtualBox:~/openrisc/or1k-gcc/libstdc++-v3$ ls | grep config20:54
Findetonconfig configure crossconfig.m420:55
Findetonbasically there isn't20:55
FindetonI think it's this21:14
FindetonI'll try if  that solution works21:14
Limbwell i got it to upload, and openocd verifies the memory21:46
Limbbut when i resume... nothing blinks :(21:46
_franck_did you do a: reg npc 0x100 before resume ?21:49
Limbno change21:50
_franck_do "halt" and "reg npc"21:51
Limbnpc (/32): 0x0000070821:51
_franck_0x700: Illegal insn exception21:51
_franck_do a mdw 0x10021:52
Limb0x00000100: 7f454c4621:52
_franck_I don't have the code in front of my eye but looks bad21:53
_franck_should be 0x1860910021:54
Limbmaybe i executed something wrong21:54
_franck_look this is your led blinker with instruction code:
Limbmy numbers are +100 to yours21:57
_franck_ah I know !21:57
_franck_remove . 0x100 from the linker script21:57
_franck_(or org 0x100 from the led_blinker.S)21:58
_franck_do the second one21:58
_franck_remove org 0x100 from the led_blinker.S21:58
LimbI figured it had something to do with that :)21:58
LimbWe have blinking lights!22:04
_franck_congrats !! :)22:05
Limbtook a week to get it working, but its working :)22:06
Limbolofk: on your latest wb_ram you had posted I get the following error trying to synthesize ERROR:HDLCompiler:1654 - "/home/limb/Documents/fusesoc-builds/build/nexys4/src/wb_ram/rtl/verilog/wb_ram.v" Line 33: Instantiating <wb_next_adr0> from unknown module <wb_next_adr>22:07
Limbolofk:  adding wb_funcs.v to the core includes results in an error stating it cant find wb_bfm_params.v22:14
blueCmdstekern: Pretty sure he wanted this "module.h":
blueCmdstekern: so yes, your assumption about it being a kernel module seems valid22:31
Limbolofk: And it appears your original code you had zipped up does not work either :/ openocd fails at verification of the memory22:37
Limbolofk: it appears nothing it being written to ram22:37
--- Log closed Sat Apr 12 00:00:01 2014

Generated by 2.15.2 by Marius Gedminas - find it at!