Commit graph

137 commits

Author SHA1 Message Date
bunnie
659796916a chore: cleanup typos in docs, comments 2024-01-15 02:16:43 +08:00
bunnie
0267a56989 format Cargo.tomls
because apparently cargo fmt doesn't format Cargo.toml files???
2024-01-15 00:14:39 +08:00
bunnie
8ca1ee9bc2 suppress formatting of utralib files 2024-01-14 23:08:57 +08:00
bunnie
063b99cac5 format svd2utra 2024-01-14 22:59:33 +08:00
bunnie
53469a68d0 publish package updates, sync to release tag 2023-08-08 14:35:49 +08:00
bunnie
b127cd093f bump version pins for change to xous-rs 2023-08-03 13:29:39 +08:00
bunnie
51278451a0 update version pins to pull in cramium target 2023-07-19 21:07:56 +08:00
bunnie
8da0783dde fix warning in generated code 2023-07-18 03:56:26 +08:00
bunnie
b9630c7056 fix svd2utra bug where instead of merging SVDs we only use the last one in the list 2023-07-17 18:24:32 +08:00
bunnie
069edbc255 support multi-svd file designs
This patch set goes across all the toolchains and brings
in the support for split SVD descriptions of SoCs.

This is helpful for dealing with designs that have multiple
"top" files for the same core IP set. For exmaple, you may have
a SoC that you are developing that targets silicon, but
you have a version that wraps this in additional peripherals
available only in an FPGA emulator that are used for debugging.

In this case, you can have one SVD file be the description of
the SoC itself, and another SVD file describe just the "delta"
introduced by the FPGA wrapper that emulates/controls the SoC.
2023-07-17 16:27:09 +08:00
bunnie
952ba18fba commit vesrion pin bumps 2023-06-16 01:30:18 +08:00
bunnie
6c0d252166
Merge pull request #390 from Foundation-Devices/jeandudey/sft-2309-improve-svd2utra-code
svd2utra: improve code
2023-06-16 01:16:07 +08:00
Jean-Pierre De Jesus DIAZ
7e89d70b95
svd2utra: add license header to files
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-06-15 17:50:32 +02:00
Jean-Pierre De Jesus DIAZ
b4cb4a6599
svd2utra: do not include modules in main file
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-06-15 17:50:32 +02:00
Jean-Pierre De Jesus DIAZ
edd25611ff
svd2utra: replace use of usize by u32/u64
The rationale is that those types don't depend on host pointer size
values.  This could've caused trouble when parsing SVDs for 64-bit
devices on a 32-bit host.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-06-15 17:50:32 +02:00
Jean-Pierre De Jesus DIAZ
4dd50032e7
svd2utra: Remove convert_case dependency.
Not used.

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-06-15 17:50:32 +02:00
bunnie
5a2df4432c technical debt: cleanup UTRA package
- make the "base" field no longer public. It is accessible, but only
through an `unsafe` method, because, it is unsafe.
- add accessors to offest/mask fields. Because, it's not at all
unsafe to access these, and it can be useful for bit-ops that are
not part of the generic set of UTRA.
- add Arc to AtomicCSR, and require `std` for AtomicCSR types.
This should not break anything, I checked inside @foundation-devices
keyOS and they don't seem to be using AtomicCSR anywhere.

The Arc makes it a bit safer to clone the AtomicCSR base pointer
and share it between threads, but it will have an impact on performance.
The USB stack (which requires AtomicCSR) was regression testing and the
impact seems minimal.

Recall that the main purpose of AtomicCSR is to provide a CSR accessor
that does not require a mutable reference to the base object. This
can make certain Rust idioms a bit cleaner. We wrap the base accessor
in Arc+Atomic to try and improve the safety of throwing the borrow
checker under the bus, but it's still not perfect because hardware
mutable state can have side-effects within hardware itself that cannot
be modeled or checked by Rust's borrow checker.
2023-05-23 18:11:24 +08:00
Jean-Pierre De Jesus DIAZ
662eda0b43
svd2utra: Remove .gitignore
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-05-19 13:08:13 +02:00
bunnie
697d44de3d bump version pins to absorb changes to svd2utra etc. 2023-05-03 23:11:12 +08:00
Jean-Pierre De Jesus DIAZ
2d3b1f4a5f
svd2utra: fix test compilation
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2023-05-02 13:46:07 +02:00
bunnie
8357ab31a5 bump all pins because utralib got updated 2023-04-09 00:48:35 +08:00
bunnie
384f04fc9a fix svd2utra main.rs 2023-04-04 02:17:04 +08:00
bunnie
e469eba167 bump version for utralib patch 2023-04-04 02:13:02 +08:00
bunnie
3ca8f669a3 breaking change in svd2utra: fix deprecation of quick-xml
quick-xml 0.19.0, a dependency of svd2utra, uses features
that Rust will deprecate.

