IRC logs for #openrisc Thursday, 2016-09-01

--- Log opened Thu Sep 01 00:00:51 2016
-!- Netsplit *.net <-> *.split quits: fotis2, simoncook04:58
-!- Netsplit over, joins: simoncook, fotis205:03
olofkHas anyone seen this? http://opencores.org/forum,OpenRISC,0,5746,0#147241647809:50
olofkIt's about mor1kx crashing on a simple program with floating point09:51
wallentocrashing=floating point exception, right?09:56
wallentoseems someone should have a look at the vcd09:57
olofkI'm trying to reproduce it10:07
olofkBut I don't get any fp instructions even if I compile with -mhard-float10:07
olofkAnd I guess that should -fsingle-precision-constant, not -lsingle-precision-constant10:08
olofkAh.. sorry. I did get fp instructions10:13
olofkwallento: I can reproduce it now too10:24
olofkWe could just add code to gcc that detects if someone wants to add 3.2 to a number and convert that to +1.0 + 2.2 :)10:25
wallentoor make an errata: "never add 3.2 to 3.2" ;)10:25
olofkWhere do I even begin to look for this exception signal?10:27
wallentoin the control10:28
wallentothere will be a floating exception signal, but this is what we know already10:28
wallentoI think we have to go into the FPU for that10:28
wallentowhat can be FPU exceptions?10:28
wallentocan you share the vcd?10:29
wallentoat mega or so ;)10:29
olofkhttps://www.dropbox.com/s/ggwbmebgi4zu0dk/mega_illegal_warez.vcd?dl=010:35
wallentookay, gtg11:14
wallentohi ontoshko, its your request on the forum, right?11:14
wallentoolofk: I can see that there is the fpcsr that differs between the first two and the third op11:21
wallentoits 100 instead of 00011:21
wallentoso without even knowing how this part works, I would trace the origin of this11:21
wallento:)11:21
ontoshkoyes11:26
ontoshkowallento, yes11:26
wallentogreat, olofk was able to reproduce the error and I had a look into the VCD11:26
wallentoI have to leave soon, but will have a more detailed look tomorrow. never touched this part, but I hope to learn something new ;)11:27
ontoshkowallento, I have sample where fpcsr=0x80(ZF) leads to fall11:37
SMDhome1olofk: hi, could you remind me how to turn on tracing for fusesoc?14:39
SMDhome1huh, I see it, thanks14:39
olofkwallento: Yeah. I saw that too.15:42
olofkLooking at the spec, bit 0 means that the FP exception is enabled15:43
olofkbit 8 means that the result was inexact. Don't think this should be a reason to cause an exception though15:43
olofkSo the culprit is the fpu_allf signal. God knows what that one is good for though15:44
olofkok,  cpu_allf is a slice of the incoming fpcsr signal15:48
olofkSo the issue seems to be that the exception is caused by the inexact flag being set15:48
olofkI would like to know if the inexact flag is supposed to cause an exception. Looks so in the spec, but then I guess we need to either mask it in sw or take care of it in the exception handler, because most fp operations will be inexact15:51
olofkLet's wait for bandvig to return15:51
olofkaha. Looks like bandvig made an optional extension to mask these flags, which is disabled by default15:54
olofkThat's a more sane option, but it would require an update of the spec15:54
olofkYes! Setting iverilog_options = -DSIM -DOR1K_FPCSR_MASK_FLAGS15:57
olofkin mor1kx-generic.core seems to work15:57
olofkSo once again, the spec works against us :/16:00
olofkWonder how or1200 does it16:00
olofkAnd because the mask stuff is not in the spec, the only thing we can do is take care of it in the exception handler if we want to be compatible with the spec16:01
SMDhome1olofk: do you know if anyone has tried to implement orvdx64 extension?16:02
olofkSMDhome1: Pretty sure the answer is no16:04
SMDhome1olofk: Ok, I'll keep that in mind, thanks16:04
SMDhome1olofk: and what's about vectors support in toolchain?16:05
kc5tja..........................................................16:34
kc5tjaGaahhh...stupid cat.  :(16:34
ZipCPULooks like I need to start over on that DDR3 memory controller a ... what is it, fifth time?16:56
ZipCPUI got to studying what the MIG was doing, and discovered that my chip can't handle the speed I wanted the data lines running at.16:57
kc5tja:-(16:57
ZipCPUSo ... I'm now dropping the data rate down to 640 Mb/s.16:57
ZipCPUThe system clock speed is now going to drop from 200 MHz down to 80MHz.16:57
ZipCPUPerhaps I can still interface it with the rest of the system running at 160MHz ... but 200MHz would require a clock crossing FIFO, and I don't want to incur that penalty.16:58
kc5tjaIs there no way to start slow and ramp up the clock speed upon successful testing?16:58
ZipCPUYou mean ... to see if you can overclock the chip and whether or not it would work if you did so?16:59
kc5tjaYou could use it for that, I guess.  I was thinking that you could start at something like test at 10MHz, then at 20MHz, then at 40MHz, then 80MHz, then 160MHz, etc.17:00
kc5tjaThe idea being if it works at 80MHz and not 160MHz, it might still work at 120MHz.17:01
kc5tjaBasically use a binary search for the highest frequency you can drive it and have it still work.17:01
ZipCPUYeah, ... the problem is I'm stuck between two tight constraints.  The DDR3 memory controller will not work with a clock slower than 3.3ns.17:01
kc5tjaYou should be able to hone in the top clock in 8 or fewer testing cycles.17:01
ZipCPUAt least, according to spec.17:01
ZipCPUAccording to the Arty's spec, speed grade -1L, the Arty cannot handle a DDR3 clock faster than 3ns.17:02
ZipCPUThat leaves me stuck in some rather tight windows.17:02
ZipCPUEither that or I need to cross clock domains.17:02
ZipCPUSee: https://forums.xilinx.com/t5/Memory-Interfaces/Slow-DDR3-SDRAM-on-an-Arty/m-p/71965217:05
kc5tjaSo, 3.3ns translates to 303MHz.  Not seeing how you can avoid multiple clock domains.17:06
ZipCPUThere's a sweet spot near 80MHz that I might work at, if I work the controller at a 4:1 rate (4 commands per system clock)17:08
ZipCPUThen each memory command is at a clock of 320MHz, or 3.125ns.17:08
ZipCPUWhile I'd love to do this using the controller at the 2:1 rate, so I could get in a 160MHz system clock, that breaks the Artix-7 spec again.17:08
ZipCPUI will say one thing nice about Xilinx and their memory interface generator: they give you all the code.  This can be very useful if you want to understand what they did, so you can ... repeat key features from it.17:52
mor1kx[mor1kx] skristiansson closed pull request #39: Add ORFPX32 commands at monitor trace (master...master) https://github.com/openrisc/mor1kx/pull/3922:54
--- Log closed Fri Sep 02 00:00:53 2016

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