in the latest commit of pulp_soc the parameters mentioned in the issue title (NGPIO, NBIT_PADCFG and NBIT_PADMUX) are not used completely, i.e. line 964 to 991 looks as follows:
//********************************************************
//*** PAD AND GPIO CONFIGURATION SIGNALS PACK ************
//********************************************************
generate
for (i=0; i<32; i++) begin
for (j=0; j<6; j++) begin
assign gpio_cfg_o[j+6*i] = s_gpio_cfg[i][j];
end
end
endgenerate
generate
for (i=0; i<64; i++) begin
for (j=0; j<2; j++) begin
assign pad_mux_o[j+2*i] = s_pad_mux[i][j];
end
end
endgenerate
generate
for (i=0; i<64; i++) begin
for (j=0; j<6; j++) begin
assign pad_cfg_o[j+6*i] = s_pad_cfg[i][j];
end
end
endgenerate
This is basically correct for the configuration of these signals in line 304 to 306:
This leads to port width mismatch issues and - in case your parameterized pad configuration is bigger than the statically implemented there are also functional issues.
So, I assume that the signals in pulp_soc should be defined like this:
And then the configuration assignments (line 964 to 991) then need to be changed as follows:
//********************************************************
//*** PAD AND GPIO CONFIGURATION SIGNALS PACK ************
//********************************************************
generate
for (i=0; i<NGPIO; i++) begin
for (j=0; j<NBIT_PADCFG; j++) begin
assign gpio_cfg_o[j+6*i] = s_gpio_cfg[i][j];
end
end
endgenerate
generate
for (i=0; i<NPAD; i++) begin
for (j=0; j<NBIT_PADMUX; j++) begin
assign pad_mux_o[j+2*i] = s_pad_mux[i][j];
end
end
endgenerate
generate
for (i=0; i<NPAD; i++) begin
for (j=0; j<NBIT_PADCFG;j++) begin
assign pad_cfg_o[j+6*i] = s_pad_cfg[i][j];
end
end
endgenerate
Furthermore, you then need to add the pad parameters to apb_soc_ctrl.sv:
Then all port width mismatch issues and also functional issues if you change the pad or gpio configuration width are gone.
Furthermore: Is it possible that there is a typo in the NGPIO setting? You set it to 43 in pulp_soc.sv (line 33) but you leave all gpio pin widths at 32 so I assume 32 is the right choice?
Hi guys,
in the latest commit of pulp_soc the parameters mentioned in the issue title (NGPIO, NBIT_PADCFG and NBIT_PADMUX) are not used completely, i.e. line 964 to 991 looks as follows:
This is basically correct for the configuration of these signals in line 304 to 306:
Unfortunately, the corresponding connections to soc_peripherals look as follows:
This leads to port width mismatch issues and - in case your parameterized pad configuration is bigger than the statically implemented there are also functional issues.
So, I assume that the signals in pulp_soc should be defined like this:
And then the configuration assignments (line 964 to 991) then need to be changed as follows:
Furthermore, you then need to add the pad parameters to
apb_soc_ctrl.sv
:And the corresponding pad_mux and pad_cfg ports need also to be parameterized:
Then all port width mismatch issues and also functional issues if you change the pad or gpio configuration width are gone.
Furthermore: Is it possible that there is a typo in the NGPIO setting? You set it to 43 in pulp_soc.sv (line 33) but you leave all gpio pin widths at 32 so I assume 32 is the right choice?
Thanks & Best Regards, Dustin