-
Notifications
You must be signed in to change notification settings - Fork 28
[RISCV - Xuantie] Custom SVD - register error #17
Comments
Surprising, I found this project that haven't tried yet that extracts the list of board registers from the manual. Edit: I have found an issue/1 when trying to get data from the D1-H manual. |
I don't know if you followed the situation mentioned above, but a new svd was generated from the official manual. warning: clusters with dimIndex set are not implemented yet: _N_%s
error: InvalidClusterSize
/home/kassane/regz/src/Database.zig:888:21: 0x233df2 in Database.toZig (regz)
return error.InvalidClusterSize;
^
/home/kassane/regz/src/Database.zig:0:0: 0x2361d1 in Database.toZig (regz)
/home/kassane/.local/lib/zig/std/heap/arena_allocator.zig:0:16: 0x22f85c in mainImpl (regz)
/home/kassane/regz/src/main.zig:25:17: 0x23033d in std.start.main (regz)
else => return err, |
New SVD - D1s Same error |
@kassane looks like the issue is the SVD, in cluster
So the issue is that the SVD says that each cluster is 4 bytes, but then says there are 12 bytes of registers. |
I will need to check it more carefully, as there were some errors in the information in the manual device and the generated |
Hi @mattnite I am manually reviewing the generated file issue and have seen some inconsistencies in the official documentation itself (may take some time to fully review). But to test the regz tolerance in svd(d1-h) some clustered lines were commented: LoC:
Result: |
I quickly resumed some tests on this manual version of SVD and modified the regz by removing these parameters: Lines 1165 to 1166 in eb42e56
Lines 1243 to 1244 in eb42e56
This way it generated a clearer error reporting the real problem: warning: ignoring field 'CLK_SRC_GATING' (31-32) because it overlaps with 'CLK_GATING' (31-32) in register 'EMAC_25M_CLK'
warning: dimensioned peripherals not supported yet: SMHC[%s]
warning: dimensioned peripherals not supported yet: I2S_PCM[%s]
warning: dimensioned peripherals not supported yet: TWI[%s]
warning: dimensioned peripherals not supported yet: UART[%s]
error: found overlapping fields in register:
error: LEDC_EN: 0+1
error: LEDC_SOFT_RESET: 1+1
error: LED_MSB_%s: 2+1
error: LED_RGB_MODE: 6+3
error: RESET_LED_EN: 10+1
error: TOTAL_DATA_LENGTH: 16+13 The same occurs in another project (Chinese RISC-V): W806-pac warning: ignoring field 'cpu' (8-16) because it overlaps with 'wlan' (8-16) in register 'clock_divide'
error: found overlapping fields in register:
error: i2c: 0+1
error: uart%s: 1+1
error: dma: 8+1
error: timer: 10+1
error: gpio: 11+1
error: adc: 12+1
error: pwm: 13+1
error: i2s: 15+1
error: rsa: 16+1
error: sdio: 18+1
error: touch: 21+1 Unfortunately, I don't have the understanding of how SVD works yet to release patch but I study about it! |
New device SVD (same processor) BL808: regz -s svd bl808.svd -o bl808.zig
warning: dimensioned peripherals not supported yet: DMA%s
warning: dimensioned peripherals not supported yet: I2C[%s]
warning: dimensioned peripherals not supported yet: SPI[%s]
warning: dimensioned peripherals not supported yet: UART[%s]
thread 12432 panic: reached unreachable code
[1] 12432 IOT instruction (core dumped) regz -s svd bl808.svd -o bl808.zig |
My new tests with refactored regz: BL808 SVD: $> regz -s svd bl808.svd -o bl808.zig
warning(svd): TODO clusters. name: capability
warning(svd): TODO clusters. name: operation
warning(svd): TODO clusters. name: group[%s]
warning(svd): failed to load cluster: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(gen): failed to generate peripheral 'EMAC': error.MissingEnumFields
warning(gen): failed to generate peripheral 'LZ4D': error.MissingEnumFields
warning(gen): failed to generate peripheral 'I2S': error.MissingEnumFields
warning(gen): failed to generate peripheral 'I2C[%s]': error.MissingEnumFields
warning(gen): failed to generate peripheral 'UART[%s]': error.MissingEnumFields D1 SVD (unofficial) has generated $> regz -s svd d1_unofficial.svd -o d1.zig
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): TODO clusters. name: msgbox%s
warning(svd): failed to load cluster: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): TODO clusters. name: csic_ccu
warning(svd): TODO clusters. name: csic_top
warning(svd): TODO clusters. name: csic_parser0
warning(svd): TODO clusters. name: csic_dma%s
warning(svd): failed to load cluster: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): TODO clusters. name: ehci_capability
warning(svd): TODO clusters. name: ehci_operational
warning(svd): TODO clusters. name: ohci_control_status_partition
warning(svd): TODO clusters. name: ohci_memory_pointer_partition
warning(svd): TODO clusters. name: ohci_frame_counter_partition
warning(svd): TODO clusters. name: ohci_root_hub_partition
warning(svd): TODO clusters. name: hci_controller_phy_interface
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElementsExtended
warning(svd): failed to load register: error.DimIncrementSizeMismatch
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): failed to load register: error.TodoDimElements
warning(svd): TODO: implement derivation for Database.EntityType.peripheral |
RISC-V32 (GigaDevice) - gd32vf103: new output: $> regz -s svd GD32VF103.svd -o gd32vf103.zig
warning(svd): TODO clusters. name: CLICINTS[%s]
warning(svd): failed to load cluster: error.TodoDimElements
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(svd): TODO: implement derivation for Database.EntityType.peripheral
warning(gen.arm): TODO: implement interrupt table for arch: Database.Arch.cortex_m3
warning(gen): failed to write vector table: error.Todo |
Recently, have started some tests with
regz
using some SVD's such as gd32v (which does not yet have cluster support), esp32-c3 and now allwinner D1 (unofficial svd). However an error occurs when trying to generate the file conversion. I just succeeded in doing the conversion using svd2rust according to shell script found in the above mentioned repository.svd2rust --target riscv -i ../svd/d1_unofficial.svd --const_generic
Output:
The text was updated successfully, but these errors were encountered: