tpb has joined #litex
rohitksingh has joined #litex
freemint has joined #litex
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #litex
<scanakci> are there some constraints when setting the memory map? I would like to set memory map as provided in the figure. https://usercontent.irccloud-cdn.com/file/cJOYWUih/memmap.png
<scanakci> I am getting bunch of "relocation truncated to fit" errors. I come across some constraints related to RISCV linker, but could not fix the issue.
<scanakci> (when I am compiling litex-bios for simulation)
<scanakci> setting main_ram to 0x8000_0000 fixes the issue, but I need my rom to reside at that address
<sorear> with both of the currently implemented riscv64 code models, data and text must be less than 2GB apart
<sorear> if you need rom to be at 80000000, maybe put ram at 40000000
<sorear> Or have one at 0 and the other at 40000000
nrossi has joined #litex
_whitelogger has joined #litex
_whitelogger has joined #litex
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #litex
rohitksingh has quit [Ping timeout: 250 seconds]
<kbeckmann> On a similar topic, is it possible to have a parent-child like mapping of memory, e.g. main_ram @ 0x8000_0000 which consists of foo_ram @ 0x8000_0000 with length 0x10000, and bar_ram at 0x8000_0000 with length 0x8000, thus creating main_ram at 0x8000_0000 with the length 0x18000
<kbeckmann> oh i mean of course that bar_ram is located at 0x8001_0000
<kbeckmann> the reason that i want this is to be able to expose a large contiguous memory area that consists of multiple external different ram modules.
_whitelogger has joined #litex
freemint has quit [Ping timeout: 246 seconds]
nrossi has quit [*.net *.split]
futarisIRCcloud has quit [*.net *.split]
Finde has quit [*.net *.split]
flammit has quit [*.net *.split]
st-gourichon-fid has quit [*.net *.split]
gruetzkopf has quit [*.net *.split]
goran-mahovlic has quit [*.net *.split]
nrossi has joined #litex
goran-mahovlic has joined #litex
Finde has joined #litex
gruetzkopf has joined #litex
st-gourichon-fid has joined #litex
flammit has joined #litex
futarisIRCcloud has joined #litex
freemint has joined #litex
<scanakci> thanks @sorear. I will keep that in my mind.
<scanakci> I changed the layout and tried with couple of different memory maps. However, still getting the same errors.
<scanakci> My observation is that setting rom to 0x8000_0000 is causing this problem.
<sorear> yes, why do people do that? it seems like a terrible idea
<sorear> is everyone just blindly copying berkeley or is there an actual reason not to put ram at 0x4000_0000?
<sorear> don't use 0x8000_0000 or higher for anything if you can help it
<sorear> if you have more than 1GB of RAM you need to think carefully about what's going to be accessible before MMU setup. after MMU setup, text and data should be virtually adjacent to each other
<sorear> if you don't have a MMU at all, you probably don't need more than 31 bits for physical addresses
<sorear> basically don't use 0x8000_0000 for *anything* and you shouldn't get that error
<scanakci> thank you @sorear.
<sorear> I'm not upset at you I'm upset that all of the guides to copy put RAM and ROM at the *worst possible* addresses
freemint has quit [Ping timeout: 245 seconds]
freemint has joined #litex
<_florent_> kbeckmann: not sure there is a convenient way actually to do parent-child like mapping. One thing you can do is use add_memory_region with type="linker" to do something similar (you have a look at https://github.com/enjoy-digital/litex/pull/285)
<tpb> Title: [RFC] Linker region concept by mateusz-holenko · Pull Request #285 · enjoy-digital/litex · GitHub (at github.com)
CarlFK has quit [Ping timeout: 250 seconds]
<kbeckmann> thanks _florent_ , will try it out!
freemint has quit [Remote host closed the connection]
freemint has joined #litex
freemint has quit [Ping timeout: 245 seconds]
rohitksingh has joined #litex
nrossi has quit [Quit: Connection closed for inactivity]
freemint has joined #litex
<scanakci> I guess I am close to running bios on blackparrot. At least, I should be able to print LITEX logo very soon. Currently, I can see that Blackparrot fetches instructions/data properly from ROM/SRAM. I verified that BP is reaching to main function in main.c.
CarlFK has joined #litex
<scanakci> The problem is that nothing is printed to the console. I see that BP calls printf, putsnonl, uart_write in order. My understanding is that uart_write is the function that is supposed to show texts on the screen. uart_write is performing a csr write as far as I see in the generated/csr.h file.
CarlFK has quit [Remote host closed the connection]
<scanakci> I am using uart_polling as a side note. I had tested it before with Rocket and it worked properly.
freemint has quit [Ping timeout: 245 seconds]
rohitksingh has quit [Read error: Connection reset by peer]
rohitksingh has joined #litex
tpb has quit [Remote host closed the connection]