core-v-mcu
core-v-mcu copied to clipboard
[Clean] PER_ID in udma subsystem is not unique
Is there an existing core-v-mcu bug for this?
- [X] I have searched the existing bug issues
Bug Description
In the rtl/includes/pulp_soc_defines.svh
file here I see the following:
`define N_UART 2
`define N_QSPIM 2
`define N_SPI `N_QSPIM // ToDo: Compatibility
`define N_I2CM 2
`define N_I2C `N_I2CM // ToDo: Compatibility
`define N_I2SC 0
`define N_I2S `N_I2SC // ToDo: Cpmpatibility
`define N_CSI2 0
`define N_HYPER 0
`define N_SDIO 1
`define N_CAM 1
`define N_JTAG 0
`define N_MRAM 0
`define N_FILTER 1
`define N_FPGA 0
`define N_EXT_PER 0 // ToDo: Only set to one if PULP_TRAINING -- do we still need?
and in the udma_subsystem I see:
localparam PER_ID_UART = 0;
localparam PER_ID_SPIM = PER_ID_UART + `N_UART;
localparam PER_ID_I2C = PER_ID_SPIM + `N_SPI;
localparam PER_ID_SDIO = PER_ID_I2C + `N_I2C;
localparam PER_ID_I2S = PER_ID_SDIO + `N_SDIO;
localparam PER_ID_CAM = PER_ID_I2S + `N_I2S;
localparam PER_ID_FILTER = PER_ID_CAM + `N_CAM;
localparam PER_ID_FPGA = PER_ID_FILTER + `N_FILTER;
localparam PER_ID_EXT_PER = PER_ID_FPGA + `N_FPGA;
implying that
PER_ID_UART = 0
PER_ID_SPIM = 2
PER_ID_I2C = 4
PER_ID_SDIO = 6
PER_ID_I2S = 7
PER_ID_CAM = 7
PER_ID_FILTER = 8
PER_ID_FPGA = 9
PER_ID_EXT_PER = 9
As you can see, if I am not wrong, PER_ID_I2S and PER_ID_CAM, as well as PER_ID_FPGA and PER_ID_EXT_PER are the same.
Shall we just clean this up?
Hi @davideschiavone, I think it would be a very good idea to clean this up. However, I would like to wait until after we cut a release for the RTL that represents the source for the next tape-out of CORE-V-MCU (bugs and all).