Unfortunately, the only versions of quick-xml that do not
use the deprecated language features also break a portion
of the API. In particular, quick-xml will no longer take
a `File` as an input: it will only take a `Path`.

This means that the API for svd2utra is also broken, because
originally it was designed to take a `File`

This patch refactors svd2utra to work with the latest quick-xml,
but also breaks any code that calls svd2utra's generate
APIs.

Fortunately this is fairly easy to fix, the calling code
will typically already have the Path somewhere in it, so
instead of opening the Path and passing it into the function,
one may simply pass in the Path.
2023-04-04 02:03:35 +08:00
bunnie
303f595d6f bump versions to cleanup renode.rs sync issue 2023-03-14 16:34:53 +08:00
bunnie
82e3aa322f bump toml files in prep for publish 2023-03-08 03:54:37 +08:00
eupn
cf9af664dc
svd2utra: remove generation of unused offset enum 2023-03-05 17:00:46 +04:00
bunnie
5370ce396d bump all revs due to SoC artifact update 2022-12-12 16:07:20 +08:00
bunnie
1d1b3a35b7 commit version bump 2022-11-26 10:00:44 +08:00
eupn
cb8ba8dbe3
svd2utra: implement bitWidth and bitOffset tags for fields 2022-11-25 18:16:49 +04:00
bunnie
aa9977cc58 bump all the things because we changed utralib again 2022-11-17 22:13:40 +08:00
bunnie
dabbfd6c35 bump all the things to absorb the SoC change 2022-11-17 19:39:18 +08:00
bunnie
ba28dd8795 bump to absorb utralib straggler configs 2022-10-28 15:11:17 +08:00
bunnie
475e464efe bump versions due to svd2utra change 2022-10-27 03:04:22 +08:00
eupn
d4073ea086
svd2utra: fix clippy lints 2022-10-26 21:20:33 +04:00
eupn
36db49d7b7
svd2utra: apply rustfmt 2022-10-26 21:03:51 +04:00
eupn
947ff2d172
svd2utra: implement derivedFrom SVD attribute 2022-10-26 21:01:46 +04:00
bunnie
d331d405ee bump version numbers for publication 2022-10-25 17:23:40 +08:00
bunnie
0584ad2f2c switch to local paths to see if this helps the build 2022-10-18 00:26:56 +08:00
bunnie
4b368d71db bump versions of crates 2022-10-15 01:31:54 +08:00
eupn
722e8a1187
svd2utra: generate smaller compile tests for each peripheral 2022-10-14 21:03:53 +04:00
bunnie
63a87ca1bc bump all the versions 2022-10-14 16:54:43 +08:00
eupn
5ce93a8615
svd2utra: fix duplicate enum discriminants error for offsets 2022-10-13 12:04:26 +04:00
eupn
bcb99ba727
svd2utra: add bitRange tag support for fields 2022-10-13 11:59:44 +04:00
eupn
c7c3efae2b
svd2utra: read the field's <name> tag only once 2022-10-13 11:56:14 +04:00
bunnie
ee522c69a7 bump rev to remove clap 2022-09-29 22:15:22 +08:00
bunnie
7226b57a2f eliminate an instance of clap 2022-09-29 22:12:58 +08:00
bunnie
119eac0c70 update manifest 2022-09-26 14:13:20 +08:00
bunnie
a1b7dde106 prep svd2utra for submission to crates.io 2022-09-26 14:07:28 +08:00
bunnie
b60ad06134 add a clone function for AtomicCsr
this is useful for the performance profiling framework
where we want to stick the allocatde CSRs into structures that
help manage things.
2022-09-16 01:46:15 +08:00