cheshire
cheshire copied to clipboard
vip: Split slink write burst if they cross page boundaries
The vip_cheshire_soc module currently allows bursts that are larger than the allowed 4kB in AXI, which triggers some assertions in the AXI_BUS interface. The triggered assertions don't really impact functionality, but makes it harder in the CI to check for errors.
I had this problem in picobello, when I preload snitch binaries, which can be quite large (because they contain the entire runtime at the moment).
I only adapted it for writes at the moment, since I don't have a way to test it for large read bursts.
I have a question regarding your application here: can you use slink_elf_preload instead? That task already has a parametric maximum burst size (defaults on legal 1 KiB) and splits long sections as necessary.
Since looping on these tasks and splitting bursts externally is much simpler than hacking splitting in (see slink_elf_preload), I don't really intend the slink_(read|write)_beats tasks to be used that way; I'd rather have them invoked with legal-length bursts only. So I would prefer adding a fatal assertion here.
I am already using the slink_elf_preload already (see here). I was actually not aware of the SlinkBurstBytes parameter, and I have to reformulate my issue. The issue is not the burst size but the fact that preloading a binary can cause page crossings, which triggers AXI assertions. For instance, in picobello I get this:
# [SLINK] Preloading section at 0x0000000030004e68 (604 bytes)
# ** Error: AW burst crossing 4 KiB page boundary detected, which is illegal!
But I agree that the right place to change it would be in the slink_elf_preload function instead of slink_(read|write)_beats. I will draft this PR again until I find the time to modify it there.
I moved my modifications into the slink_elf_preload task now, and the PR is ready again for review.