IRC logs for #openrisc Tuesday, 2016-05-17

--- Log opened Tue May 17 00:00:10 2016
SMDwrkHi. Can anyone take a look at my patch(http://pastebin.com/TgnYnzTj), give some advices and tell me how can I check if it works correctly with mor1kx?06:15
-!- shorne_ is now known as shorne06:17
shorneSMDwrk: I dont know the code base, but the patch looks ok (always good to add comments).  What is the theory of operation for this 4 state predictor?06:49
SMDwrkshorne: afaik this was used in first mips cpu, https://en.wikipedia.org/wiki/Branch_predictor#Saturating_counter06:56
SMDwrkI think it should be better than the existing one06:56
SMDwrkand it would be nice if anyone tells me about existing codestyle: tabs vs spaces and amount of them. Maybe I've seen something but unable to find07:01
SMDwrkhttp://pastebin.com/5jMz4AHR - this one's better07:15
shorneSMDwrk: tabs/spaces its always best to look at exising code, i.e. your comments on line 32-25 should be aligned07:18
SMDwrkshorne: but there's mix of tabs and spaces in existing code and that's confusing. Or is it rather problems of my text editor?07:18
shornelet me look07:19
SMDwrkThanks!07:20
shornelooks like indentation is aligned  3spaces07:25
shornetab=8 spaces07:25
shorneseems no preference to indent with strict tabs or spaces to me07:26
shorneto be safe I would use spaces07:26
SMDwrkok, thanks! I'll align everything to 3 spaces07:28
shorneSMDwrk: thanks for the link, your change makes sense. 2 thins07:32
shorne1. I would rather use case for the state evaluation, thats more normal for state machines07:32
shornebut maybe not so easy?07:33
shornealso, I guess the bnf_i and bf_i is no used07:35
shorneHave you tested this?07:36
SMDwrk>1. I would rather use case for the state evaluation, thats more normal for state machines07:39
SMDwrkOk, I can do that.07:39
SMDwrk>Have you tested this?07:39
SMDwrkNo I haven't, I don't know how, that's why I'm asking here)07:39
SMDwrk>also, I guess the bnf_i and bf_i is no used07:39
SMDwrkFSM returns result whether or not current inst is cond brn, but it gets updated if previous one was one. So I guess it should be ok07:39
SMDwrkI'm not familiar with codebase either, that's why I have so many questions07:40
stekernSMDwrk: I can take a look at your patch in the evening, but re coding style, use spaces only.07:54
stekernwe originally had the mixed tab/space thing, but as you say it's messy so we have moved away from it and all new code should be spaces only07:55
SMDwrkstekern: thanks, as it was said above, 3 spaces aligned, right?07:55
stekernyes, basically the coding style is "what verilator mode in emacs gives you"07:56
stekernsans the mixed tab/spaces07:56
wallentoIf you use emacs there is a one liner for the config to replace tabs with spaces on save07:57
wallentofor all verilog files07:57
wallentohttps://gist.github.com/wallento/1a3ff7a1809b15b3eb42b45b219897d407:58
stekernyeah, but please don't do that on existing files ;)07:58
stekernmassive whitespace patches is a pain07:59
shorneolofk: I found how to fix the return value (for cases where its saying misaligned write to 0x6).  Need to update logic in or1k_return_value. I am not sure exactly the correct way to do it though07:59
shorneoption 1. for all return values > 1word return as pointer in 1st arg08:00
stekernthis is what I have for mor1kx: http://pastie.org/1084071208:00
shorneoption 2. for all structs/unions > 1word return as pointer in 1st arg (thats whats implemented now, I added ARRAY's too) but everything I see looks like (option 1)08:01
SMDwrkwallento: I haven't got along with emacs yet, so I use geany as text editor08:06
wallentowell, then you should change the tab behavior of geany08:07
SMDwrkwallento: sure. Can you point me to a tutorial on running openrisc so I could run it and test changes somehow?08:09
shorneolofk: I have a patch getting most things to work except varargs08:17
shornedoing some testing, maybe need one fix, then Ill post08:17
robtaylormdu09:08
SMDwrkhttp://pastebin.com/WxvqfZUS patch with fixed(I hope so) alignement09:51
shorneolofk: this is my current page, most is working except the varargs https://gist.github.com/stffrdhrn/ef0a3d95c7460dd24540db7b99b4eee610:04
shornethese are the test results https://gist.github.com/stffrdhrn/6e19dcbf8cdf04b92552962c790e6bdf10:05
shorneI put tons of debug printfs because I dont feel like debugging gdb in gdb10:05
shorneinteresting tests start from https://gist.github.com/stffrdhrn/6e19dcbf8cdf04b92552962c790e6bdf#file-gdb-gnu-vector-log-L43010:12
stolarwhat is the difference beetwen or1ksim, OR1K, OR2K, OR32?13:15
olofkSMDwrk: The easiest way to run some simulations with mor1kx would be to use FuseSoC16:30
olofkHappy to help you get started16:30
olofkshorne: I also resorted to printf for the same reason :)16:32
SMDhomeolofk: are there any tutorials on orpsoc?16:47
SMDhomeI think ideal scenario for me now would be to run naked mor1kx and to be able to load and execute some binary on it to see if new branch predictor works or not16:52
SMDhomerunning whole soc could be overkill16:52
olofkSMDhome: There's a SoC intended for simulation purposes with just a RAM and a UART. It's called mor1kx-generic16:55
olofkIt also includes the mor1kx monitor, so that you can get instruction traces when running in icarus or modelsim16:56
olofkSo basically you run fusesoc sim mor1kx-generic --elf-load=/path/to/testfile.elf16:56
olofkOr you can run it in verilator with fusesoc sim mor1kx-generic --sim=verilator --elf-load /path/to/testfile.elf16:57
olofkBut I don't think you get any good traces then16:57
olofk'fusesoc sim mor1kx-generic --help' lists all options17:06
shorneolofk: any idea on this one? The args and return pointer seems to be setup correctly.  But looks like bug to me.18:28
shornehttps://gist.github.com/stffrdhrn/ed8b8a9f20a8f7d848631a241c19a113#file-openrisc-vargs-gdb-gnu_vector-asm-L40618:28
shorneThe code is returning data from the stack, big no-no in c I thought18:28
shornewell, maybe its ok, its not a pointer, it should be copied back to the caller18:31
shorneolofk: nevermind, I am in the function (debugging) and breaking before the return and the calcuated values looks bad.  The args all look correct though. Maybe something wrong with the assembly, need to go through that18:35
shorneInteresting, it looks like we should only send structs by ref if they are larger than a word.18:49
shornetrying one update18:49
shornenevermind, that doesnt work18:53
-!- Dan__ is now known as ZipCPU19:49
--- Log closed Wed May 18 00:00:11 2016

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