IRC logs for #openrisc Monday, 2017-01-09

--- Log opened Mon Jan 09 00:00:05 2017
wallentoshorne: its P901:27
wallentoand P1001:27
shornewallento: thanks, I see do you know if those are implemented anywhere?01:39
wallentoIIRC no, it was more a "if anyone wants 64bit this would be very useful" discussion01:40
shorneolofk: stekern: thanks, I will close this pull request then : https://github.com/openrisc/linux/pull/501:41
shornewallento: understood01:42
wallentoI remember that address and constant formation made a lot of sense to me01:42
wallentoI will draft something for the inter-processor communication01:43
wallentomaybe a bit more than the boot flag01:43
wallentoit will be a small set of SPRs I think01:43
shorneAlright, that would be good01:44
shorneit would be good to cover everything that is missing that has been implemented for SMP01:45
shornelike SPR_COREID01:47
shorneanyone else think this code looks wrong? https://github.com/openrisc/linux/blob/master/arch/openrisc/kernel/entry.S#L26502:11
shornel.andir6,r6,SPR_SR_DSX   // check for delay slot exception02:11
shornel.sfeqir6,0x1   // exception happened in delay slot02:11
shorneshouldn't it be l.sfgeui r6,0x1?02:13
shorneor l.sfeqi r6,SPR_SR_DSX (if thats small enough to fit in immediate)02:15
olofkZipCPU, shorne: I always assumed l was for long02:20
olofkAs in longword02:20
olofkBut that could be totally wrong of course02:23
olofkShould perhaps ask Damjan about this02:24
wbxolofk: should i give you my mailadress fo the bitstream (de0 nano)02:40
wbx?02:40
wallentoshorne: yes, I agree02:57
wallentodespite I think that l.sfne r6, r0 would be more elegant02:58
olofkwbx: Oh, right. Sorry. Forgot about that. I'll build an image now and give you a link. Ping me in 30 minutes if I haven't done it by then03:08
olofkwbx: Hmm.. we have two options for the bootloader03:09
olofk1. mor1kx will read instructions from address 0x100 when reset is released. This option requires that you have a JTAG cable that you can use to put a program into the RAM before running03:10
olofk2. mor1kx will read out an image from the SPI Flash. This option requires that you have a program stored on the SPI Flash03:10
olofkWhich do you prefer?03:10
shornewallento: right I think r0 instead of const is much better03:25
wallentoyeah, and also it is more like a set/not set comparison, than using gt03:25
wallentoI find that easier to read03:26
shorneyeah, I agree03:26
-!- LoneTech_ is now known as LoneTech04:37
olofkstekern: I'm considering to add a signal to mor1kx to indicate burst length of the transaction, to make it a bit easier to create bridges to other bus interfaces. Do you know where in the design that the burst length is known? Is that in {i,b}bus_bridge?06:47
olofkOr deeper down in the CPU?06:47
olofkok...this will take more than five minutes to figure out :)06:53
olofkRemind me to never write a CPU06:53
ZipCPU|Laptopolofk: Didn't we have this discussion?  I seem to recall we had this discussion back at ORCONF.06:57
ZipCPU|LaptopSo, basically, the only things that do bursts within a CPU are typically the caches.07:03
ZipCPU|LaptopThe burst length will be equal to the size of a cache line--in MOR1KX this is captured by parameters to the core.07:04
ZipCPU|LaptopTwo things will create burst memory reads/writes: the icache (reads only) and the dcache (burst writes depend upon implementation)07:05
ZipCPU|LaptopLooking at line 80 of mor1kx_bus_if_wb32.v, you can see how bursts are determined:07:10
ZipCPU|LaptopOn any read request, the CPU automatically declares itself to be bursting.07:10
olofkZipCPU|Laptop: I think you're right. We talked about this before07:29
olofkAnd I think I see how it's implemented now07:30
olofkin mor1kx07:30
ZipCPU|LaptopWhat bus are you bridging to?  AXI?07:31
olofkUI07:35
ZipCPU|LaptopAh ... did you ever get enough of an example that you could work with it?07:35
olofkWell, I have it working just fine when I connect it to my DMA streamers07:36
ZipCPU|LaptopThat's a good start.07:36
olofkAnd I'll probably start out with trying andrzejr's bridge with single accesses07:37
ZipCPU|LaptopDoes the UI interface request/require burst lengths?  Or just your WB implementation?07:38
olofkIt requires burst lengths. There are separate channels for commands, read data and write data. On the command channel you tell the start address and how much to transfer07:39
olofkBasically07:40
ZipCPU|LaptopJust like axi.  Got it.07:40
olofkI think Wishbone is the only bus that doesn't have explicit burst lengths07:40
ZipCPU|LaptopWhen I bridged from wb/b4/p to axi, I just created a *lot* of individual transactions.07:41
olofk(probably wrong about that)07:41
ZipCPU|LaptopAre you able to do that here, or are you choosing not to because it isn't very optimal?07:41
olofkPerformance is secondary at this point, so I'll start with single accesses07:42
ZipCPU|LaptopThen the problem is solved: set your burst length to 1.  ;)07:42
ZipCPU|LaptopIn case you are curious, I'm trying to (re)build the ZipCPU with 8-bit bytewise accesses.07:44
olofkDoes it complicate things?07:45
olofkI'm still not sure 8-bit bytes are really that good. Except for that you will have a lot better sw compatibility of course07:46
ZipCPU|LaptopThat's sort of why I'm doing it--s/w compatibility has become a *real* hassle.07:46
olofkBut for many workloads you don't really need to access on an 8-bit level that often07:46
ZipCPU|LaptopMy biggest headache so far is that I need to rebuild binutils and GCC.07:47
ZipCPU|LaptopTurns out the changes were fairly confined to the instruction decoder, and the memory unit.07:47
ZipCPU|LaptopFrom the standpoint of the items on the bus, only the memory items need to support it.07:48
ZipCPU|LaptopI haven't committed the changes, so that I can accurately sit back and test to see what the impact is.07:48
ZipCPUIf I can't run my "O/S" on the Spartan 6/LX4 anymore, I may have to discard the changes.07:54
stekernolofk: as you found out, burst length is always == cache length08:04
stekernline08:05
stekernif you think propagating that info out to the bus translation would be useful, I wouldn't be against such a patch08:05
stekerneven though you already can get it from the outside by taking the cache line size08:06
olofkstekern: But the caches are disabled on startup, aren't they?08:14
olofkSo that the first acceses are always single accesses08:14
olofkok, so just as I suspected, the UI bus differs enough between the 7-series and Spartan-6 so that I can't use andrzejr's version without a lot of changes08:18
olofkI'll look at the one in Atlys instead08:18
olofkoh... that one was a bit more complicated than I had anticipated08:20
olofkAha! wb_to_userport seems to be what I'm looking for08:22
olofkSneaky inlined module08:22
ZipCPUolofk: Where'd you find that wb_to_userport routine?08:41
stekernolofk: yes, but why does that matter?08:45
stekernolofk: are you looking at the atlys xilinx to wb things?08:46
stekernthat was one of the first things I ever wrote in verilog... so expect some madness ;)08:46
olofkZipCPU: https://github.com/openrisc/orpsoc-cores/blob/master/systems/atlys/rtl/verilog/xilinx_ddr2/xilinx_ddr2_if.v#L73108:49
olofkstekern: I decided to write my own simple asynchronous version that doesn't use burst at all instead08:49
ZipCPUNo wonder I couldn't find it -- I think I was looking in mor1kx-generic.08:49
olofkstekern: Is it correct that mor1kx performs single accesses until caches are explicitly turned on? In that case I don't have enough info from outside the CPU to determine burst lengths08:57
stekernyes08:58
stekernwhat do you consider "outside" the cpu?08:58
stekernthe bus translator knows if the cpu is performing bursts (of cache line length) or none bursts08:59
olofkoutside == "not having to make any changes to the mor1kx repo"09:01
stekernmmm, but then you are using wishbone?09:01
olofkYes09:02
stekernto translate from?09:02
olofk?09:02
stekernthen you know the burst length, no?09:02
olofkok, my idea is to add an extra burst length indicator to all wishbone masters in my system (likely only mor1kx in many cases), so that it's easier to translate the wb bus to other protocols09:03
stekernwbm_bte_o09:04
olofkYes and no09:04
stekern4, 8, 16 (or linear)09:04
olofkah ok. For mor1kx it's that easy perhaps09:04
olofkBut strictly speaking, you can have a wrap-8 burst that is 5 or 37 words long09:05
olofkBut if I limit the scope to mor1kx for now, bte would be enough09:05
stekernolofk: sure, but it wouldn't be a problem to support that by issuing 8-wrap bursts outwards12:27
wbxolofk: method two I would like to try12:48
olofkwbx: Done. https://www.dropbox.com/s/pbed6hrs2xlw86o/de0_nano_0.sof?dl=016:45
olofkNext step is to create an application that can be put into the SPI Flash16:45
olofkIf you have an OpenRISC ELF file, you can convert it to a binf ile and then use this script https://github.com/openrisc/orpsoc-cores/blob/master/systems/de0_nano/utils/flash_helper.sh to combine it with the sof and burn it to flash16:47
shornestekern: I am looking into the todo item for emulation around adjust_pc().  I think I can do it, but interestingly it requires emulating the jmp instruction as well23:50
shorneIt would be nice it mor1kx (and or1k spec) had a BTR (branch target regiester) like in microblaze.23:51
shorneWhen we get an exceeption in a delay slot it seems the only way to finish is to emulate the jump.  Agreed?23:52
--- Log closed Tue Jan 10 00:00:07 2017

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