diff --git a/hw/core-v-mini-mcu/core_v_mini_mcu.sv b/hw/core-v-mini-mcu/core_v_mini_mcu.sv index 55669b829..d765b1566 100644 --- a/hw/core-v-mini-mcu/core_v_mini_mcu.sv +++ b/hw/core-v-mini-mcu/core_v_mini_mcu.sv @@ -45,229 +45,229 @@ module core_v_mini_mcu output logic exit_valid_o, output logic gpio_0_o, - input logic gpio_0_i, + input logic gpio_0_i, output logic gpio_0_oe_o, output logic gpio_1_o, - input logic gpio_1_i, + input logic gpio_1_i, output logic gpio_1_oe_o, output logic gpio_2_o, - input logic gpio_2_i, + input logic gpio_2_i, output logic gpio_2_oe_o, output logic gpio_3_o, - input logic gpio_3_i, + input logic gpio_3_i, output logic gpio_3_oe_o, output logic gpio_4_o, - input logic gpio_4_i, + input logic gpio_4_i, output logic gpio_4_oe_o, output logic gpio_5_o, - input logic gpio_5_i, + input logic gpio_5_i, output logic gpio_5_oe_o, output logic gpio_6_o, - input logic gpio_6_i, + input logic gpio_6_i, output logic gpio_6_oe_o, output logic gpio_7_o, - input logic gpio_7_i, + input logic gpio_7_i, output logic gpio_7_oe_o, output logic gpio_8_o, - input logic gpio_8_i, + input logic gpio_8_i, output logic gpio_8_oe_o, output logic gpio_9_o, - input logic gpio_9_i, + input logic gpio_9_i, output logic gpio_9_oe_o, output logic gpio_10_o, - input logic gpio_10_i, + input logic gpio_10_i, output logic gpio_10_oe_o, output logic gpio_11_o, - input logic gpio_11_i, + input logic gpio_11_i, output logic gpio_11_oe_o, output logic gpio_12_o, - input logic gpio_12_i, + input logic gpio_12_i, output logic gpio_12_oe_o, output logic gpio_13_o, - input logic gpio_13_i, + input logic gpio_13_i, output logic gpio_13_oe_o, output logic gpio_14_o, - input logic gpio_14_i, + input logic gpio_14_i, output logic gpio_14_oe_o, output logic gpio_15_o, - input logic gpio_15_i, + input logic gpio_15_i, output logic gpio_15_oe_o, output logic gpio_16_o, - input logic gpio_16_i, + input logic gpio_16_i, output logic gpio_16_oe_o, output logic gpio_17_o, - input logic gpio_17_i, + input logic gpio_17_i, output logic gpio_17_oe_o, output logic spi_flash_sck_o, - input logic spi_flash_sck_i, + input logic spi_flash_sck_i, output logic spi_flash_sck_oe_o, output logic spi_flash_cs_0_o, - input logic spi_flash_cs_0_i, + input logic spi_flash_cs_0_i, output logic spi_flash_cs_0_oe_o, output logic spi_flash_cs_1_o, - input logic spi_flash_cs_1_i, + input logic spi_flash_cs_1_i, output logic spi_flash_cs_1_oe_o, output logic spi_flash_sd_0_o, - input logic spi_flash_sd_0_i, + input logic spi_flash_sd_0_i, output logic spi_flash_sd_0_oe_o, output logic spi_flash_sd_1_o, - input logic spi_flash_sd_1_i, + input logic spi_flash_sd_1_i, output logic spi_flash_sd_1_oe_o, output logic spi_flash_sd_2_o, - input logic spi_flash_sd_2_i, + input logic spi_flash_sd_2_i, output logic spi_flash_sd_2_oe_o, output logic spi_flash_sd_3_o, - input logic spi_flash_sd_3_i, + input logic spi_flash_sd_3_i, output logic spi_flash_sd_3_oe_o, output logic spi_sck_o, - input logic spi_sck_i, + input logic spi_sck_i, output logic spi_sck_oe_o, output logic spi_cs_0_o, - input logic spi_cs_0_i, + input logic spi_cs_0_i, output logic spi_cs_0_oe_o, output logic spi_cs_1_o, - input logic spi_cs_1_i, + input logic spi_cs_1_i, output logic spi_cs_1_oe_o, output logic spi_sd_0_o, - input logic spi_sd_0_i, + input logic spi_sd_0_i, output logic spi_sd_0_oe_o, output logic spi_sd_1_o, - input logic spi_sd_1_i, + input logic spi_sd_1_i, output logic spi_sd_1_oe_o, output logic spi_sd_2_o, - input logic spi_sd_2_i, + input logic spi_sd_2_i, output logic spi_sd_2_oe_o, output logic spi_sd_3_o, - input logic spi_sd_3_i, + input logic spi_sd_3_i, output logic spi_sd_3_oe_o, output logic pdm2pcm_pdm_o, - input logic pdm2pcm_pdm_i, + input logic pdm2pcm_pdm_i, output logic pdm2pcm_pdm_oe_o, output logic gpio_18_o, - input logic gpio_18_i, + input logic gpio_18_i, output logic gpio_18_oe_o, output logic pdm2pcm_clk_o, - input logic pdm2pcm_clk_i, + input logic pdm2pcm_clk_i, output logic pdm2pcm_clk_oe_o, output logic gpio_19_o, - input logic gpio_19_i, + input logic gpio_19_i, output logic gpio_19_oe_o, output logic i2s_sck_o, - input logic i2s_sck_i, + input logic i2s_sck_i, output logic i2s_sck_oe_o, output logic gpio_20_o, - input logic gpio_20_i, + input logic gpio_20_i, output logic gpio_20_oe_o, output logic i2s_ws_o, - input logic i2s_ws_i, + input logic i2s_ws_i, output logic i2s_ws_oe_o, output logic gpio_21_o, - input logic gpio_21_i, + input logic gpio_21_i, output logic gpio_21_oe_o, output logic i2s_sd_o, - input logic i2s_sd_i, + input logic i2s_sd_i, output logic i2s_sd_oe_o, output logic gpio_22_o, - input logic gpio_22_i, + input logic gpio_22_i, output logic gpio_22_oe_o, output logic spi2_cs_0_o, - input logic spi2_cs_0_i, + input logic spi2_cs_0_i, output logic spi2_cs_0_oe_o, output logic gpio_23_o, - input logic gpio_23_i, + input logic gpio_23_i, output logic gpio_23_oe_o, output logic spi2_cs_1_o, - input logic spi2_cs_1_i, + input logic spi2_cs_1_i, output logic spi2_cs_1_oe_o, output logic gpio_24_o, - input logic gpio_24_i, + input logic gpio_24_i, output logic gpio_24_oe_o, output logic spi2_sck_o, - input logic spi2_sck_i, + input logic spi2_sck_i, output logic spi2_sck_oe_o, output logic gpio_25_o, - input logic gpio_25_i, + input logic gpio_25_i, output logic gpio_25_oe_o, output logic spi2_sd_0_o, - input logic spi2_sd_0_i, + input logic spi2_sd_0_i, output logic spi2_sd_0_oe_o, output logic gpio_26_o, - input logic gpio_26_i, + input logic gpio_26_i, output logic gpio_26_oe_o, output logic spi2_sd_1_o, - input logic spi2_sd_1_i, + input logic spi2_sd_1_i, output logic spi2_sd_1_oe_o, output logic gpio_27_o, - input logic gpio_27_i, + input logic gpio_27_i, output logic gpio_27_oe_o, output logic spi2_sd_2_o, - input logic spi2_sd_2_i, + input logic spi2_sd_2_i, output logic spi2_sd_2_oe_o, output logic gpio_28_o, - input logic gpio_28_i, + input logic gpio_28_i, output logic gpio_28_oe_o, output logic spi2_sd_3_o, - input logic spi2_sd_3_i, + input logic spi2_sd_3_i, output logic spi2_sd_3_oe_o, output logic gpio_29_o, - input logic gpio_29_i, + input logic gpio_29_i, output logic gpio_29_oe_o, output logic i2c_scl_o, - input logic i2c_scl_i, + input logic i2c_scl_i, output logic i2c_scl_oe_o, output logic gpio_31_o, - input logic gpio_31_i, + input logic gpio_31_i, output logic gpio_31_oe_o, output logic i2c_sda_o, - input logic i2c_sda_i, + input logic i2c_sda_i, output logic i2c_sda_oe_o, output logic gpio_30_o, - input logic gpio_30_i, + input logic gpio_30_i, output logic gpio_30_oe_o, @@ -285,41 +285,41 @@ module core_v_mini_mcu input obi_req_t [EXT_XBAR_NMASTER_RND-1:0] ext_xbar_master_req_i, output obi_resp_t [EXT_XBAR_NMASTER_RND-1:0] ext_xbar_master_resp_o, - input reg_req_t ext_ao_peripheral_slave_req_i[core_v_mini_mcu_pkg::AO_SPC_NUM-1:0], + input reg_req_t ext_ao_peripheral_slave_req_i [core_v_mini_mcu_pkg::AO_SPC_NUM-1:0], output reg_rsp_t ext_ao_peripheral_slave_resp_o[core_v_mini_mcu_pkg::AO_SPC_NUM-1:0], // External slave ports - output obi_req_t ext_core_instr_req_o, - input obi_resp_t ext_core_instr_resp_i, - output obi_req_t ext_core_data_req_o, - input obi_resp_t ext_core_data_resp_i, - output obi_req_t ext_debug_master_req_o, - input obi_resp_t ext_debug_master_resp_i, - output obi_req_t ext_dma_read_req_o[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], - input obi_resp_t ext_dma_read_resp_i[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], - output obi_req_t ext_dma_write_req_o[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], - input obi_resp_t ext_dma_write_resp_i[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], - output obi_req_t ext_dma_addr_req_o[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], - input obi_resp_t ext_dma_addr_resp_i[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], + output obi_req_t ext_core_instr_req_o, + input obi_resp_t ext_core_instr_resp_i, + output obi_req_t ext_core_data_req_o, + input obi_resp_t ext_core_data_resp_i, + output obi_req_t ext_debug_master_req_o, + input obi_resp_t ext_debug_master_resp_i, + output obi_req_t ext_dma_read_req_o[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], + input obi_resp_t ext_dma_read_resp_i[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], + output obi_req_t ext_dma_write_req_o[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], + input obi_resp_t ext_dma_write_resp_i[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], + output obi_req_t ext_dma_addr_req_o[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], + input obi_resp_t ext_dma_addr_resp_i[core_v_mini_mcu_pkg::DMA_NUM_MASTER_PORTS-1:0], input logic [core_v_mini_mcu_pkg::DMA_CH_NUM-1:0] ext_dma_stop_i, output reg_req_t ext_peripheral_slave_req_o, input reg_rsp_t ext_peripheral_slave_resp_i, - output logic [EXT_HARTS_RND-1:0] ext_debug_req_o, - output logic ext_debug_reset_no, + output logic [EXT_HARTS_RND-1:0] ext_debug_req_o, + output logic ext_debug_reset_no, input logic [NEXT_INT_RND-1:0] intr_vector_ext_i, //power manager exposed to top level //signals are unrolled to easy EDA tools output logic cpu_subsystem_powergate_switch_no, - input logic cpu_subsystem_powergate_switch_ack_ni, + input logic cpu_subsystem_powergate_switch_ack_ni, output logic peripheral_subsystem_powergate_switch_no, - input logic peripheral_subsystem_powergate_switch_ack_ni, + input logic peripheral_subsystem_powergate_switch_ack_ni, output logic [EXT_DOMAINS_RND-1:0] external_subsystem_powergate_switch_no, - input logic [EXT_DOMAINS_RND-1:0] external_subsystem_powergate_switch_ack_ni, + input logic [EXT_DOMAINS_RND-1:0] external_subsystem_powergate_switch_ack_ni, output logic [EXT_DOMAINS_RND-1:0] external_subsystem_powergate_iso_no, output logic [EXT_DOMAINS_RND-1:0] external_subsystem_rst_no, output logic ext_cpu_subsystem_rst_no, @@ -329,8 +329,8 @@ module core_v_mini_mcu output logic [31:0] exit_value_o, // External SPC interface - input logic [core_v_mini_mcu_pkg::DMA_CH_NUM-1:0] ext_dma_slot_tx_i, - input logic [core_v_mini_mcu_pkg::DMA_CH_NUM-1:0] ext_dma_slot_rx_i, + input logic [core_v_mini_mcu_pkg::DMA_CH_NUM-1:0] ext_dma_slot_tx_i, + input logic [core_v_mini_mcu_pkg::DMA_CH_NUM-1:0] ext_dma_slot_rx_i, output logic [core_v_mini_mcu_pkg::DMA_CH_NUM-1:0] dma_done_o ); @@ -342,7 +342,7 @@ module core_v_mini_mcu localparam DM_HALTADDRESS = core_v_mini_mcu_pkg::DEBUG_START_ADDRESS + 32'h00000800; //debug rom code (section .text in linker) starts at 0x800 localparam JTAG_IDCODE = 32'h10001c05; - localparam NRHARTS = EXT_HARTS + 1; //external harts + single hart core-v-mini-mcu + localparam NRHARTS = EXT_HARTS + 1; //external harts + single hart core-v-mini-mcu localparam BOOT_ADDR = core_v_mini_mcu_pkg::BOOTROM_START_ADDRESS; localparam NUM_MHPMCOUNTERS = 1; @@ -412,10 +412,10 @@ module core_v_mini_mcu power_manager_out_t memory_subsystem_pwr_ctrl_out[core_v_mini_mcu_pkg::NUM_BANKS-1:0]; power_manager_out_t external_subsystem_pwr_ctrl_out[EXT_DOMAINS_RND-1:0]; - power_manager_in_t cpu_subsystem_pwr_ctrl_in; - power_manager_in_t peripheral_subsystem_pwr_ctrl_in; - power_manager_in_t memory_subsystem_pwr_ctrl_in[core_v_mini_mcu_pkg::NUM_BANKS-1:0]; - power_manager_in_t external_subsystem_pwr_ctrl_in[EXT_DOMAINS_RND-1:0]; + power_manager_in_t cpu_subsystem_pwr_ctrl_in; + power_manager_in_t peripheral_subsystem_pwr_ctrl_in; + power_manager_in_t memory_subsystem_pwr_ctrl_in[core_v_mini_mcu_pkg::NUM_BANKS-1:0]; + power_manager_in_t external_subsystem_pwr_ctrl_in[EXT_DOMAINS_RND-1:0]; logic cpu_subsystem_rst_n; logic cpu_subsystem_powergate_iso_n; @@ -431,19 +431,19 @@ module core_v_mini_mcu logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_clkgate_en_n; //pwrgate exposed outside for UPF sim flow and switch cells - assign cpu_subsystem_powergate_switch_no = cpu_subsystem_pwr_ctrl_out.pwrgate_en_n; + assign cpu_subsystem_powergate_switch_no = cpu_subsystem_pwr_ctrl_out.pwrgate_en_n; assign cpu_subsystem_pwr_ctrl_in.pwrgate_ack_n = cpu_subsystem_powergate_switch_ack_ni; //isogate exposed outside for UPF sim flow and switch cells - assign cpu_subsystem_powergate_iso_n = cpu_subsystem_pwr_ctrl_out.isogate_en_n; - assign cpu_subsystem_rst_n = cpu_subsystem_pwr_ctrl_out.rst_n; + assign cpu_subsystem_powergate_iso_n = cpu_subsystem_pwr_ctrl_out.isogate_en_n; + assign cpu_subsystem_rst_n = cpu_subsystem_pwr_ctrl_out.rst_n; //pwrgate exposed both outside for UPF sim flow assign peripheral_subsystem_powergate_switch_no = peripheral_subsystem_pwr_ctrl_out.pwrgate_en_n; assign peripheral_subsystem_pwr_ctrl_in.pwrgate_ack_n = peripheral_subsystem_powergate_switch_ack_ni; //isogate exposed outside for UPF sim flow and switch cells assign peripheral_subsystem_powergate_iso_n = peripheral_subsystem_pwr_ctrl_out.isogate_en_n; - assign peripheral_subsystem_rst_n = peripheral_subsystem_pwr_ctrl_out.rst_n; - assign peripheral_subsystem_clkgate_en_n = peripheral_subsystem_pwr_ctrl_out.clkgate_en_n; + assign peripheral_subsystem_rst_n = peripheral_subsystem_pwr_ctrl_out.rst_n; + assign peripheral_subsystem_clkgate_en_n = peripheral_subsystem_pwr_ctrl_out.clkgate_en_n; assign memory_subsystem_banks_powergate_switch_n[0] = memory_subsystem_pwr_ctrl_out[0].pwrgate_en_n; assign memory_subsystem_pwr_ctrl_in[0].pwrgate_ack_n = memory_subsystem_banks_powergate_switch_ack_n[0]; @@ -633,11 +633,13 @@ module core_v_mini_mcu .spimemio_resp_o(flash_mem_slave_resp), .spi_flash_sck_o, .spi_flash_sck_en_o(spi_flash_sck_oe_o), - .spi_flash_csb_o({spi_flash_cs_1_o,spi_flash_cs_0_o}), + .spi_flash_csb_o({spi_flash_cs_1_o, spi_flash_cs_0_o}), .spi_flash_csb_en_o({spi_flash_cs_1_oe_o, spi_flash_cs_0_oe_o}), - .spi_flash_sd_o({spi_flash_sd_3_o,spi_flash_sd_2_o, spi_flash_sd_1_o, spi_flash_sd_0_o}), - .spi_flash_sd_en_o({spi_flash_sd_3_oe_o,spi_flash_sd_2_oe_o, spi_flash_sd_1_oe_o, spi_flash_sd_0_oe_o}), - .spi_flash_sd_i({spi_flash_sd_3_i,spi_flash_sd_2_i, spi_flash_sd_1_i, spi_flash_sd_0_i}), + .spi_flash_sd_o({spi_flash_sd_3_o, spi_flash_sd_2_o, spi_flash_sd_1_o, spi_flash_sd_0_o}), + .spi_flash_sd_en_o({ + spi_flash_sd_3_oe_o, spi_flash_sd_2_oe_o, spi_flash_sd_1_oe_o, spi_flash_sd_0_oe_o + }), + .spi_flash_sd_i({spi_flash_sd_3_i, spi_flash_sd_2_i, spi_flash_sd_1_i, spi_flash_sd_0_i}), .intr_i(intr), .intr_vector_ext_i, .core_sleep_i(core_sleep), @@ -718,11 +720,11 @@ module core_v_mini_mcu .cio_sda_en_o(i2c_sda_oe_o), .spi_sck_o, .spi_sck_en_o(spi_sck_oe_o), - .spi_csb_o({spi_cs_1_o,spi_cs_0_o}), + .spi_csb_o({spi_cs_1_o, spi_cs_0_o}), .spi_csb_en_o({spi_cs_1_oe_o, spi_cs_0_oe_o}), - .spi_sd_o({spi_sd_3_o,spi_sd_2_o, spi_sd_1_o, spi_sd_0_o}), - .spi_sd_en_o({spi_sd_3_oe_o,spi_sd_2_oe_o, spi_sd_1_oe_o, spi_sd_0_oe_o}), - .spi_sd_i({spi_sd_3_i,spi_sd_2_i, spi_sd_1_i, spi_sd_0_i}), + .spi_sd_o({spi_sd_3_o, spi_sd_2_o, spi_sd_1_o, spi_sd_0_o}), + .spi_sd_en_o({spi_sd_3_oe_o, spi_sd_2_oe_o, spi_sd_1_oe_o, spi_sd_0_oe_o}), + .spi_sd_i({spi_sd_3_i, spi_sd_2_i, spi_sd_1_i, spi_sd_0_i}), .spi_intr_event_o(spi_intr), .spi_rx_valid_o(spi_rx_valid), .spi_tx_ready_o(spi_tx_ready), @@ -752,8 +754,8 @@ module core_v_mini_mcu // Debug_req assign if (NRHARTS == 1) begin - assign debug_core_req = debug_req; - assign ext_debug_req_o = 1'b0; + assign debug_core_req = debug_req; + assign ext_debug_req_o = 1'b0; end else begin always @(*) begin for (int i = 0; i < NRHARTS; i++) begin @@ -764,106 +766,106 @@ module core_v_mini_mcu end assign ext_cpu_subsystem_rst_no = cpu_subsystem_rst_n; - assign ext_debug_reset_no = debug_reset_n; - - assign pdm2pcm_pdm_o = 0; - assign pdm2pcm_pdm_oe_o = 0; - - assign gpio_ao_in[0] = gpio_0_i; - assign gpio_0_o = gpio_ao_out[0]; - assign gpio_0_oe_o = gpio_ao_oe[0]; - assign gpio_ao_in[1] = gpio_1_i; - assign gpio_1_o = gpio_ao_out[1]; - assign gpio_1_oe_o = gpio_ao_oe[1]; - assign gpio_ao_in[2] = gpio_2_i; - assign gpio_2_o = gpio_ao_out[2]; - assign gpio_2_oe_o = gpio_ao_oe[2]; - assign gpio_ao_in[3] = gpio_3_i; - assign gpio_3_o = gpio_ao_out[3]; - assign gpio_3_oe_o = gpio_ao_oe[3]; - assign gpio_ao_in[4] = gpio_4_i; - assign gpio_4_o = gpio_ao_out[4]; - assign gpio_4_oe_o = gpio_ao_oe[4]; - assign gpio_ao_in[5] = gpio_5_i; - assign gpio_5_o = gpio_ao_out[5]; - assign gpio_5_oe_o = gpio_ao_oe[5]; - assign gpio_ao_in[6] = gpio_6_i; - assign gpio_6_o = gpio_ao_out[6]; - assign gpio_6_oe_o = gpio_ao_oe[6]; - assign gpio_ao_in[7] = gpio_7_i; - assign gpio_7_o = gpio_ao_out[7]; - assign gpio_7_oe_o = gpio_ao_oe[7]; - assign gpio_in[8] = gpio_8_i; - assign gpio_8_o = gpio_out[8]; - assign gpio_8_oe_o = gpio_oe[8]; - assign gpio_in[9] = gpio_9_i; - assign gpio_9_o = gpio_out[9]; - assign gpio_9_oe_o = gpio_oe[9]; - assign gpio_in[10] = gpio_10_i; - assign gpio_10_o = gpio_out[10]; - assign gpio_10_oe_o = gpio_oe[10]; - assign gpio_in[11] = gpio_11_i; - assign gpio_11_o = gpio_out[11]; - assign gpio_11_oe_o = gpio_oe[11]; - assign gpio_in[12] = gpio_12_i; - assign gpio_12_o = gpio_out[12]; - assign gpio_12_oe_o = gpio_oe[12]; - assign gpio_in[13] = gpio_13_i; - assign gpio_13_o = gpio_out[13]; - assign gpio_13_oe_o = gpio_oe[13]; - assign gpio_in[14] = gpio_14_i; - assign gpio_14_o = gpio_out[14]; - assign gpio_14_oe_o = gpio_oe[14]; - assign gpio_in[15] = gpio_15_i; - assign gpio_15_o = gpio_out[15]; - assign gpio_15_oe_o = gpio_oe[15]; - assign gpio_in[16] = gpio_16_i; - assign gpio_16_o = gpio_out[16]; - assign gpio_16_oe_o = gpio_oe[16]; - assign gpio_in[17] = gpio_17_i; - assign gpio_17_o = gpio_out[17]; - assign gpio_17_oe_o = gpio_oe[17]; - assign gpio_in[18] = gpio_18_i; - assign gpio_18_o = gpio_out[18]; - assign gpio_18_oe_o = gpio_oe[18]; - assign gpio_in[19] = gpio_19_i; - assign gpio_19_o = gpio_out[19]; - assign gpio_19_oe_o = gpio_oe[19]; - assign gpio_in[20] = gpio_20_i; - assign gpio_20_o = gpio_out[20]; - assign gpio_20_oe_o = gpio_oe[20]; - assign gpio_in[21] = gpio_21_i; - assign gpio_21_o = gpio_out[21]; - assign gpio_21_oe_o = gpio_oe[21]; - assign gpio_in[22] = gpio_22_i; - assign gpio_22_o = gpio_out[22]; - assign gpio_22_oe_o = gpio_oe[22]; - assign gpio_in[23] = gpio_23_i; - assign gpio_23_o = gpio_out[23]; - assign gpio_23_oe_o = gpio_oe[23]; - assign gpio_in[24] = gpio_24_i; - assign gpio_24_o = gpio_out[24]; - assign gpio_24_oe_o = gpio_oe[24]; - assign gpio_in[25] = gpio_25_i; - assign gpio_25_o = gpio_out[25]; - assign gpio_25_oe_o = gpio_oe[25]; - assign gpio_in[26] = gpio_26_i; - assign gpio_26_o = gpio_out[26]; - assign gpio_26_oe_o = gpio_oe[26]; - assign gpio_in[27] = gpio_27_i; - assign gpio_27_o = gpio_out[27]; - assign gpio_27_oe_o = gpio_oe[27]; - assign gpio_in[28] = gpio_28_i; - assign gpio_28_o = gpio_out[28]; - assign gpio_28_oe_o = gpio_oe[28]; - assign gpio_in[29] = gpio_29_i; - assign gpio_29_o = gpio_out[29]; - assign gpio_29_oe_o = gpio_oe[29]; - assign gpio_in[30] = gpio_30_i; - assign gpio_30_o = gpio_out[30]; - assign gpio_30_oe_o = gpio_oe[30]; - assign gpio_in[31] = gpio_31_i; - assign gpio_31_o = gpio_out[31]; - assign gpio_31_oe_o = gpio_oe[31]; + assign ext_debug_reset_no = debug_reset_n; + + assign pdm2pcm_pdm_o = 0; + assign pdm2pcm_pdm_oe_o = 0; + + assign gpio_ao_in[0] = gpio_0_i; + assign gpio_0_o = gpio_ao_out[0]; + assign gpio_0_oe_o = gpio_ao_oe[0]; + assign gpio_ao_in[1] = gpio_1_i; + assign gpio_1_o = gpio_ao_out[1]; + assign gpio_1_oe_o = gpio_ao_oe[1]; + assign gpio_ao_in[2] = gpio_2_i; + assign gpio_2_o = gpio_ao_out[2]; + assign gpio_2_oe_o = gpio_ao_oe[2]; + assign gpio_ao_in[3] = gpio_3_i; + assign gpio_3_o = gpio_ao_out[3]; + assign gpio_3_oe_o = gpio_ao_oe[3]; + assign gpio_ao_in[4] = gpio_4_i; + assign gpio_4_o = gpio_ao_out[4]; + assign gpio_4_oe_o = gpio_ao_oe[4]; + assign gpio_ao_in[5] = gpio_5_i; + assign gpio_5_o = gpio_ao_out[5]; + assign gpio_5_oe_o = gpio_ao_oe[5]; + assign gpio_ao_in[6] = gpio_6_i; + assign gpio_6_o = gpio_ao_out[6]; + assign gpio_6_oe_o = gpio_ao_oe[6]; + assign gpio_ao_in[7] = gpio_7_i; + assign gpio_7_o = gpio_ao_out[7]; + assign gpio_7_oe_o = gpio_ao_oe[7]; + assign gpio_in[8] = gpio_8_i; + assign gpio_8_o = gpio_out[8]; + assign gpio_8_oe_o = gpio_oe[8]; + assign gpio_in[9] = gpio_9_i; + assign gpio_9_o = gpio_out[9]; + assign gpio_9_oe_o = gpio_oe[9]; + assign gpio_in[10] = gpio_10_i; + assign gpio_10_o = gpio_out[10]; + assign gpio_10_oe_o = gpio_oe[10]; + assign gpio_in[11] = gpio_11_i; + assign gpio_11_o = gpio_out[11]; + assign gpio_11_oe_o = gpio_oe[11]; + assign gpio_in[12] = gpio_12_i; + assign gpio_12_o = gpio_out[12]; + assign gpio_12_oe_o = gpio_oe[12]; + assign gpio_in[13] = gpio_13_i; + assign gpio_13_o = gpio_out[13]; + assign gpio_13_oe_o = gpio_oe[13]; + assign gpio_in[14] = gpio_14_i; + assign gpio_14_o = gpio_out[14]; + assign gpio_14_oe_o = gpio_oe[14]; + assign gpio_in[15] = gpio_15_i; + assign gpio_15_o = gpio_out[15]; + assign gpio_15_oe_o = gpio_oe[15]; + assign gpio_in[16] = gpio_16_i; + assign gpio_16_o = gpio_out[16]; + assign gpio_16_oe_o = gpio_oe[16]; + assign gpio_in[17] = gpio_17_i; + assign gpio_17_o = gpio_out[17]; + assign gpio_17_oe_o = gpio_oe[17]; + assign gpio_in[18] = gpio_18_i; + assign gpio_18_o = gpio_out[18]; + assign gpio_18_oe_o = gpio_oe[18]; + assign gpio_in[19] = gpio_19_i; + assign gpio_19_o = gpio_out[19]; + assign gpio_19_oe_o = gpio_oe[19]; + assign gpio_in[20] = gpio_20_i; + assign gpio_20_o = gpio_out[20]; + assign gpio_20_oe_o = gpio_oe[20]; + assign gpio_in[21] = gpio_21_i; + assign gpio_21_o = gpio_out[21]; + assign gpio_21_oe_o = gpio_oe[21]; + assign gpio_in[22] = gpio_22_i; + assign gpio_22_o = gpio_out[22]; + assign gpio_22_oe_o = gpio_oe[22]; + assign gpio_in[23] = gpio_23_i; + assign gpio_23_o = gpio_out[23]; + assign gpio_23_oe_o = gpio_oe[23]; + assign gpio_in[24] = gpio_24_i; + assign gpio_24_o = gpio_out[24]; + assign gpio_24_oe_o = gpio_oe[24]; + assign gpio_in[25] = gpio_25_i; + assign gpio_25_o = gpio_out[25]; + assign gpio_25_oe_o = gpio_oe[25]; + assign gpio_in[26] = gpio_26_i; + assign gpio_26_o = gpio_out[26]; + assign gpio_26_oe_o = gpio_oe[26]; + assign gpio_in[27] = gpio_27_i; + assign gpio_27_o = gpio_out[27]; + assign gpio_27_oe_o = gpio_oe[27]; + assign gpio_in[28] = gpio_28_i; + assign gpio_28_o = gpio_out[28]; + assign gpio_28_oe_o = gpio_oe[28]; + assign gpio_in[29] = gpio_29_i; + assign gpio_29_o = gpio_out[29]; + assign gpio_29_oe_o = gpio_oe[29]; + assign gpio_in[30] = gpio_30_i; + assign gpio_30_o = gpio_out[30]; + assign gpio_30_oe_o = gpio_oe[30]; + assign gpio_in[31] = gpio_31_i; + assign gpio_31_o = gpio_out[31]; + assign gpio_31_oe_o = gpio_oe[31]; endmodule // core_v_mini_mcu diff --git a/hw/core-v-mini-mcu/peripheral_subsystem.sv b/hw/core-v-mini-mcu/peripheral_subsystem.sv index 8faf52003..4fa663e66 100644 --- a/hw/core-v-mini-mcu/peripheral_subsystem.sv +++ b/hw/core-v-mini-mcu/peripheral_subsystem.sv @@ -7,7 +7,7 @@ module peripheral_subsystem import reg_pkg::*; #( //do not touch these parameters - parameter NEXT_INT_RND = core_v_mini_mcu_pkg::NEXT_INT == 0 ? 1 : core_v_mini_mcu_pkg::NEXT_INT + parameter NEXT_INT_RND = core_v_mini_mcu_pkg::NEXT_INT == 0 ? 1 : core_v_mini_mcu_pkg::NEXT_INT ) ( input logic clk_i, input logic rst_ni, @@ -20,8 +20,8 @@ module peripheral_subsystem //PLIC input logic [NEXT_INT_RND-1:0] intr_vector_ext_i, - output logic irq_plic_o, - output logic msip_o, + output logic irq_plic_o, + output logic msip_o, //UART PLIC interrupts input logic uart_intr_tx_watermark_i, @@ -172,7 +172,7 @@ module peripheral_subsystem assign intr_vector[48] = i2c_intr_host_timeout; assign intr_vector[49] = spi2_intr_event; assign intr_vector[50] = i2s_intr_event; - assign intr_vector[51] = dma_window_intr_i; + assign intr_vector[51] = dma_window_intr_i; // External interrupts assignement for (genvar i = 0; i < NEXT_INT; i++) begin @@ -202,18 +202,18 @@ module peripheral_subsystem `else - obi_pkg::obi_req_t slave_fifoin_req; + obi_pkg::obi_req_t slave_fifoin_req; obi_pkg::obi_resp_t slave_fifoin_resp; - obi_pkg::obi_req_t slave_fifoout_req; + obi_pkg::obi_req_t slave_fifoout_req; obi_pkg::obi_resp_t slave_fifoout_resp; obi_fifo obi_fifo_i ( .clk_i(clk_cg), .rst_ni, - .producer_req_i (slave_fifoin_req), + .producer_req_i(slave_fifoin_req), .producer_resp_o(slave_fifoin_resp), - .consumer_req_o (slave_fifoout_req), + .consumer_req_o(slave_fifoout_req), .consumer_resp_i(slave_fifoout_resp) );