test_application_of_default_values
This feature includes tests that verify the parser correctly applies default values to properties not explicitly defined in the SVD file. It ensures the parser adheres to the SVD standard by assigning the appropriate predefined defaults.
test_custom_register_properties_on_device_level
This test ensures that the default values are overwritten if custom values are specified in a processed SVD file on device level.
Expected Outcome: The device is processed correctly, with custom register properties specified at the device
level overriding the default values. The register size is set to 16 bits, the access type is WRITE_ONLY
, the
protection type is SECURE
, the reset value is 0xDEADBEEF
, and the reset mask is 0xDEADC0DE
.
Processable with svdconv: yes
Source code in tests/test_process/test_application_of_default_values.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
SVD file: application_of_default_values/custom_register_properties_on_device_level.svd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
test_default_register_properties_on_device_level
Although not stated in the SVD specification, svdconv
assigns default values to size (32), access (read-
write), resetValue (0x0), and resetMask (0xFFFFFFFF). This test ensures that the default values are set if
they are not specified in a processed SVD file.
Expected Outcome: The device is processed correctly, with default register properties applied at the device
level. The register size is set to 32 bits, the access type is READ_WRITE
, the protection type is ANY
, the
reset value is 0x0
, and the reset mask is 0xFFFFFFFF
.
Processable with svdconv: yes
Source code in tests/test_process/test_application_of_default_values.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
SVD file: application_of_default_values/default_register_properties_on_device_level.svd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|