Replies: 1 comment 2 replies
-
Hey @biosbob! Sorry for the late reply - busy times here 😉
Unfortunately, that is true 🙈
Oh, seems like I have forgotten to update the version number in there. Actually, the SVD file should be (quite) up-to-date.
Thanks for the link! It looks like they are still in a very early stage.
I absolutely agree! I think there is no (feasible) way to generate the SVD file from the VHDL sources. Base addresses and register/bit definitions are scattered across several files and also use different description styles. ARM and others provide (open-source?) tools to generate C headers from the SVD file. Indeed, this would be a very nice thing! I think we already had a discussion about this here... Anyway, I see some problems here:
I would really love to have such a setup! Obviously, keeping the SVD and all the C files in sync is a lot of (error-prone) work.
Sounds interesting! Keep me/us updated if you like. 😉 |
Beta Was this translation helpful? Give feedback.
-
i recently looked at the
neorv32.svd
file -- which miraculously appears to be maintained by hand!!!! i've also noticed that the latest version corresponds to 1.6.4 -- which means it does not reflect the very latest register/field names....while
.svd
files are an ARM invention, i have found a few projects in the RISC-V space that work with them; SiFive seems to like them, for instance....i've also discovered a RISC-V working group RVM-CSI that is presumably addressing this issue -- though i still don't think we'll have something like an
.svd
file....having worked with
.svd
files provided by silicon vendors for their MCUs, i generally regard them as a single source of truth vis-a-vis the names of the peripherals/registers/fields.... more important, perhaps, the.svd
can be used as a source file from which low-level C headers are generated....needless to say, this is exactly the opposite of the process used in this project!!!!! still learning about HDLs and the hardware design process, is it possible to generate an
.svd
file from information that is already found in some.vhd
file???? or perhaps a.vhd
file just containing peripheral/register/field names can be produced from a master.svd
file????a short-to-medium term suggestion would be a process like this:
neorv32.svd
as a single-source of truthneorv32_regs.h
using (say) a simple python scriptneorv32_uart.h
) to JUST their function prototypes#include "neorv32_regs.h"
to bring in the register types, field names, etc. removed in the prior stepnote that this will NOT impact any of the
neorv32_*.c
source files, let alone any of the examples....and (somewhat selfishly), this approach addresses a rather unique need of mine.... specifically, i can use the latest
neorv32.svd
to generate my own "headers" for my own programming language....full disclosure: i've been working with a propriety language named Em for the past decade.... while the Em translator ultimately generates standard C/C++, programs written in this higher-level language will frequently out-perform comparable hand-built C/C++ program in time and (especially!) space.... but that's all i can say for now 😉
Beta Was this translation helpful? Give feedback.
All reactions