IRC logs for #openrisc Monday, 2014-10-13

--- Log opened Mon Oct 13 00:00:35 2014
-!- FreezingAlt is now known as FreezingCold03:35
olofkstekern: We need the exact same registers for the stream reader, right?08:06
ysionneauolofk ah! awesome :) I like those quick hack sessions =)08:20
ysionneauI see the 3 of us made it to $HOME, good08:21
olofkThere's no place like ~08:32
olofkhmm... why does my program counter just stop moving?08:41
olofkThere's plenty of instructions to execute08:41
wallentohey guys, I will work on the landing site. jungma (Matthias Jung) provided his help, I contacted him and we will draft something on github08:44
wallentobtw: nice you made it home08:44
wallentonobody got lost08:44
olofkwallento: Awesome. Very appreciated08:44
olofkwallento: Well, home is where my FPGA boards are, so I was never really away from home08:45
wallento:)08:45
imphil|awaypictures are available at https://www.flickr.com/photos/127858841@N06/sets/72157648274711327/ btw08:45
-!- imphil|away is now known as imphil08:45
stekernolofk: yes, I think so08:46
olofkimphil: Cool. I'll take a look08:46
olofkHow do you zoom in? My pointer looks like a magnifying glass, but nothing happens when I click08:47
stekernyou've just got a too weak index finger08:47
olofk:)08:48
olofkimphil: Very nice pictures08:48
imphilzooming should  work by just clicking on it.08:48
stekernimphil: nice!08:48
stekernimphil: https://www.flickr.com/photos/127858841@N06/15330065647/in/set-72157648274711327 <- my name is Stefan, not Christian though08:49
imphilstekern, oh, very much so08:49
imphilfixed08:49
olofkProbably need to recompile my browser with some extra use flags to make zooming work.08:49
stekernthanks!08:50
imphilstekern, at some point yesterday my brain stopped working at all :)08:50
stekerndon't worry, I don't know why, but *a lot* of people seem to mix up my first and last name08:51
olofkstekern: What would be the most common reasons for the mor1kx pc to stop moving? I think it needs to fetch new instructions from RAM, but it doesn't08:51
olofkstekern: Yeah. I never done that before, but this weekend I did it at least one time08:51
olofkThat never happens with Wallen Stefantowitz08:52
wallentothats the reason I chose that name, noobs08:53
imphil:)08:53
wallentobugreport: I want to watch the photos in dillo on jor1k but copy and paste does not work and I can't find the slash :(08:54
stekernolofk: is something stalling?08:55
olofkNot sure what's going on yet, but I just saw that I got some x on the padv_* signals in mor1kx_ctrl_cappucino08:57
stekernthat's probably the reason then08:58
olofkFinally out of mor1kx_lsu_cappucino now. Backtracing signals isn't always fun09:13
olofkstekern: Ehmm... adder_result in mor1x_execute_alu is never assigned a value09:16
wallentoany clue who did this? https://www.dropbox.com/s/fg2kln0mjlfa3e8/1%20%282%29.jpg09:17
olofkstekern: Sorry. False alarm09:17
olofkwallento: Ask juliusb . He paid some guy on fiverr to do it09:17
wallentoah, cool09:18
wallentoso we have the rights to use it? jungma will vectorize it, but maybe we also have it09:18
olofkwallento: I think you should check with juliusb what usage rights we have09:21
wallentoyeah, I send him a mail09:21
wallentothanks!09:21
olofkstekern: Well, of course it's the usual problem with an uninitialized value in the rf09:30
olofkI thought that newlib cleared r0 properly during startup09:44
stekernit doesn't?10:05
olofkNot yet sure that's the problem.10:37
olofkFrom my somewhat limited understanding of the issue, it looks like I'm getting an undefined value from RAM when I try to read _board_mem_base10:39
olofkCould it be because that's a weak pointer and therefore not initialized?10:40
olofkahh... or is that optimized away from the elf, because it's supposed to be 0?10:40
olofk(which would mean that it's undefined in the RAM)10:40
olofkYeah, I can't find that address in the bin file, so I guess that the elf loader never writes it to the RAM. Sneaky!10:42
olofkYep. Writing zeros to all addresses in the memory model works too10:45
olofkBut what happens on real hw? Could that address contain an old value from the RAM?10:45
stekernmmm10:48
wallentoi was always wondering. shouldn't r0 not just be hardwired 0?10:48
stekernif it's  not initialized it will contain an old value10:48
stekernbut the pointer can be placed in .bss, and then it'd be 010:49
olofkwallento: We have had a heated discussion about that, and there was some reason why it couldn't be hardwired10:49
olofkstekern: So, should I solve this with some kind of linker directive?10:49
wallentoyeah, I roughly remember, I think its kinda adressing the SRAM or so10:49
stekernmostly hysterical raisins10:49
olofkYeah, that's about what I remember too. That old sw might depend on r0 not being 0 or something like that10:50
stekernolofk: no idea, why is the weak pointer being read?10:50
olofkstekern: Looks like it's the first few instructions in _start10:53
olofkI'll look it up in newlib10:53
wallentoin start?10:54
wallentothis is early board init10:54
olofkAfter that10:55
olofk/* Initialise stack and frame pointer (set to same value) */10:55
olofkThat's when _board_mem_base is used10:55
wallentoso do you elf load?10:56
olofkBut I heard it's totally ok to let some other program tell you where the stack is :)10:56
olofkwallento: Yeah. I use the elf-loader in FuseSoC to preinitialize an SDRAM with an ELF10:56
wallentoand after reset _board_mem_base is not the same value as in first boot?10:57
olofkThis is all in simulation10:57
wallentoah, okay10:57
olofkSo I can easily confirm that the value is never written10:58
olofkI should try adding -mboard and see if that helps10:58
wallentoI think its weak so that you can use a board and overwrite it as user without adding a new board descritpion in newlib10:58
olofkYes, that's the idea, but it would be nice to have it initialized to a default value if no one redefines it10:58
olofkI thought it defaulted to the or1ksim configuration10:59
wallentoit should be zero and not in bss, correct?10:59
wallentoyes, thats what GCC does10:59
olofkYou shouldn't put anything in the BullShitSection10:59
olofk(I have no idea what bss really is)10:59
wallentoits zero after loading, thats the only good thing about it ;)11:00
wallento*after booting11:00
olofkThat's better than our r0 at least :)11:00
wallento:-D11:00
wallentobtw: may I merge this https://github.com/openrisc/or1k-src/pull/1211:01
stekernwallento: of course11:02
olofkOk, so if I understand this correctly, the issue I have is that the elf-loader doesn't write bss11:03
stekernelf-loader shouldn't write elf11:04
olofks/elf/bss ?11:04
stekernthe problem is in the start routing11:04
stekernI remember the issue now, I had a patch for that sometime11:04
stekerns/routing/routine11:04
stekernit's doing stuff in the wrong order11:04
stekernI though I had applied that patch11:05
stekern+t11:05
stekernthe problem is that the board vars are read before bss is cleared11:06
olofkah ok. So it's the software's responsibility to clear bss.11:06
stekernyes11:07
stekernhttps://github.com/openrisc/or1k-src/blob/or1k/libgloss/or1k/crt0.S#L44511:07
stekernbut board mem base is used already here: https://github.com/openrisc/or1k-src/blob/or1k/libgloss/or1k/crt0.S#L44511:07
stekernerr, https://github.com/openrisc/or1k-src/blob/or1k/libgloss/or1k/crt0.S#L39411:07
stekernand, haha, yes s/elf/bss up there11:08
olofkDamn NSA sneaking in stuff like that in our code base11:08
olofkSounds like it's newlib rebuilding time11:12
olofkBut I got other problems as well it seems11:14
olofkIn the beginning of __impure_init it tries to write to address 0x3FFFDFD8. That's quite a bit outside of my RAM11:15
stekernI can't promise that it was as simple as just moving L394'11:20
olofkstekern: No, I understand that, so I'll just clear the RAM manually for now11:24
olofkBut I can't understand what's going on with my new problem. Could it be that the heap or stack is outside of my RAM perhaps?11:25
stekernwhat is your _board_mem_size11:26
olofk0x40000000 according to my objdump, which would explain what's going on11:26
olofkHmm.. that's like 1GB11:27
stekernnot only like, it is11:28
olofkIs -mboard=de0_nano a gcc or ld flag?11:29
olofkI tried both now, but it looks like board_mem_size is unchanged11:30
olofkWhoops11:35
olofkIt works now11:37
olofkstekern: board_mem_size et. al. were redefined locally (I stole your wb_stremer_test program)11:41
stekernach so11:43
stekernI thought it was odd that it'd default to 1GB11:43
wallentobut _board_* aren't bss, are they?11:45
olofkNow they aren't11:46
olofkDoes that depend on whether they are linked in with a libgloss library, or if they are set directly from the main program's code?11:47
stekernwallento: if any of them are set to 0, they end up in .bss11:47
wallentoreally? because they are weak?11:47
stekernno, because it's zero11:47
wallentobut where is this defined11:48
stekernI maybe phrased that unclear, of course only the ones that are set to 0 end up in .bss11:48
wallentothe one is data, that has a fixed value11:48
ysionneauolofk: I just noticed there is intercon = wishbone.InterconnectPointToPoint(master, slave) , maybe you want to use that :)11:48
wallentoi would expect, that all initialized - independent of value - would be in .data11:48
stekernyes, but that's not what happens11:49
wallentoand all undefined are (whyever) initialized to zero as .bss11:49
olofkysionneau: Yep. I found that one yesterday. Worked fine11:49
wallentommh, thats awkward11:49
ysionneauok ^^11:49
ysionneauolofk: ok now I understand that what you said earlier is exactly that :p11:50
ysionneausorry!11:50
olofkhaha11:50
olofkwallento: But in practice I guess this only matter right now because bss isn't correctly cleared11:51
wallentomaybe I am confused, but when I compile _board are always in .text11:52
wallento or1k-elf-objdump -t test.elf | grep _board11:52
wallento00003314 g       .text00000000 _board_init_early11:52
wallento0000331c  w      .text00000000 _board_init11:52
wallento00003308  w      .text00000000 _board_exit11:52
wallento000032fc  w      .text00000000 _board_uart_base11:52
wallento00003304  w      .text00000000 _board_uart_IRQ11:52
wallento00003300  w      .text00000000 _board_uart_baud11:52
wallento000032f0  w      .text00000000 _board_mem_base11:52
wallento000032f8  w      .text00000000 _board_clk_freq11:52
wallento000032f4  w      .text00000000 _board_mem_size11:52
wallentoor1k-elf-objdump -t test.elf | grep _bss11:52
wallento00005ee0 g       .bss00000000 __bss_start11:52
wallentoolofk: you are right. if _board_mem_base ends up in bss because it is 0, then you might set it before in _board_init_early11:53
davidehi guys, concenring the OpenRISC conference 2015, if you cannot do at CERN we are available to host it in Zurich11:56
wallentothats great news11:57
olofkdavide: Hi. Thanks for the offer. That's really good to know11:57
davideno problem, just let me know when you have some news form Alessandro11:59
olofkDo we really have to save all that crap in our interrupt routine? All those reads and writes to RAM cancels out the benefit of my DMA stuff11:59
wallentowe may change it in a way, that it only saves what is needed by assembler12:00
wallentoand then the user can define which N first it will use along with the callback he registers12:00
olofkdavide: Alessandro contacted me this morning. He thought that they "most likely" could host it, but no promises12:00
wallentobut as the callback can be anything..12:01
olofkI probably need to copy larger chunks if I want it to be more efficient then12:02
wallentoyes, or check completion asynchronously, w/o interrupt12:03
wallentoe.g. next time you call your dma driver12:04
wallento(without really knowing what you are doing)12:04
olofkYeah, that could be a good idea12:04
olofkI'm moving data12:04
wallentoyes, but why? ;)12:04
olofkAnd I'm going to have multiple DMA transfers in progress at the same time with limited CPU resources and memory bandwidth12:04
stekernwallento: maybe it depends on the phase of the moon or some other black magic to then ;)12:05
olofkwallento: It's the SDR stuff I'm working on. On the TX side, CPU writes samples to a buffer, which are transmitted with DMA. On the RX side, receiver writes samples to RAM and inform CPU when they are available12:06
wallentookay, if thats the case that the compiler may move 0 ro data to bss (which is odd), we need to set them in _board_init_early12:06
wallentoolofk: got it. if you can have them running asynchronously then I would suggest checking completion of all outstanding just the next time you call dma_start() or however it is called12:07
wallentoHPC stuff often works like this12:07
wallentoI know that MPI implementations do/did it, so that MPI updated the status of asynchronous operations whenever you call MPI_*() or so12:07
olofkwallento: That sounds like a better idea12:09
olofkwallento: Also, I got very interested when I read about something about lossy encoding techniques for limited bandwitdh on one of your slides12:10
olofkForgot to ask you more about that12:10
wallentooh yeah, if you send me an email what exactly you are interested in, I can provide you more data or conenct you to the guy doing it12:11
olofkOh and I forgot to ask _franck_ how it's going with the house. Way to many people to talk to in that limited time12:11
olofkwallento: I'll do that if I feel like taking a more serious look at it12:11
wallentoso, next ORCONF is one week :)12:12
_franck__about my house I'm going to be busy for about 1 year I think12:12
_franck__and I agree, too many people in a short time12:12
_franck__by the way I left the conference at 12:00 and arrive home at 7pm. That wouldn't have take longer if I had to flight to New-York....12:14
_franck__stupid low cost flights :)12:14
stekernthere's so much overhead when flying12:15
stekernI was home 23:4512:17
olofkhaha. Yeah. That's quite insane.12:18
olofkEspecially for _franck__ since it should just be like on the other side of the mountains12:19
_franck__I can't wait for the tele-transportation module we'll have in some years ;)12:19
olofk_franck_: Yeah, I've been waiting for that too12:20
olofklarger buffers definitely helped a lot12:21
olofkwallento: Do you think async polls are the way to go for multi-core too? I'm just thinking that it seems like a pretty easy solution to just assign different IRQs to different CPUs12:22
olofkNo extra synchronization would be needed AFAICS12:23
wallentoif you do it in an atomic way thats a solution in baremetal12:23
olofkwallento: Just in case you happen to know anything about running several OpenRISC cores at the same time :)12:23
wallentoactually I did some research about this stuff and came out with a neat idea called HW-OSQM12:24
olofkSexy abbreviation12:24
wallentowhere instead of an interrupt or polling to signal the completion of a blocking DMA call from thread by appending them to the ready queue of your OS again12:25
wallentohttp://dl.acm.org/citation.cfm?id=245005112:25
wallentobut this never became popular ;)12:25
wallentoand it's actually straight forward, you already know everything about it with my description above ;)12:26
olofkSo is the idea to have a "message server" that collects all events from the cores, and let sw read from that?12:27
wallentois actually more simple12:27
wallentoalong with your transaction you store your thread_queue_element* (or however it is called) in the DMA descriptor in your DMA controller12:28
olofkDMA descriptor?12:28
wallentolike (src @, dest @, size)12:28
stekernthere's only soft descriptors with the wb_streamer12:29
olofkIs it like a tag to identify the current DMA transaction+12:30
olofks/+/?12:30
wallentokind of. when your transaction is completed now, the DMA knows how to modify a list12:30
wallentoand it just appends your thread element back to the list of runnable threads12:30
wallentoand it will be scheduled again12:31
wallentoI don't think thats really what you are looking for, but will be an essential part of the OpTiMSoC inter-tile DMA and message passing12:31
olofkYeah, one of these days I will find time to take a closer look at what you're doing with OpTiMSoC12:35
wallentoyou should wait a month or so12:35
wallentothere are many things coming up with me writing up the thesis12:35
wallentofinally packing them properly12:36
_franck__so, what about the opencores forum/wiki ? Someone want to try to summarize what was said sunday ?12:37
wallentoyes, I was planning to write this up12:37
olofk_franck_: Main topics were where to have the conference next year, and discussion if we should set up an foundation for Open Source RTL stuff like OpenRISC12:38
_franck__ok thanks12:38
olofkWe decided to host the conference in your house next year, so make sure it's ready by then12:39
_franck__and ? should we ?12:39
_franck__what !! ?12:39
_franck__:)12:39
davided12:40
olofkIt seemed like most people thought that a foundation is a good idea. We didn't really set any details, but a group of people volunteered to start investigating how to set it up and what the foundation should really do12:41
arokuxolofk: hi. I have small question. I'd like to learn about creating some hardware components and go through the whole pipe line. I do not know anything yet. from what I imagine I need to create the component first in verilog (or some other HDL) then I can implement it in FPGA. could you please tell me where I can read more about it? and also maybe you could recommend low cost board with FPGA preferably open and with tools for Linux. Thanks!12:50
arokuxmaybe some others could give some advice too12:53
poke53282imphil: Thanks for the pictures13:05
imphilpoke53282, you're very welcome!13:48
olofkarokux: For cheap boards I would recommend de0 nano. It is well supported. As for getting a start in doing HDL design, you might want to check out http://chiphack.org14:16
olofkpoke53282: Finally looked up the c64 address map and learned how to set Extended color mode :)14:19
arokuxolofk: thank you!14:25
-!- imphil is now known as imphil|away17:04
poke53282olofk: Actually the number is supposed to be 53281 and not 53282. But I guess, I logged in twice and then the chatroom program changed to the second nickname.21:07
poke53282poke53281,0 was (one of) the first "programs" I ever wrote.21:08
poke53282and it was so cool. Just by typing this command you could switch the screen color. I was around 8 or so.21:09
poke53282the next code was then something like21:10
poke5328210 poke53281,I21:10
poke5328220 I=I+121:10
poke5328230 goto 1021:10
poke53282I didn't understand much. Never saw something like a variable. But it gave nice graphical effects.21:11
poke53282and accidently my birthday is on 3.2.81 :)21:11
--- Log closed Tue Oct 14 00:00:36 2014

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