From 72fa63831c35dff28bf26c60e5621f96bed844c1 Mon Sep 17 00:00:00 2001 From: Marc Bornand Date: Mon, 20 May 2024 11:55:39 +0200 Subject: [PATCH] remove generated files --- .gitignore | 4 + hw/core-v-mini-mcu/ao_peripheral_subsystem.sv | 359 -------- hw/core-v-mini-mcu/core_v_mini_mcu.sv | 356 -------- hw/core-v-mini-mcu/generated_if.sv | 802 ------------------ hw/core-v-mini-mcu/peripheral_subsystem.sv | 795 ----------------- 5 files changed, 4 insertions(+), 2312 deletions(-) delete mode 100644 hw/core-v-mini-mcu/ao_peripheral_subsystem.sv delete mode 100644 hw/core-v-mini-mcu/core_v_mini_mcu.sv delete mode 100644 hw/core-v-mini-mcu/generated_if.sv delete mode 100644 hw/core-v-mini-mcu/peripheral_subsystem.sv diff --git a/.gitignore b/.gitignore index b044dec60..d21215668 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,10 @@ hw/core-v-mini-mcu/include/core_v_mini_mcu_pkg.sv hw/core-v-mini-mcu/system_bus.sv hw/core-v-mini-mcu/system_xbar.sv hw/core-v-mini-mcu/memory_subsystem.sv +hw/core-v-mini-mcu/ao_peripheral_subsystem.sv +hw/core-v-mini-mcu/core_v_mini_mcu.sv +hw/core-v-mini-mcu/peripheral_subsystem.sv +hw/core-v-mini-mcu/generated_if.sv hw/system/x_heep_system.sv hw/system/pad_ring.sv tb/tb_util.svh diff --git a/hw/core-v-mini-mcu/ao_peripheral_subsystem.sv b/hw/core-v-mini-mcu/ao_peripheral_subsystem.sv deleted file mode 100644 index 56c113fc8..000000000 --- a/hw/core-v-mini-mcu/ao_peripheral_subsystem.sv +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2022 OpenHW Group -// Solderpad Hardware License, Version 2.1, see LICENSE.md for details. -// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 - -module ao_peripheral_subsystem - import obi_pkg::*; - import reg_pkg::*; -#( - //do not touch these parameters - parameter EXT_DOMAINS_RND = core_v_mini_mcu_pkg::EXTERNAL_DOMAINS == 0 ? 1 : core_v_mini_mcu_pkg::EXTERNAL_DOMAINS, - 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, - - input obi_req_t slave_req_i, - output obi_resp_t slave_resp_o, - - // SOC CTRL - output logic [31:0] exit_value_o, - - // Memory Map SPI Region - input obi_req_t spimemio_req_i, - output obi_resp_t spimemio_resp_o, - - // POWER MANAGER - input logic [31:0] intr_i, - input logic [NEXT_INT_RND-1:0] intr_vector_ext_i, - input logic core_sleep_i, - output logic cpu_subsystem_powergate_switch_no, - input logic cpu_subsystem_powergate_switch_ack_ni, - output logic cpu_subsystem_powergate_iso_no, - output logic cpu_subsystem_rst_no, - output logic peripheral_subsystem_powergate_switch_no, - input logic peripheral_subsystem_powergate_switch_ack_ni, - output logic peripheral_subsystem_powergate_iso_no, - output logic peripheral_subsystem_rst_no, - output logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_powergate_switch_no, - input logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_powergate_switch_ack_ni, - output logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_powergate_iso_no, - output logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_set_retentive_no, - 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, - 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_DOMAINS_RND-1:0] external_ram_banks_set_retentive_no, - - // Clock gating signals - output logic peripheral_subsystem_clkgate_en_no, - output logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_clkgate_en_no, - output logic [EXT_DOMAINS_RND-1:0] external_subsystem_clkgate_en_no, - - // DMA - output obi_req_t dma_read_ch0_req_o, - input obi_resp_t dma_read_ch0_resp_i, - output obi_req_t dma_write_ch0_req_o, - input obi_resp_t dma_write_ch0_resp_i, - output obi_req_t dma_addr_ch0_req_o, - input obi_resp_t dma_addr_ch0_resp_i, - - // External PADs - output reg_req_t pad_req_o, - input reg_rsp_t pad_resp_i, - - // FAST INTR CTRL - input logic [14:0] fast_intr_i, - output logic [14:0] fast_intr_o, - - // EXTERNAL PERIPH - output reg_req_t ext_peripheral_slave_req_o, - input reg_rsp_t ext_peripheral_slave_resp_i, - - if_bundle__ao_periph__pd_peripheral.ao_periph bundle__ao_periph__pd_peripheral__if, - if_bundle__ao_periph__root.ao_periph bundle__ao_periph__root__if, - if_bundle__ao_periph__core_v_mini_mcu.ao_periph bundle__ao_periph__core_v_mini_mcu__if, - if_bundle__ao_periph__pad_ring.ao_periph bundle__ao_periph__pad_ring__if -); - - import core_v_mini_mcu_pkg::*; - import tlul_pkg::*; - import rv_plic_reg_pkg::*; - - reg_pkg::reg_req_t peripheral_req; - reg_pkg::reg_rsp_t peripheral_rsp; - - reg_pkg::reg_req_t [core_v_mini_mcu_pkg::AO_PERIPHERAL_COUNT-1:0] ao_peripheral_slv_req; - reg_pkg::reg_rsp_t [core_v_mini_mcu_pkg::AO_PERIPHERAL_COUNT-1:0] ao_peripheral_slv_rsp; - - tlul_pkg::tl_h2d_t rv_timer_tl_h2d; - tlul_pkg::tl_d2h_t rv_timer_tl_d2h; - - logic [AO_PERIPHERAL_PORT_SEL_WIDTH-1:0] peripheral_select; - - logic use_spimemio; - - logic spi_flash_dma_rx_valid; - logic spi_flash_dma_tx_valid; - - - obi_pkg::obi_req_t slave_fifo_req_sel; - obi_pkg::obi_resp_t slave_fifo_resp_sel; - - assign ext_peripheral_slave_req_o = ao_peripheral_slv_req[core_v_mini_mcu_pkg::EXT_PERIPHERAL_IDX]; - assign ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::EXT_PERIPHERAL_IDX] = ext_peripheral_slave_resp_i; - -`ifdef REMOVE_OBI_FIFO - - assign slave_fifo_req_sel = slave_req_i; - assign slave_resp_o = slave_fifo_resp_sel; - -`else - - 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_resp_t slave_fifoout_resp; - - obi_fifo obi_fifo_i ( - .clk_i, - .rst_ni, - .producer_req_i (slave_fifoin_req), - .producer_resp_o(slave_fifoin_resp), - .consumer_req_o (slave_fifoout_req), - .consumer_resp_i(slave_fifoout_resp) - ); - - assign slave_fifo_req_sel = slave_fifoout_req; - assign slave_fifoout_resp = slave_fifo_resp_sel; - assign slave_fifoin_req = slave_req_i; - assign slave_resp_o = slave_fifoin_resp; - -`endif - - periph_to_reg #( - .req_t(reg_pkg::reg_req_t), - .rsp_t(reg_pkg::reg_rsp_t), - .IW(1) - ) periph_to_reg_i ( - .clk_i, - .rst_ni, - .req_i(slave_fifo_req_sel.req), - .add_i(slave_fifo_req_sel.addr), - .wen_i(~slave_fifo_req_sel.we), - .wdata_i(slave_fifo_req_sel.wdata), - .be_i(slave_fifo_req_sel.be), - .id_i('0), - .gnt_o(slave_fifo_resp_sel.gnt), - .r_rdata_o(slave_fifo_resp_sel.rdata), - .r_opc_o(), - .r_id_o(), - .r_valid_o(slave_fifo_resp_sel.rvalid), - .reg_req_o(peripheral_req), - .reg_rsp_i(peripheral_rsp) - ); - - addr_decode #( - .NoIndices(core_v_mini_mcu_pkg::AO_PERIPHERAL_COUNT), - .NoRules(core_v_mini_mcu_pkg::AO_PERIPHERAL_COUNT), - .addr_t(logic [31:0]), - .rule_t(addr_map_rule_pkg::addr_map_rule_t) - ) i_addr_decode_soc_regbus_periph_xbar ( - .addr_i(peripheral_req.addr), - .addr_map_i(core_v_mini_mcu_pkg::AO_PERIPHERAL_ADDR_RULES), - .idx_o(peripheral_select), - .dec_valid_o(), - .dec_error_o(), - .en_default_idx_i(1'b0), - .default_idx_i('0) - ); - - reg_demux #( - .NoPorts(core_v_mini_mcu_pkg::AO_PERIPHERAL_COUNT), - .req_t (reg_pkg::reg_req_t), - .rsp_t (reg_pkg::reg_rsp_t) - ) reg_demux_i ( - .clk_i, - .rst_ni, - .in_select_i(peripheral_select), - .in_req_i(peripheral_req), - .in_rsp_o(peripheral_rsp), - .out_req_o(ao_peripheral_slv_req), - .out_rsp_i(ao_peripheral_slv_rsp) - ); - - soc_ctrl #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) soc_ctrl_i ( - .clk_i, - .rst_ni, - .reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::SOC_CTRL_IDX]), - .reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::SOC_CTRL_IDX]), - .boot_select_i(bundle__ao_periph__pad_ring__if.boot_select), - .execute_from_flash_i(bundle__ao_periph__pad_ring__if.execute_from_flash), - .use_spimemio_o(use_spimemio), - .exit_valid_o(bundle__ao_periph__pad_ring__if.exit_valid), - .exit_value_o - ); - - boot_rom boot_rom_i ( - .reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::BOOTROM_IDX]), - .reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::BOOTROM_IDX]) - ); - - spi_subsystem spi_subsystem_i ( - .clk_i, - .rst_ni, - .use_spimemio_i(use_spimemio), - .spimemio_req_i, - .spimemio_resp_o, - .yo_reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::SPI_MEMIO_IDX]), - .yo_reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::SPI_MEMIO_IDX]), - .ot_reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::SPI_FLASH_IDX]), - .ot_reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::SPI_FLASH_IDX]), - .spi_flash_sck_o(bundle__ao_periph__pad_ring__if.spi_flash_sck_o), - .spi_flash_sck_en_o(bundle__ao_periph__pad_ring__if.spi_flash_sck_en_o), - .spi_flash_csb_o({ - bundle__ao_periph__pad_ring__if.spi_flash_csb_1_o, - bundle__ao_periph__pad_ring__if.spi_flash_csb_0_o - }), - .spi_flash_csb_en_o({ - bundle__ao_periph__pad_ring__if.spi_flash_csb_1_en_o, - bundle__ao_periph__pad_ring__if.spi_flash_csb_0_en_o - }), - .spi_flash_sd_o({ - bundle__ao_periph__pad_ring__if.spi_flash_sd_3_o, - bundle__ao_periph__pad_ring__if.spi_flash_sd_2_o, - bundle__ao_periph__pad_ring__if.spi_flash_sd_1_o, - bundle__ao_periph__pad_ring__if.spi_flash_sd_0_o - }), - .spi_flash_sd_en_o({ - bundle__ao_periph__pad_ring__if.spi_flash_sd_3_en_o, - bundle__ao_periph__pad_ring__if.spi_flash_sd_2_en_o, - bundle__ao_periph__pad_ring__if.spi_flash_sd_1_en_o, - bundle__ao_periph__pad_ring__if.spi_flash_sd_0_en_o - }), - .spi_flash_sd_i({ - bundle__ao_periph__pad_ring__if.spi_flash_sd_3_i, - bundle__ao_periph__pad_ring__if.spi_flash_sd_2_i, - bundle__ao_periph__pad_ring__if.spi_flash_sd_1_i, - bundle__ao_periph__pad_ring__if.spi_flash_sd_0_i - }), - .spi_flash_intr_error_o(), - .spi_flash_intr_event_o(bundle__ao_periph__core_v_mini_mcu__if.spi_flash_intr), - .spi_flash_rx_valid_o(spi_flash_dma_rx_valid), - .spi_flash_tx_ready_o(spi_flash_dma_tx_valid) - ); - - power_manager #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) power_manager_i ( - .clk_i, - .rst_ni, - .reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::POWER_MANAGER_IDX]), - .reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::POWER_MANAGER_IDX]), - .intr_i, - .ext_irq_i(intr_vector_ext_i), - .core_sleep_i, - .cpu_subsystem_powergate_switch_no, - .cpu_subsystem_powergate_switch_ack_ni, - .cpu_subsystem_powergate_iso_no, - .cpu_subsystem_rst_no, - .peripheral_subsystem_powergate_switch_no, - .peripheral_subsystem_powergate_switch_ack_ni, - .peripheral_subsystem_powergate_iso_no, - .peripheral_subsystem_rst_no, - .memory_subsystem_banks_powergate_switch_no, - .memory_subsystem_banks_powergate_switch_ack_ni, - .memory_subsystem_banks_powergate_iso_no, - .memory_subsystem_banks_set_retentive_no, - .external_subsystem_powergate_switch_no, - .external_subsystem_powergate_switch_ack_ni, - .external_subsystem_powergate_iso_no, - .external_subsystem_rst_no, - .external_ram_banks_set_retentive_no, - .peripheral_subsystem_clkgate_en_no, - .memory_subsystem_clkgate_en_no, - .external_subsystem_clkgate_en_no - ); - - reg_to_tlul #( - .req_t(reg_pkg::reg_req_t), - .rsp_t(reg_pkg::reg_rsp_t), - .tl_h2d_t(tlul_pkg::tl_h2d_t), - .tl_d2h_t(tlul_pkg::tl_d2h_t), - .tl_a_user_t(tlul_pkg::tl_a_user_t), - .tl_a_op_e(tlul_pkg::tl_a_op_e), - .TL_A_USER_DEFAULT(tlul_pkg::TL_A_USER_DEFAULT), - .PutFullData(tlul_pkg::PutFullData), - .Get(tlul_pkg::Get) - ) rv_timer_reg_to_tlul_i ( - .tl_o(rv_timer_tl_h2d), - .tl_i(rv_timer_tl_d2h), - .reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::RV_TIMER_AO_IDX]), - .reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::RV_TIMER_AO_IDX]) - ); - - rv_timer rv_timer_0_1_i ( - .clk_i, - .rst_ni, - .tl_i(rv_timer_tl_h2d), - .tl_o(rv_timer_tl_d2h), - .intr_timer_expired_0_0_o(bundle__ao_periph__core_v_mini_mcu__if.rv_timer_0_intr), - .intr_timer_expired_1_0_o(bundle__ao_periph__core_v_mini_mcu__if.rv_timer_1_intr) - ); - - parameter DMA_TRIGGER_SLOT_NUM = 7; - logic [DMA_TRIGGER_SLOT_NUM-1:0] dma_trigger_slots; - assign dma_trigger_slots = { - bundle__ao_periph__pd_peripheral__if.i2s_0_rx_valid, - bundle__ao_periph__pd_peripheral__if.spi_host_0_tx_valid, - bundle__ao_periph__pd_peripheral__if.spi_host_0_rx_valid, - bundle__ao_periph__root__if.dma_ext_tx, - bundle__ao_periph__root__if.dma_ext_rx, - spi_flash_dma_tx_valid, - spi_flash_dma_rx_valid - }; - - dma #( - .reg_req_t (reg_pkg::reg_req_t), - .reg_rsp_t (reg_pkg::reg_rsp_t), - .obi_req_t (obi_pkg::obi_req_t), - .obi_resp_t(obi_pkg::obi_resp_t), - .SLOT_NUM (DMA_TRIGGER_SLOT_NUM) - ) dma_i ( - .clk_i, - .rst_ni, - .reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::DMA_IDX]), - .reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::DMA_IDX]), - .dma_read_ch0_req_o, - .dma_read_ch0_resp_i, - .dma_write_ch0_req_o, - .dma_write_ch0_resp_i, - .dma_addr_ch0_req_o, - .dma_addr_ch0_resp_i, - .trigger_slot_i(dma_trigger_slots), - .dma_done_intr_o(bundle__ao_periph__core_v_mini_mcu__if.dma_done_intr), - .dma_window_intr_o(bundle__ao_periph__pd_peripheral__if.dma_window_intr) - ); - - assign pad_req_o = ao_peripheral_slv_req[core_v_mini_mcu_pkg::PAD_CONTROL_IDX]; - assign ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::PAD_CONTROL_IDX] = pad_resp_i; - - fast_intr_ctrl #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) fast_intr_ctrl_i ( - .clk_i, - .rst_ni, - .reg_req_i(ao_peripheral_slv_req[core_v_mini_mcu_pkg::FAST_INTR_CTRL_IDX]), - .reg_rsp_o(ao_peripheral_slv_rsp[core_v_mini_mcu_pkg::FAST_INTR_CTRL_IDX]), - .fast_intr_i, - .fast_intr_o - ); - - -endmodule : ao_peripheral_subsystem diff --git a/hw/core-v-mini-mcu/core_v_mini_mcu.sv b/hw/core-v-mini-mcu/core_v_mini_mcu.sv deleted file mode 100644 index 1b143733b..000000000 --- a/hw/core-v-mini-mcu/core_v_mini_mcu.sv +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright 2022 OpenHW Group -// Solderpad Hardware License, Version 2.1, see LICENSE.md for details. -// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 - -module core_v_mini_mcu - import obi_pkg::*; - import reg_pkg::*; -#( - parameter COREV_PULP = 0, - parameter FPU = 0, - parameter ZFINX = 0, - parameter EXT_XBAR_NMASTER = 0, - parameter X_EXT = 0, // eXtension interface in cv32e40x - //do not touch these parameters - parameter EXT_XBAR_NMASTER_RND = EXT_XBAR_NMASTER == 0 ? 1 : EXT_XBAR_NMASTER, - parameter EXT_DOMAINS_RND = core_v_mini_mcu_pkg::EXTERNAL_DOMAINS == 0 ? 1 : core_v_mini_mcu_pkg::EXTERNAL_DOMAINS, - parameter NEXT_INT_RND = core_v_mini_mcu_pkg::NEXT_INT == 0 ? 1 : core_v_mini_mcu_pkg::NEXT_INT -) ( - - input logic rst_ni, - input logic clk_i, - - - // eXtension interface - if_xif.cpu_compressed xif_compressed_if, - if_xif.cpu_issue xif_issue_if, - if_xif.cpu_commit xif_commit_if, - if_xif.cpu_mem xif_mem_if, - if_xif.cpu_mem_result xif_mem_result_if, - if_xif.cpu_result xif_result_if, - - output reg_req_t pad_req_o, - input reg_rsp_t pad_resp_i, - - 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, - - // 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_ch0_req_o, - input obi_resp_t ext_dma_read_ch0_resp_i, - output obi_req_t ext_dma_write_ch0_req_o, - input obi_resp_t ext_dma_write_ch0_resp_i, - output obi_req_t ext_dma_addr_ch0_req_o, - input obi_resp_t ext_dma_addr_ch0_resp_i, - - output reg_req_t ext_peripheral_slave_req_o, - input reg_rsp_t ext_peripheral_slave_resp_i, - - input logic [NEXT_INT_RND-1:0] intr_vector_ext_i, - - output logic cpu_subsystem_powergate_switch_no, - input logic cpu_subsystem_powergate_switch_ack_ni, - output logic peripheral_subsystem_powergate_switch_no, - input logic peripheral_subsystem_powergate_switch_ack_ni, - output logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_powergate_switch_no, - input logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_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, - 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_DOMAINS_RND-1:0] external_ram_banks_set_retentive_no, - output logic [EXT_DOMAINS_RND-1:0] external_subsystem_clkgate_en_no, - - output logic [31:0] exit_value_o, - - if_bundle__core_v_mini_mcu__pad_ring.core_v_mini_mcu bundle__core_v_mini_mcu__pad_ring__if, - if_bundle__ao_periph__pad_ring.ao_periph bundle__ao_periph__pad_ring__if, - if_bundle__ao_periph__root.ao_periph bundle__ao_periph__root__if, - if_bundle__pad_ring__pd_peripheral.pd_peripheral bundle__pad_ring__pd_peripheral__if, - if_bundle__pd_peripheral__root.pd_peripheral bundle__pd_peripheral__root__if -); - - import core_v_mini_mcu_pkg::*; - import cv32e40p_apu_core_pkg::*; - - localparam NUM_BYTES = core_v_mini_mcu_pkg::MEM_SIZE; - 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 BOOT_ADDR = core_v_mini_mcu_pkg::BOOTROM_START_ADDRESS; - localparam NUM_MHPMCOUNTERS = 1; - - // Log top level parameter values -`ifndef SYNTHESIS - initial begin - $display("[X-HEEP]: NUM_BYTES = %dKB", NUM_BYTES / 1024); - end -`endif - - // masters signals - obi_req_t core_instr_req; - obi_resp_t core_instr_resp; - obi_req_t core_data_req; - obi_resp_t core_data_resp; - obi_req_t debug_master_req; - obi_resp_t debug_master_resp; - obi_req_t dma_read_ch0_req; - obi_resp_t dma_read_ch0_resp; - obi_req_t dma_write_ch0_req; - obi_resp_t dma_write_ch0_resp; - obi_req_t dma_addr_ch0_req; - obi_resp_t dma_addr_ch0_resp; - - // ram signals - obi_req_t [core_v_mini_mcu_pkg::NUM_BANKS-1:0] ram_slave_req; - obi_resp_t [core_v_mini_mcu_pkg::NUM_BANKS-1:0] ram_slave_resp; - - // debug signals - obi_req_t debug_slave_req; - obi_resp_t debug_slave_resp; - - // peripherals signals - obi_req_t ao_peripheral_slave_req; - obi_resp_t ao_peripheral_slave_resp; - obi_req_t peripheral_slave_req; - obi_resp_t peripheral_slave_resp; - - // signals to debug unit - logic debug_core_req; - logic debug_reset_n; - - // core - logic core_sleep; - - // irq signals - logic irq_ack; - logic [4:0] irq_id_out; - logic [14:0] irq_fast; - - // Memory Map SPI Region - obi_req_t flash_mem_slave_req; - obi_resp_t flash_mem_slave_resp; - - // interrupt array - logic [31:0] intr; - logic [14:0] fast_intr; - - // Power manager - logic cpu_subsystem_powergate_iso_n; - logic cpu_subsystem_rst_n; - logic peripheral_subsystem_powergate_iso_n; - logic peripheral_subsystem_rst_n; - logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_powergate_iso_n; - logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_banks_set_retentive_n; - - // Clock gating signals - logic peripheral_subsystem_clkgate_en_n; - logic [core_v_mini_mcu_pkg::NUM_BANKS-1:0] memory_subsystem_clkgate_en_n; - - - // Auto generated - if_bundle__ao_periph__pd_peripheral bundle__ao_periph__pd_peripheral__if; - if_bundle__core_v_mini_mcu__pd_peripheral bundle__core_v_mini_mcu__pd_peripheral__if; - if_bundle__ao_periph__core_v_mini_mcu bundle__ao_periph__core_v_mini_mcu__if; - - assign intr = { - 1'b0, - irq_fast, - 4'b0, - bundle__core_v_mini_mcu__pd_peripheral__if.rv_plic_0_irq, - 3'b0, - bundle__ao_periph__core_v_mini_mcu__if.rv_timer_0_intr, - 3'b0, - bundle__core_v_mini_mcu__pd_peripheral__if.rv_plic_0_msip, - 3'b0 - }; - - assign fast_intr = { - 1'b0, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_7_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_6_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_5_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_4_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_3_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_2_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_1_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.gpio_0_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.spi_host_0_spi_event_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.rv_timer_2_3_timer_expired_1_0_intr_o, - bundle__core_v_mini_mcu__pd_peripheral__if.rv_timer_2_3_timer_expired_0_0_intr_o, - bundle__ao_periph__core_v_mini_mcu__if.dma_done_intr, - bundle__ao_periph__core_v_mini_mcu__if.rv_timer_1_intr, - bundle__ao_periph__core_v_mini_mcu__if.spi_flash_intr - }; - - - cpu_subsystem #( - .BOOT_ADDR(BOOT_ADDR), - .COREV_PULP(COREV_PULP), - .FPU(FPU), - .ZFINX(ZFINX), - .NUM_MHPMCOUNTERS(NUM_MHPMCOUNTERS), - .DM_HALTADDRESS(DM_HALTADDRESS), - .X_EXT(X_EXT) - ) cpu_subsystem_i ( - // Clock and Reset - .clk_i, - .rst_ni(cpu_subsystem_rst_n && debug_reset_n), - .core_instr_req_o(core_instr_req), - .core_instr_resp_i(core_instr_resp), - .core_data_req_o(core_data_req), - .core_data_resp_i(core_data_resp), - .xif_compressed_if, - .xif_issue_if, - .xif_commit_if, - .xif_mem_if, - .xif_mem_result_if, - .xif_result_if, - .irq_i(intr), - .irq_ack_o(irq_ack), - .irq_id_o(irq_id_out), - .debug_req_i(debug_core_req), - .core_sleep_o(core_sleep) - ); - - debug_subsystem #( - .JTAG_IDCODE(JTAG_IDCODE) - ) debug_subsystem_i ( - .clk_i, - .rst_ni, - .jtag_tck_i(bundle__core_v_mini_mcu__pad_ring__if.jtag_tck), - .jtag_tms_i(bundle__core_v_mini_mcu__pad_ring__if.jtag_tms), - .jtag_trst_ni(bundle__core_v_mini_mcu__pad_ring__if.jtag_trst_n), - .jtag_tdi_i(bundle__core_v_mini_mcu__pad_ring__if.jtag_tdi), - .jtag_tdo_o(bundle__core_v_mini_mcu__pad_ring__if.jtag_tdo), - .debug_core_req_o(debug_core_req), - .debug_ndmreset_no(debug_reset_n), - .debug_slave_req_i(debug_slave_req), - .debug_slave_resp_o(debug_slave_resp), - .debug_master_req_o(debug_master_req), - .debug_master_resp_i(debug_master_resp) - ); - - system_bus #( - .NUM_BANKS(core_v_mini_mcu_pkg::NUM_BANKS), - .EXT_XBAR_NMASTER(EXT_XBAR_NMASTER) - ) system_bus_i ( - .clk_i, - .rst_ni(rst_ni && debug_reset_n), - .core_instr_req_i(core_instr_req), - .core_instr_resp_o(core_instr_resp), - .core_data_req_i(core_data_req), - .core_data_resp_o(core_data_resp), - .debug_master_req_i(debug_master_req), - .debug_master_resp_o(debug_master_resp), - .dma_read_ch0_req_i(dma_read_ch0_req), - .dma_read_ch0_resp_o(dma_read_ch0_resp), - .dma_write_ch0_req_i(dma_write_ch0_req), - .dma_write_ch0_resp_o(dma_write_ch0_resp), - .dma_addr_ch0_req_i(dma_addr_ch0_req), - .dma_addr_ch0_resp_o(dma_addr_ch0_resp), - .ext_xbar_master_req_i(ext_xbar_master_req_i), - .ext_xbar_master_resp_o(ext_xbar_master_resp_o), - .ram_req_o(ram_slave_req), - .ram_resp_i(ram_slave_resp), - .debug_slave_req_o(debug_slave_req), - .debug_slave_resp_i(debug_slave_resp), - .ao_peripheral_slave_req_o(ao_peripheral_slave_req), - .ao_peripheral_slave_resp_i(ao_peripheral_slave_resp), - .peripheral_slave_req_o(peripheral_slave_req), - .peripheral_slave_resp_i(peripheral_slave_resp), - .flash_mem_slave_req_o(flash_mem_slave_req), - .flash_mem_slave_resp_i(flash_mem_slave_resp), - .ext_core_instr_req_o(ext_core_instr_req_o), - .ext_core_instr_resp_i(ext_core_instr_resp_i), - .ext_core_data_req_o(ext_core_data_req_o), - .ext_core_data_resp_i(ext_core_data_resp_i), - .ext_debug_master_req_o(ext_debug_master_req_o), - .ext_debug_master_resp_i(ext_debug_master_resp_i), - .ext_dma_read_ch0_req_o(ext_dma_read_ch0_req_o), - .ext_dma_read_ch0_resp_i(ext_dma_read_ch0_resp_i), - .ext_dma_write_ch0_req_o(ext_dma_write_ch0_req_o), - .ext_dma_write_ch0_resp_i(ext_dma_write_ch0_resp_i), - .ext_dma_addr_ch0_req_o(ext_dma_addr_ch0_req_o), - .ext_dma_addr_ch0_resp_i(ext_dma_addr_ch0_resp_i) - ); - - memory_subsystem #( - .NUM_BANKS(core_v_mini_mcu_pkg::NUM_BANKS) - ) memory_subsystem_i ( - .clk_i, - .rst_ni(rst_ni && debug_reset_n), - .clk_gate_en_ni(memory_subsystem_clkgate_en_n), - .ram_req_i(ram_slave_req), - .ram_resp_o(ram_slave_resp), - .set_retentive_ni(memory_subsystem_banks_set_retentive_n) - ); - - ao_peripheral_subsystem ao_peripheral_subsystem_i ( - .clk_i, - .rst_ni(rst_ni && debug_reset_n), - .slave_req_i(ao_peripheral_slave_req), - .slave_resp_o(ao_peripheral_slave_resp), - .exit_value_o, - .spimemio_req_i(flash_mem_slave_req), - .spimemio_resp_o(flash_mem_slave_resp), - .intr_i(intr), - .intr_vector_ext_i, - .core_sleep_i(core_sleep), - .cpu_subsystem_powergate_switch_no, - .cpu_subsystem_powergate_switch_ack_ni, - .cpu_subsystem_powergate_iso_no(cpu_subsystem_powergate_iso_n), - .cpu_subsystem_rst_no(cpu_subsystem_rst_n), - .peripheral_subsystem_powergate_switch_no, - .peripheral_subsystem_powergate_switch_ack_ni, - .peripheral_subsystem_powergate_iso_no(peripheral_subsystem_powergate_iso_n), - .peripheral_subsystem_rst_no(peripheral_subsystem_rst_n), - .memory_subsystem_banks_powergate_switch_no, - .memory_subsystem_banks_powergate_switch_ack_ni, - .memory_subsystem_banks_powergate_iso_no(memory_subsystem_banks_powergate_iso_n), - .memory_subsystem_banks_set_retentive_no(memory_subsystem_banks_set_retentive_n), - .external_subsystem_powergate_switch_no, - .external_subsystem_powergate_switch_ack_ni, - .external_subsystem_powergate_iso_no, - .external_subsystem_rst_no, - .external_ram_banks_set_retentive_no, - .peripheral_subsystem_clkgate_en_no(peripheral_subsystem_clkgate_en_n), - .memory_subsystem_clkgate_en_no(memory_subsystem_clkgate_en_n), - .external_subsystem_clkgate_en_no, - .dma_read_ch0_req_o(dma_read_ch0_req), - .dma_read_ch0_resp_i(dma_read_ch0_resp), - .dma_write_ch0_req_o(dma_write_ch0_req), - .dma_write_ch0_resp_i(dma_write_ch0_resp), - .dma_addr_ch0_req_o(dma_addr_ch0_req), - .dma_addr_ch0_resp_i(dma_addr_ch0_resp), - .pad_req_o, - .pad_resp_i, - .fast_intr_i(fast_intr), - .fast_intr_o(irq_fast), - .ext_peripheral_slave_req_o, - .ext_peripheral_slave_resp_i, - .bundle__ao_periph__pad_ring__if, - .bundle__ao_periph__root__if, - .bundle__ao_periph__pd_peripheral__if(bundle__ao_periph__pd_peripheral__if.ao_periph), - .bundle__ao_periph__core_v_mini_mcu__if(bundle__ao_periph__core_v_mini_mcu__if.ao_periph) - ); - - peripheral_subsystem peripheral_subsystem_i ( - .clk_i, - .rst_ni(peripheral_subsystem_rst_n && debug_reset_n), - .clk_gate_en_ni(peripheral_subsystem_clkgate_en_n), - .slave_req_i(peripheral_slave_req), - .slave_resp_o(peripheral_slave_resp), - .bundle__ao_periph__pd_peripheral__if(bundle__ao_periph__pd_peripheral__if.pd_peripheral), - .bundle__pad_ring__pd_peripheral__if, - .bundle__pd_peripheral__root__if, - .bundle__core_v_mini_mcu__pd_peripheral__if(bundle__core_v_mini_mcu__pd_peripheral__if.pd_peripheral) - ); - -endmodule // core_v_mini_mcu diff --git a/hw/core-v-mini-mcu/generated_if.sv b/hw/core-v-mini-mcu/generated_if.sv deleted file mode 100644 index e6f12fea7..000000000 --- a/hw/core-v-mini-mcu/generated_if.sv +++ /dev/null @@ -1,802 +0,0 @@ -/* verilator lint_off DECLFILENAME */ - -interface if_bundle__pad_ring__root (); - logic rst_n; - logic clk; - logic muxer_pad_connector_pdm2pcm0_pdm_0_i; - logic muxer_pad_connector_pdm2pcm0_pdm_0_o; - logic muxer_pad_connector_pdm2pcm0_pdm_0_oe; - logic muxer_pad_connector_pdm2pcm0_pdm_clk_0_i; - logic muxer_pad_connector_pdm2pcm0_pdm_clk_0_o; - logic muxer_pad_connector_pdm2pcm0_pdm_clk_0_oe; - logic muxer_pad_connector_i2s0_sck_0_i; - logic muxer_pad_connector_i2s0_sck_0_o; - logic muxer_pad_connector_i2s0_sck_0_oe; - logic muxer_pad_connector_i2s0_ws_0_i; - logic muxer_pad_connector_i2s0_ws_0_o; - logic muxer_pad_connector_i2s0_ws_0_oe; - logic muxer_pad_connector_i2s0_sd_0_i; - logic muxer_pad_connector_i2s0_sd_0_o; - logic muxer_pad_connector_i2s0_sd_0_oe; - logic muxer_pad_connector_spi_host1_csb_0_i; - logic muxer_pad_connector_spi_host1_csb_0_o; - logic muxer_pad_connector_spi_host1_csb_0_oe; - logic muxer_pad_connector_spi_host1_csb_1_i; - logic muxer_pad_connector_spi_host1_csb_1_o; - logic muxer_pad_connector_spi_host1_csb_1_oe; - logic muxer_pad_connector_spi_host1_sck_0_i; - logic muxer_pad_connector_spi_host1_sck_0_o; - logic muxer_pad_connector_spi_host1_sck_0_oe; - logic muxer_pad_connector_spi_host1_sd_0_i; - logic muxer_pad_connector_spi_host1_sd_0_o; - logic muxer_pad_connector_spi_host1_sd_0_oe; - logic muxer_pad_connector_spi_host1_sd_1_i; - logic muxer_pad_connector_spi_host1_sd_1_o; - logic muxer_pad_connector_spi_host1_sd_1_oe; - logic muxer_pad_connector_spi_host1_sd_2_i; - logic muxer_pad_connector_spi_host1_sd_2_o; - logic muxer_pad_connector_spi_host1_sd_2_oe; - logic muxer_pad_connector_spi_host1_sd_3_i; - logic muxer_pad_connector_spi_host1_sd_3_o; - logic muxer_pad_connector_spi_host1_sd_3_oe; - logic muxer_pad_connector_i2c0_scl_0_i; - logic muxer_pad_connector_i2c0_scl_0_o; - logic muxer_pad_connector_i2c0_scl_0_oe; - logic muxer_pad_connector_i2c0_sda_0_i; - logic muxer_pad_connector_i2c0_sda_0_o; - logic muxer_pad_connector_i2c0_sda_0_oe; - modport root( - input rst_n, - input clk, - input muxer_pad_connector_pdm2pcm0_pdm_0_i, - output muxer_pad_connector_pdm2pcm0_pdm_0_o, - output muxer_pad_connector_pdm2pcm0_pdm_0_oe, - input muxer_pad_connector_pdm2pcm0_pdm_clk_0_i, - output muxer_pad_connector_pdm2pcm0_pdm_clk_0_o, - output muxer_pad_connector_pdm2pcm0_pdm_clk_0_oe, - input muxer_pad_connector_i2s0_sck_0_i, - output muxer_pad_connector_i2s0_sck_0_o, - output muxer_pad_connector_i2s0_sck_0_oe, - input muxer_pad_connector_i2s0_ws_0_i, - output muxer_pad_connector_i2s0_ws_0_o, - output muxer_pad_connector_i2s0_ws_0_oe, - input muxer_pad_connector_i2s0_sd_0_i, - output muxer_pad_connector_i2s0_sd_0_o, - output muxer_pad_connector_i2s0_sd_0_oe, - input muxer_pad_connector_spi_host1_csb_0_i, - output muxer_pad_connector_spi_host1_csb_0_o, - output muxer_pad_connector_spi_host1_csb_0_oe, - input muxer_pad_connector_spi_host1_csb_1_i, - output muxer_pad_connector_spi_host1_csb_1_o, - output muxer_pad_connector_spi_host1_csb_1_oe, - input muxer_pad_connector_spi_host1_sck_0_i, - output muxer_pad_connector_spi_host1_sck_0_o, - output muxer_pad_connector_spi_host1_sck_0_oe, - input muxer_pad_connector_spi_host1_sd_0_i, - output muxer_pad_connector_spi_host1_sd_0_o, - output muxer_pad_connector_spi_host1_sd_0_oe, - input muxer_pad_connector_spi_host1_sd_1_i, - output muxer_pad_connector_spi_host1_sd_1_o, - output muxer_pad_connector_spi_host1_sd_1_oe, - input muxer_pad_connector_spi_host1_sd_2_i, - output muxer_pad_connector_spi_host1_sd_2_o, - output muxer_pad_connector_spi_host1_sd_2_oe, - input muxer_pad_connector_spi_host1_sd_3_i, - output muxer_pad_connector_spi_host1_sd_3_o, - output muxer_pad_connector_spi_host1_sd_3_oe, - input muxer_pad_connector_i2c0_scl_0_i, - output muxer_pad_connector_i2c0_scl_0_o, - output muxer_pad_connector_i2c0_scl_0_oe, - input muxer_pad_connector_i2c0_sda_0_i, - output muxer_pad_connector_i2c0_sda_0_o, - output muxer_pad_connector_i2c0_sda_0_oe - ); - modport pad_ring( - output rst_n, - output clk, - output muxer_pad_connector_pdm2pcm0_pdm_0_i, - input muxer_pad_connector_pdm2pcm0_pdm_0_o, - input muxer_pad_connector_pdm2pcm0_pdm_0_oe, - output muxer_pad_connector_pdm2pcm0_pdm_clk_0_i, - input muxer_pad_connector_pdm2pcm0_pdm_clk_0_o, - input muxer_pad_connector_pdm2pcm0_pdm_clk_0_oe, - output muxer_pad_connector_i2s0_sck_0_i, - input muxer_pad_connector_i2s0_sck_0_o, - input muxer_pad_connector_i2s0_sck_0_oe, - output muxer_pad_connector_i2s0_ws_0_i, - input muxer_pad_connector_i2s0_ws_0_o, - input muxer_pad_connector_i2s0_ws_0_oe, - output muxer_pad_connector_i2s0_sd_0_i, - input muxer_pad_connector_i2s0_sd_0_o, - input muxer_pad_connector_i2s0_sd_0_oe, - output muxer_pad_connector_spi_host1_csb_0_i, - input muxer_pad_connector_spi_host1_csb_0_o, - input muxer_pad_connector_spi_host1_csb_0_oe, - output muxer_pad_connector_spi_host1_csb_1_i, - input muxer_pad_connector_spi_host1_csb_1_o, - input muxer_pad_connector_spi_host1_csb_1_oe, - output muxer_pad_connector_spi_host1_sck_0_i, - input muxer_pad_connector_spi_host1_sck_0_o, - input muxer_pad_connector_spi_host1_sck_0_oe, - output muxer_pad_connector_spi_host1_sd_0_i, - input muxer_pad_connector_spi_host1_sd_0_o, - input muxer_pad_connector_spi_host1_sd_0_oe, - output muxer_pad_connector_spi_host1_sd_1_i, - input muxer_pad_connector_spi_host1_sd_1_o, - input muxer_pad_connector_spi_host1_sd_1_oe, - output muxer_pad_connector_spi_host1_sd_2_i, - input muxer_pad_connector_spi_host1_sd_2_o, - input muxer_pad_connector_spi_host1_sd_2_oe, - output muxer_pad_connector_spi_host1_sd_3_i, - input muxer_pad_connector_spi_host1_sd_3_o, - input muxer_pad_connector_spi_host1_sd_3_oe, - output muxer_pad_connector_i2c0_scl_0_i, - input muxer_pad_connector_i2c0_scl_0_o, - input muxer_pad_connector_i2c0_scl_0_oe, - output muxer_pad_connector_i2c0_sda_0_i, - input muxer_pad_connector_i2c0_sda_0_o, - input muxer_pad_connector_i2c0_sda_0_oe - ); -endinterface - -interface if_bundle__core_v_mini_mcu__pad_ring (); - logic jtag_tck; - logic jtag_tms; - logic jtag_trst_n; - logic jtag_tdi; - logic jtag_tdo; - modport core_v_mini_mcu( - input jtag_tck, - input jtag_tms, - input jtag_trst_n, - input jtag_tdi, - output jtag_tdo - ); - modport pad_ring( - output jtag_tck, - output jtag_tms, - output jtag_trst_n, - output jtag_tdi, - input jtag_tdo - ); -endinterface - -interface if_bundle__ao_periph__pad_ring (); - logic boot_select; - logic execute_from_flash; - logic exit_valid; - logic spi_flash_sck_o; - logic spi_flash_sck_en_o; - logic spi_flash_csb_0_o; - logic spi_flash_csb_0_en_o; - logic spi_flash_csb_1_o; - logic spi_flash_csb_1_en_o; - logic spi_flash_sd_0_o; - logic spi_flash_sd_0_en_o; - logic spi_flash_sd_0_i; - logic spi_flash_sd_1_o; - logic spi_flash_sd_1_en_o; - logic spi_flash_sd_1_i; - logic spi_flash_sd_2_o; - logic spi_flash_sd_2_en_o; - logic spi_flash_sd_2_i; - logic spi_flash_sd_3_o; - logic spi_flash_sd_3_en_o; - logic spi_flash_sd_3_i; - modport ao_periph( - input boot_select, - input execute_from_flash, - output exit_valid, - output spi_flash_sck_o, - output spi_flash_sck_en_o, - output spi_flash_csb_0_o, - output spi_flash_csb_0_en_o, - output spi_flash_csb_1_o, - output spi_flash_csb_1_en_o, - output spi_flash_sd_0_o, - output spi_flash_sd_0_en_o, - input spi_flash_sd_0_i, - output spi_flash_sd_1_o, - output spi_flash_sd_1_en_o, - input spi_flash_sd_1_i, - output spi_flash_sd_2_o, - output spi_flash_sd_2_en_o, - input spi_flash_sd_2_i, - output spi_flash_sd_3_o, - output spi_flash_sd_3_en_o, - input spi_flash_sd_3_i - ); - modport pad_ring( - output boot_select, - output execute_from_flash, - input exit_valid, - input spi_flash_sck_o, - input spi_flash_sck_en_o, - input spi_flash_csb_0_o, - input spi_flash_csb_0_en_o, - input spi_flash_csb_1_o, - input spi_flash_csb_1_en_o, - input spi_flash_sd_0_o, - input spi_flash_sd_0_en_o, - output spi_flash_sd_0_i, - input spi_flash_sd_1_o, - input spi_flash_sd_1_en_o, - output spi_flash_sd_1_i, - input spi_flash_sd_2_o, - input spi_flash_sd_2_en_o, - output spi_flash_sd_2_i, - input spi_flash_sd_3_o, - input spi_flash_sd_3_en_o, - output spi_flash_sd_3_i - ); -endinterface - -interface if_bundle__ao_periph__core_v_mini_mcu (); - logic rv_timer_0_intr; - logic spi_flash_intr; - logic rv_timer_1_intr; - logic dma_done_intr; - modport ao_periph( - output rv_timer_0_intr, - output spi_flash_intr, - output rv_timer_1_intr, - output dma_done_intr - ); - modport core_v_mini_mcu( - input rv_timer_0_intr, - input spi_flash_intr, - input rv_timer_1_intr, - input dma_done_intr - ); -endinterface - -interface if_bundle__pad_ring__pd_peripheral (); - logic spi_host0_sd0_i; - logic spi_host0_sd0_o; - logic spi_host0_sd0_oe; - logic spi_host0_sd1_i; - logic spi_host0_sd1_o; - logic spi_host0_sd1_oe; - logic spi_host0_sd2_i; - logic spi_host0_sd2_o; - logic spi_host0_sd2_oe; - logic spi_host0_sd3_i; - logic spi_host0_sd3_o; - logic spi_host0_sd3_oe; - logic spi_host0_sck0_o; - logic spi_host0_sck0_oe; - logic spi_host0_csb0_o; - logic spi_host0_csb0_oe; - logic spi_host0_csb1_o; - logic spi_host0_csb1_oe; - logic io_pad_target_gpio_0_i; - logic io_pad_target_gpio_0_o; - logic io_pad_target_gpio_0_oe; - logic io_pad_target_gpio_1_i; - logic io_pad_target_gpio_1_o; - logic io_pad_target_gpio_1_oe; - logic io_pad_target_gpio_2_i; - logic io_pad_target_gpio_2_o; - logic io_pad_target_gpio_2_oe; - logic io_pad_target_gpio_3_i; - logic io_pad_target_gpio_3_o; - logic io_pad_target_gpio_3_oe; - logic io_pad_target_gpio_4_i; - logic io_pad_target_gpio_4_o; - logic io_pad_target_gpio_4_oe; - logic io_pad_target_gpio_5_i; - logic io_pad_target_gpio_5_o; - logic io_pad_target_gpio_5_oe; - logic io_pad_target_gpio_6_i; - logic io_pad_target_gpio_6_o; - logic io_pad_target_gpio_6_oe; - logic io_pad_target_gpio_7_i; - logic io_pad_target_gpio_7_o; - logic io_pad_target_gpio_7_oe; - logic io_pad_target_gpio_8_i; - logic io_pad_target_gpio_8_o; - logic io_pad_target_gpio_8_oe; - logic io_pad_target_gpio_9_i; - logic io_pad_target_gpio_9_o; - logic io_pad_target_gpio_9_oe; - logic io_pad_target_gpio_10_i; - logic io_pad_target_gpio_10_o; - logic io_pad_target_gpio_10_oe; - logic io_pad_target_gpio_11_i; - logic io_pad_target_gpio_11_o; - logic io_pad_target_gpio_11_oe; - logic io_pad_target_gpio_12_i; - logic io_pad_target_gpio_12_o; - logic io_pad_target_gpio_12_oe; - logic io_pad_target_gpio_13_i; - logic io_pad_target_gpio_13_o; - logic io_pad_target_gpio_13_oe; - logic io_pad_target_gpio_14_i; - logic io_pad_target_gpio_14_o; - logic io_pad_target_gpio_14_oe; - logic io_pad_target_gpio_15_i; - logic io_pad_target_gpio_15_o; - logic io_pad_target_gpio_15_oe; - logic io_pad_target_gpio_16_i; - logic io_pad_target_gpio_16_o; - logic io_pad_target_gpio_16_oe; - logic io_pad_target_gpio_17_i; - logic io_pad_target_gpio_17_o; - logic io_pad_target_gpio_17_oe; - logic uart0_rx0_i; - logic uart0_tx0_o; - logic uart0_tx0_oe; - modport pd_peripheral( - input spi_host0_sd0_i, - output spi_host0_sd0_o, - output spi_host0_sd0_oe, - input spi_host0_sd1_i, - output spi_host0_sd1_o, - output spi_host0_sd1_oe, - input spi_host0_sd2_i, - output spi_host0_sd2_o, - output spi_host0_sd2_oe, - input spi_host0_sd3_i, - output spi_host0_sd3_o, - output spi_host0_sd3_oe, - output spi_host0_sck0_o, - output spi_host0_sck0_oe, - output spi_host0_csb0_o, - output spi_host0_csb0_oe, - output spi_host0_csb1_o, - output spi_host0_csb1_oe, - input io_pad_target_gpio_0_i, - output io_pad_target_gpio_0_o, - output io_pad_target_gpio_0_oe, - input io_pad_target_gpio_1_i, - output io_pad_target_gpio_1_o, - output io_pad_target_gpio_1_oe, - input io_pad_target_gpio_2_i, - output io_pad_target_gpio_2_o, - output io_pad_target_gpio_2_oe, - input io_pad_target_gpio_3_i, - output io_pad_target_gpio_3_o, - output io_pad_target_gpio_3_oe, - input io_pad_target_gpio_4_i, - output io_pad_target_gpio_4_o, - output io_pad_target_gpio_4_oe, - input io_pad_target_gpio_5_i, - output io_pad_target_gpio_5_o, - output io_pad_target_gpio_5_oe, - input io_pad_target_gpio_6_i, - output io_pad_target_gpio_6_o, - output io_pad_target_gpio_6_oe, - input io_pad_target_gpio_7_i, - output io_pad_target_gpio_7_o, - output io_pad_target_gpio_7_oe, - input io_pad_target_gpio_8_i, - output io_pad_target_gpio_8_o, - output io_pad_target_gpio_8_oe, - input io_pad_target_gpio_9_i, - output io_pad_target_gpio_9_o, - output io_pad_target_gpio_9_oe, - input io_pad_target_gpio_10_i, - output io_pad_target_gpio_10_o, - output io_pad_target_gpio_10_oe, - input io_pad_target_gpio_11_i, - output io_pad_target_gpio_11_o, - output io_pad_target_gpio_11_oe, - input io_pad_target_gpio_12_i, - output io_pad_target_gpio_12_o, - output io_pad_target_gpio_12_oe, - input io_pad_target_gpio_13_i, - output io_pad_target_gpio_13_o, - output io_pad_target_gpio_13_oe, - input io_pad_target_gpio_14_i, - output io_pad_target_gpio_14_o, - output io_pad_target_gpio_14_oe, - input io_pad_target_gpio_15_i, - output io_pad_target_gpio_15_o, - output io_pad_target_gpio_15_oe, - input io_pad_target_gpio_16_i, - output io_pad_target_gpio_16_o, - output io_pad_target_gpio_16_oe, - input io_pad_target_gpio_17_i, - output io_pad_target_gpio_17_o, - output io_pad_target_gpio_17_oe, - input uart0_rx0_i, - output uart0_tx0_o, - output uart0_tx0_oe - ); - modport pad_ring( - output spi_host0_sd0_i, - input spi_host0_sd0_o, - input spi_host0_sd0_oe, - output spi_host0_sd1_i, - input spi_host0_sd1_o, - input spi_host0_sd1_oe, - output spi_host0_sd2_i, - input spi_host0_sd2_o, - input spi_host0_sd2_oe, - output spi_host0_sd3_i, - input spi_host0_sd3_o, - input spi_host0_sd3_oe, - input spi_host0_sck0_o, - input spi_host0_sck0_oe, - input spi_host0_csb0_o, - input spi_host0_csb0_oe, - input spi_host0_csb1_o, - input spi_host0_csb1_oe, - output io_pad_target_gpio_0_i, - input io_pad_target_gpio_0_o, - input io_pad_target_gpio_0_oe, - output io_pad_target_gpio_1_i, - input io_pad_target_gpio_1_o, - input io_pad_target_gpio_1_oe, - output io_pad_target_gpio_2_i, - input io_pad_target_gpio_2_o, - input io_pad_target_gpio_2_oe, - output io_pad_target_gpio_3_i, - input io_pad_target_gpio_3_o, - input io_pad_target_gpio_3_oe, - output io_pad_target_gpio_4_i, - input io_pad_target_gpio_4_o, - input io_pad_target_gpio_4_oe, - output io_pad_target_gpio_5_i, - input io_pad_target_gpio_5_o, - input io_pad_target_gpio_5_oe, - output io_pad_target_gpio_6_i, - input io_pad_target_gpio_6_o, - input io_pad_target_gpio_6_oe, - output io_pad_target_gpio_7_i, - input io_pad_target_gpio_7_o, - input io_pad_target_gpio_7_oe, - output io_pad_target_gpio_8_i, - input io_pad_target_gpio_8_o, - input io_pad_target_gpio_8_oe, - output io_pad_target_gpio_9_i, - input io_pad_target_gpio_9_o, - input io_pad_target_gpio_9_oe, - output io_pad_target_gpio_10_i, - input io_pad_target_gpio_10_o, - input io_pad_target_gpio_10_oe, - output io_pad_target_gpio_11_i, - input io_pad_target_gpio_11_o, - input io_pad_target_gpio_11_oe, - output io_pad_target_gpio_12_i, - input io_pad_target_gpio_12_o, - input io_pad_target_gpio_12_oe, - output io_pad_target_gpio_13_i, - input io_pad_target_gpio_13_o, - input io_pad_target_gpio_13_oe, - output io_pad_target_gpio_14_i, - input io_pad_target_gpio_14_o, - input io_pad_target_gpio_14_oe, - output io_pad_target_gpio_15_i, - input io_pad_target_gpio_15_o, - input io_pad_target_gpio_15_oe, - output io_pad_target_gpio_16_i, - input io_pad_target_gpio_16_o, - input io_pad_target_gpio_16_oe, - output io_pad_target_gpio_17_i, - input io_pad_target_gpio_17_o, - input io_pad_target_gpio_17_oe, - output uart0_rx0_i, - input uart0_tx0_o, - input uart0_tx0_oe - ); -endinterface - -interface if_bundle__pd_peripheral__root (); - logic spi_host1_sd0_i; - logic spi_host1_sd0_o; - logic spi_host1_sd0_oe; - logic spi_host1_sd1_i; - logic spi_host1_sd1_o; - logic spi_host1_sd1_oe; - logic spi_host1_sd2_i; - logic spi_host1_sd2_o; - logic spi_host1_sd2_oe; - logic spi_host1_sd3_i; - logic spi_host1_sd3_o; - logic spi_host1_sd3_oe; - logic spi_host1_sck0_o; - logic spi_host1_sck0_oe; - logic spi_host1_csb0_o; - logic spi_host1_csb0_oe; - logic spi_host1_csb1_o; - logic spi_host1_csb1_oe; - logic i2c0_sda0_i; - logic i2c0_sda0_o; - logic i2c0_sda0_oe; - logic i2c0_scl0_i; - logic i2c0_scl0_o; - logic i2c0_scl0_oe; - logic i2s0_sck0_i; - logic i2s0_sck0_o; - logic i2s0_sck0_oe; - logic i2s0_ws0_i; - logic i2s0_ws0_o; - logic i2s0_ws0_oe; - logic i2s0_sd0_i; - logic i2s0_sd0_o; - logic i2s0_sd0_oe; - logic pdm2pcm0_pdm0_i; - logic pdm2pcm0_pdm_clk0_o; - logic io_pad_target_gpio_18_i; - logic io_pad_target_gpio_18_o; - logic io_pad_target_gpio_18_oe; - logic io_pad_target_gpio_19_i; - logic io_pad_target_gpio_19_o; - logic io_pad_target_gpio_19_oe; - logic io_pad_target_gpio_20_i; - logic io_pad_target_gpio_20_o; - logic io_pad_target_gpio_20_oe; - logic io_pad_target_gpio_21_i; - logic io_pad_target_gpio_21_o; - logic io_pad_target_gpio_21_oe; - logic io_pad_target_gpio_22_i; - logic io_pad_target_gpio_22_o; - logic io_pad_target_gpio_22_oe; - logic io_pad_target_gpio_23_i; - logic io_pad_target_gpio_23_o; - logic io_pad_target_gpio_23_oe; - logic io_pad_target_gpio_24_i; - logic io_pad_target_gpio_24_o; - logic io_pad_target_gpio_24_oe; - logic io_pad_target_gpio_25_i; - logic io_pad_target_gpio_25_o; - logic io_pad_target_gpio_25_oe; - logic io_pad_target_gpio_26_i; - logic io_pad_target_gpio_26_o; - logic io_pad_target_gpio_26_oe; - logic io_pad_target_gpio_27_i; - logic io_pad_target_gpio_27_o; - logic io_pad_target_gpio_27_oe; - logic io_pad_target_gpio_28_i; - logic io_pad_target_gpio_28_o; - logic io_pad_target_gpio_28_oe; - logic io_pad_target_gpio_29_i; - logic io_pad_target_gpio_29_o; - logic io_pad_target_gpio_29_oe; - logic io_pad_target_gpio_30_i; - logic io_pad_target_gpio_30_o; - logic io_pad_target_gpio_30_oe; - logic io_pad_target_gpio_31_i; - logic io_pad_target_gpio_31_o; - logic io_pad_target_gpio_31_oe; - logic ext_intr_0; - logic ext_intr_1; - modport pd_peripheral( - input spi_host1_sd0_i, - output spi_host1_sd0_o, - output spi_host1_sd0_oe, - input spi_host1_sd1_i, - output spi_host1_sd1_o, - output spi_host1_sd1_oe, - input spi_host1_sd2_i, - output spi_host1_sd2_o, - output spi_host1_sd2_oe, - input spi_host1_sd3_i, - output spi_host1_sd3_o, - output spi_host1_sd3_oe, - output spi_host1_sck0_o, - output spi_host1_sck0_oe, - output spi_host1_csb0_o, - output spi_host1_csb0_oe, - output spi_host1_csb1_o, - output spi_host1_csb1_oe, - input i2c0_sda0_i, - output i2c0_sda0_o, - output i2c0_sda0_oe, - input i2c0_scl0_i, - output i2c0_scl0_o, - output i2c0_scl0_oe, - input i2s0_sck0_i, - output i2s0_sck0_o, - output i2s0_sck0_oe, - input i2s0_ws0_i, - output i2s0_ws0_o, - output i2s0_ws0_oe, - input i2s0_sd0_i, - output i2s0_sd0_o, - output i2s0_sd0_oe, - input pdm2pcm0_pdm0_i, - output pdm2pcm0_pdm_clk0_o, - input io_pad_target_gpio_18_i, - output io_pad_target_gpio_18_o, - output io_pad_target_gpio_18_oe, - input io_pad_target_gpio_19_i, - output io_pad_target_gpio_19_o, - output io_pad_target_gpio_19_oe, - input io_pad_target_gpio_20_i, - output io_pad_target_gpio_20_o, - output io_pad_target_gpio_20_oe, - input io_pad_target_gpio_21_i, - output io_pad_target_gpio_21_o, - output io_pad_target_gpio_21_oe, - input io_pad_target_gpio_22_i, - output io_pad_target_gpio_22_o, - output io_pad_target_gpio_22_oe, - input io_pad_target_gpio_23_i, - output io_pad_target_gpio_23_o, - output io_pad_target_gpio_23_oe, - input io_pad_target_gpio_24_i, - output io_pad_target_gpio_24_o, - output io_pad_target_gpio_24_oe, - input io_pad_target_gpio_25_i, - output io_pad_target_gpio_25_o, - output io_pad_target_gpio_25_oe, - input io_pad_target_gpio_26_i, - output io_pad_target_gpio_26_o, - output io_pad_target_gpio_26_oe, - input io_pad_target_gpio_27_i, - output io_pad_target_gpio_27_o, - output io_pad_target_gpio_27_oe, - input io_pad_target_gpio_28_i, - output io_pad_target_gpio_28_o, - output io_pad_target_gpio_28_oe, - input io_pad_target_gpio_29_i, - output io_pad_target_gpio_29_o, - output io_pad_target_gpio_29_oe, - input io_pad_target_gpio_30_i, - output io_pad_target_gpio_30_o, - output io_pad_target_gpio_30_oe, - input io_pad_target_gpio_31_i, - output io_pad_target_gpio_31_o, - output io_pad_target_gpio_31_oe, - input ext_intr_0, - input ext_intr_1 - ); - modport root( - output spi_host1_sd0_i, - input spi_host1_sd0_o, - input spi_host1_sd0_oe, - output spi_host1_sd1_i, - input spi_host1_sd1_o, - input spi_host1_sd1_oe, - output spi_host1_sd2_i, - input spi_host1_sd2_o, - input spi_host1_sd2_oe, - output spi_host1_sd3_i, - input spi_host1_sd3_o, - input spi_host1_sd3_oe, - input spi_host1_sck0_o, - input spi_host1_sck0_oe, - input spi_host1_csb0_o, - input spi_host1_csb0_oe, - input spi_host1_csb1_o, - input spi_host1_csb1_oe, - output i2c0_sda0_i, - input i2c0_sda0_o, - input i2c0_sda0_oe, - output i2c0_scl0_i, - input i2c0_scl0_o, - input i2c0_scl0_oe, - output i2s0_sck0_i, - input i2s0_sck0_o, - input i2s0_sck0_oe, - output i2s0_ws0_i, - input i2s0_ws0_o, - input i2s0_ws0_oe, - output i2s0_sd0_i, - input i2s0_sd0_o, - input i2s0_sd0_oe, - output pdm2pcm0_pdm0_i, - input pdm2pcm0_pdm_clk0_o, - output io_pad_target_gpio_18_i, - input io_pad_target_gpio_18_o, - input io_pad_target_gpio_18_oe, - output io_pad_target_gpio_19_i, - input io_pad_target_gpio_19_o, - input io_pad_target_gpio_19_oe, - output io_pad_target_gpio_20_i, - input io_pad_target_gpio_20_o, - input io_pad_target_gpio_20_oe, - output io_pad_target_gpio_21_i, - input io_pad_target_gpio_21_o, - input io_pad_target_gpio_21_oe, - output io_pad_target_gpio_22_i, - input io_pad_target_gpio_22_o, - input io_pad_target_gpio_22_oe, - output io_pad_target_gpio_23_i, - input io_pad_target_gpio_23_o, - input io_pad_target_gpio_23_oe, - output io_pad_target_gpio_24_i, - input io_pad_target_gpio_24_o, - input io_pad_target_gpio_24_oe, - output io_pad_target_gpio_25_i, - input io_pad_target_gpio_25_o, - input io_pad_target_gpio_25_oe, - output io_pad_target_gpio_26_i, - input io_pad_target_gpio_26_o, - input io_pad_target_gpio_26_oe, - output io_pad_target_gpio_27_i, - input io_pad_target_gpio_27_o, - input io_pad_target_gpio_27_oe, - output io_pad_target_gpio_28_i, - input io_pad_target_gpio_28_o, - input io_pad_target_gpio_28_oe, - output io_pad_target_gpio_29_i, - input io_pad_target_gpio_29_o, - input io_pad_target_gpio_29_oe, - output io_pad_target_gpio_30_i, - input io_pad_target_gpio_30_o, - input io_pad_target_gpio_30_oe, - output io_pad_target_gpio_31_i, - input io_pad_target_gpio_31_o, - input io_pad_target_gpio_31_oe, - output ext_intr_0, - output ext_intr_1 - ); -endinterface - -interface if_bundle__core_v_mini_mcu__pd_peripheral (); - logic rv_plic_0_irq; - logic rv_plic_0_msip; - logic rv_timer_2_3_timer_expired_0_0_intr_o; - logic rv_timer_2_3_timer_expired_1_0_intr_o; - logic spi_host_0_spi_event_intr_o; - logic gpio_0_intr_o; - logic gpio_1_intr_o; - logic gpio_2_intr_o; - logic gpio_3_intr_o; - logic gpio_4_intr_o; - logic gpio_5_intr_o; - logic gpio_6_intr_o; - logic gpio_7_intr_o; - modport pd_peripheral( - output rv_plic_0_irq, - output rv_plic_0_msip, - output rv_timer_2_3_timer_expired_0_0_intr_o, - output rv_timer_2_3_timer_expired_1_0_intr_o, - output spi_host_0_spi_event_intr_o, - output gpio_0_intr_o, - output gpio_1_intr_o, - output gpio_2_intr_o, - output gpio_3_intr_o, - output gpio_4_intr_o, - output gpio_5_intr_o, - output gpio_6_intr_o, - output gpio_7_intr_o - ); - modport core_v_mini_mcu( - input rv_plic_0_irq, - input rv_plic_0_msip, - input rv_timer_2_3_timer_expired_0_0_intr_o, - input rv_timer_2_3_timer_expired_1_0_intr_o, - input spi_host_0_spi_event_intr_o, - input gpio_0_intr_o, - input gpio_1_intr_o, - input gpio_2_intr_o, - input gpio_3_intr_o, - input gpio_4_intr_o, - input gpio_5_intr_o, - input gpio_6_intr_o, - input gpio_7_intr_o - ); -endinterface - -interface if_bundle__ao_periph__root (); - logic dma_ext_rx; - logic dma_ext_tx; - modport root(output dma_ext_rx, output dma_ext_tx); - modport ao_periph(input dma_ext_rx, input dma_ext_tx); -endinterface - -interface if_bundle__ao_periph__pd_peripheral (); - logic dma_window_intr; - logic spi_host_0_rx_valid; - logic spi_host_0_tx_valid; - logic i2s_0_rx_valid; - modport ao_periph( - output dma_window_intr, - input spi_host_0_rx_valid, - input spi_host_0_tx_valid, - input i2s_0_rx_valid - ); - modport pd_peripheral( - input dma_window_intr, - output spi_host_0_rx_valid, - output spi_host_0_tx_valid, - output i2s_0_rx_valid - ); -endinterface - - -/* verilator lint_on DECLFILENAME */ diff --git a/hw/core-v-mini-mcu/peripheral_subsystem.sv b/hw/core-v-mini-mcu/peripheral_subsystem.sv deleted file mode 100644 index 2c9e8105f..000000000 --- a/hw/core-v-mini-mcu/peripheral_subsystem.sv +++ /dev/null @@ -1,795 +0,0 @@ -// Copyright(// Copyright) 2022 OpenHW Group -// Solderpad Hardware License, Version 2.1, see LICENSE.md for details. -// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 - - - -module peripheral_subsystem - import obi_pkg::*; - 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 -) ( - input logic clk_i, - input logic rst_ni, - - // Clock-gating signal - input logic clk_gate_en_ni, - - input obi_req_t slave_req_i, - output obi_resp_t slave_resp_o, - - - if_bundle__core_v_mini_mcu__pd_peripheral.pd_peripheral bundle__core_v_mini_mcu__pd_peripheral__if, - if_bundle__ao_periph__pd_peripheral.pd_peripheral bundle__ao_periph__pd_peripheral__if, - if_bundle__pd_peripheral__root.pd_peripheral bundle__pd_peripheral__root__if, - if_bundle__pad_ring__pd_peripheral.pd_peripheral bundle__pad_ring__pd_peripheral__if -); - - import core_v_mini_mcu_pkg::*; - import tlul_pkg::*; - import rv_plic_reg_pkg::*; - - reg_pkg::reg_req_t peripheral_req; - reg_pkg::reg_rsp_t peripheral_rsp; - - reg_pkg::reg_req_t [core_v_mini_mcu_pkg::PERIPHERAL_COUNT-1:0] peripheral_slv_req; - reg_pkg::reg_rsp_t [core_v_mini_mcu_pkg::PERIPHERAL_COUNT-1:0] peripheral_slv_rsp; - - - tlul_pkg::tl_h2d_t rv_timer_2_3_tl_h2d; - tlul_pkg::tl_d2h_t rv_timer_2_3_tl_d2h; - tlul_pkg::tl_h2d_t i2c_0_tl_h2d; - tlul_pkg::tl_d2h_t i2c_0_tl_d2h; - tlul_pkg::tl_h2d_t rv_plic_0_tl_h2d; - tlul_pkg::tl_d2h_t rv_plic_0_tl_d2h; - tlul_pkg::tl_h2d_t uart_0_tl_h2d; - tlul_pkg::tl_d2h_t uart_0_tl_d2h; - - logic spi_host_0_error_intr_o; - logic spi_host_1_error_intr_o; - logic spi_host_1_spi_event_intr_o; - logic i2c_0_fmt_watermark_intr_o; - logic i2c_0_rx_watermark_intr_o; - logic i2c_0_fmt_overflow_intr_o; - logic i2c_0_rx_overflow_intr_o; - logic i2c_0_nak_intr_o; - logic i2c_0_scl_interference_intr_o; - logic i2c_0_sda_interference_intr_o; - logic i2c_0_stretch_timeout_intr_o; - logic i2c_0_sda_unstable_intr_o; - logic i2c_0_trans_complete_intr_o; - logic i2c_0_tx_empty_intr_o; - logic i2c_0_tx_nonempty_intr_o; - logic i2c_0_tx_overflow_intr_o; - logic i2c_0_acq_overflow_intr_o; - logic i2c_0_ack_stop_intr_o; - logic i2c_0_host_timeout_intr_o; - logic i2s_0_i2s_event_intr_o; - logic gpio_8_intr_o; - logic gpio_9_intr_o; - logic gpio_10_intr_o; - logic gpio_11_intr_o; - logic gpio_12_intr_o; - logic gpio_13_intr_o; - logic gpio_14_intr_o; - logic gpio_15_intr_o; - logic gpio_16_intr_o; - logic gpio_17_intr_o; - logic gpio_18_intr_o; - logic gpio_19_intr_o; - logic gpio_20_intr_o; - logic gpio_21_intr_o; - logic gpio_22_intr_o; - logic gpio_23_intr_o; - logic gpio_24_intr_o; - logic gpio_25_intr_o; - logic gpio_26_intr_o; - logic gpio_27_intr_o; - logic gpio_28_intr_o; - logic gpio_29_intr_o; - logic gpio_30_intr_o; - logic gpio_31_intr_o; - logic uart_0_tx_watermark_intr_o; - logic uart_0_rx_watermark_intr_o; - logic uart_0_tx_empty_intr_o; - logic uart_0_rx_overflow_intr_o; - logic uart_0_rx_frame_err_intr_o; - logic uart_0_rx_break_err_intr_o; - logic uart_0_rx_timeout_intr_o; - logic uart_0_rx_parity_err_intr_o; - - - //Address Decoder - logic [PERIPHERAL_PORT_SEL_WIDTH-1:0] peripheral_select; - - obi_pkg::obi_req_t slave_fifo_req_sel; - obi_pkg::obi_resp_t slave_fifo_resp_sel; - - // Clock-gating - logic clk_cg; - tc_clk_gating clk_gating_cell ( - .clk_i, - .en_i(clk_gate_en_ni), - .test_en_i(1'b0), - .clk_o(clk_cg) - ); - - -`ifdef REMOVE_OBI_FIFO - - assign slave_fifo_req_sel = slave_req_i; - assign slave_resp_o = slave_fifo_resp_sel; - -`else - - 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_resp_t slave_fifoout_resp; - - obi_fifo obi_fifo_i ( - .clk_i(clk_cg), - .rst_ni, - .producer_req_i(slave_fifoin_req), - .producer_resp_o(slave_fifoin_resp), - .consumer_req_o(slave_fifoout_req), - .consumer_resp_i(slave_fifoout_resp) - ); - - assign slave_fifo_req_sel = slave_fifoout_req; - assign slave_fifoout_resp = slave_fifo_resp_sel; - assign slave_fifoin_req = slave_req_i; - assign slave_resp_o = slave_fifoin_resp; - -`endif - - periph_to_reg #( - .req_t(reg_pkg::reg_req_t), - .rsp_t(reg_pkg::reg_rsp_t), - .IW(1) - ) periph_to_reg_i ( - .clk_i(clk_cg), - .rst_ni, - .req_i(slave_fifo_req_sel.req), - .add_i(slave_fifo_req_sel.addr), - .wen_i(~slave_fifo_req_sel.we), - .wdata_i(slave_fifo_req_sel.wdata), - .be_i(slave_fifo_req_sel.be), - .id_i('0), - .gnt_o(slave_fifo_resp_sel.gnt), - .r_rdata_o(slave_fifo_resp_sel.rdata), - .r_opc_o(), - .r_id_o(), - .r_valid_o(slave_fifo_resp_sel.rvalid), - .reg_req_o(peripheral_req), - .reg_rsp_i(peripheral_rsp) - ); - - addr_decode #( - .NoIndices(core_v_mini_mcu_pkg::PERIPHERAL_COUNT), - .NoRules(core_v_mini_mcu_pkg::PERIPHERAL_COUNT), - .addr_t(logic [31:0]), - .rule_t(addr_map_rule_pkg::addr_map_rule_t) - ) i_addr_decode_soc_regbus_periph_xbar ( - .addr_i(peripheral_req.addr), - .addr_map_i(core_v_mini_mcu_pkg::PERIPHERAL_ADDR_RULES), - .idx_o(peripheral_select), - .dec_valid_o(), - .dec_error_o(), - .en_default_idx_i(1'b0), - .default_idx_i('0) - ); - - reg_demux #( - .NoPorts(core_v_mini_mcu_pkg::PERIPHERAL_COUNT), - .req_t (reg_pkg::reg_req_t), - .rsp_t (reg_pkg::reg_rsp_t) - ) reg_demux_i ( - .clk_i(clk_cg), - .rst_ni, - .in_select_i(peripheral_select), - .in_req_i(peripheral_req), - .in_rsp_o(peripheral_rsp), - .out_req_o(peripheral_slv_req), - .out_rsp_i(peripheral_slv_rsp) - ); - - - reg_to_tlul #( - .req_t(reg_pkg::reg_req_t), - .rsp_t(reg_pkg::reg_rsp_t), - .tl_h2d_t(tlul_pkg::tl_h2d_t), - .tl_d2h_t(tlul_pkg::tl_d2h_t), - .tl_a_user_t(tlul_pkg::tl_a_user_t), - .tl_a_op_e(tlul_pkg::tl_a_op_e), - .TL_A_USER_DEFAULT(tlul_pkg::TL_A_USER_DEFAULT), - .PutFullData(tlul_pkg::PutFullData), - .Get(tlul_pkg::Get) - ) reg_to_tlul_rv_timer_2_3_i ( - .tl_o(rv_timer_2_3_tl_h2d), - .tl_i(rv_timer_2_3_tl_d2h), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::RV_TIMER_2_3_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::RV_TIMER_2_3_IDX]) - ); - - rv_timer rv_timer_2_3_i ( - .clk_i(clk_cg), - .rst_ni, - .intr_timer_expired_0_0_o(bundle__core_v_mini_mcu__pd_peripheral__if.rv_timer_2_3_timer_expired_0_0_intr_o), - .intr_timer_expired_1_0_o(bundle__core_v_mini_mcu__pd_peripheral__if.rv_timer_2_3_timer_expired_1_0_intr_o), - .tl_i(rv_timer_2_3_tl_h2d), - .tl_o(rv_timer_2_3_tl_d2h) - ); - - spi_host #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) spi_host_0_i ( - .clk_i(clk_cg), - .rst_ni, - .intr_error_o(spi_host_0_error_intr_o), - .intr_spi_event_o(bundle__core_v_mini_mcu__pd_peripheral__if.spi_host_0_spi_event_intr_o), - .cio_sd_i({ - bundle__pad_ring__pd_peripheral__if.spi_host0_sd3_i, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd2_i, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd1_i, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd0_i - }), - .cio_sd_o({ - bundle__pad_ring__pd_peripheral__if.spi_host0_sd3_o, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd2_o, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd1_o, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd0_o - }), - .cio_sd_en_o({ - bundle__pad_ring__pd_peripheral__if.spi_host0_sd3_oe, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd2_oe, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd1_oe, - bundle__pad_ring__pd_peripheral__if.spi_host0_sd0_oe - }), - .cio_sck_o(bundle__pad_ring__pd_peripheral__if.spi_host0_sck0_o), - .cio_sck_en_o(bundle__pad_ring__pd_peripheral__if.spi_host0_sck0_oe), - .cio_csb_o({ - bundle__pad_ring__pd_peripheral__if.spi_host0_csb1_o, - bundle__pad_ring__pd_peripheral__if.spi_host0_csb0_o - }), - .cio_csb_en_o({ - bundle__pad_ring__pd_peripheral__if.spi_host0_csb1_oe, - bundle__pad_ring__pd_peripheral__if.spi_host0_csb0_oe - }), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::SPI_HOST_0_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::SPI_HOST_0_IDX]), - .alert_rx_i(), - .alert_tx_o(), - .passthrough_i(spi_device_pkg::PASSTHROUGH_REQ_DEFAULT), - .passthrough_o(), - .rx_valid_o(bundle__ao_periph__pd_peripheral__if.spi_host_0_rx_valid), - .tx_ready_o(bundle__ao_periph__pd_peripheral__if.spi_host_0_tx_valid) - ); - - spi_host #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) spi_host_1_i ( - .clk_i(clk_cg), - .rst_ni, - .intr_error_o(spi_host_1_error_intr_o), - .intr_spi_event_o(spi_host_1_spi_event_intr_o), - .cio_sd_i({ - bundle__pd_peripheral__root__if.spi_host1_sd3_i, - bundle__pd_peripheral__root__if.spi_host1_sd2_i, - bundle__pd_peripheral__root__if.spi_host1_sd1_i, - bundle__pd_peripheral__root__if.spi_host1_sd0_i - }), - .cio_sd_o({ - bundle__pd_peripheral__root__if.spi_host1_sd3_o, - bundle__pd_peripheral__root__if.spi_host1_sd2_o, - bundle__pd_peripheral__root__if.spi_host1_sd1_o, - bundle__pd_peripheral__root__if.spi_host1_sd0_o - }), - .cio_sd_en_o({ - bundle__pd_peripheral__root__if.spi_host1_sd3_oe, - bundle__pd_peripheral__root__if.spi_host1_sd2_oe, - bundle__pd_peripheral__root__if.spi_host1_sd1_oe, - bundle__pd_peripheral__root__if.spi_host1_sd0_oe - }), - .cio_sck_o(bundle__pd_peripheral__root__if.spi_host1_sck0_o), - .cio_sck_en_o(bundle__pd_peripheral__root__if.spi_host1_sck0_oe), - .cio_csb_o({ - bundle__pd_peripheral__root__if.spi_host1_csb1_o, - bundle__pd_peripheral__root__if.spi_host1_csb0_o - }), - .cio_csb_en_o({ - bundle__pd_peripheral__root__if.spi_host1_csb1_oe, - bundle__pd_peripheral__root__if.spi_host1_csb0_oe - }), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::SPI_HOST_1_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::SPI_HOST_1_IDX]), - .alert_rx_i(), - .alert_tx_o(), - .passthrough_i(spi_device_pkg::PASSTHROUGH_REQ_DEFAULT), - .passthrough_o(), - .rx_valid_o(), - .tx_ready_o() - ); - - reg_to_tlul #( - .req_t(reg_pkg::reg_req_t), - .rsp_t(reg_pkg::reg_rsp_t), - .tl_h2d_t(tlul_pkg::tl_h2d_t), - .tl_d2h_t(tlul_pkg::tl_d2h_t), - .tl_a_user_t(tlul_pkg::tl_a_user_t), - .tl_a_op_e(tlul_pkg::tl_a_op_e), - .TL_A_USER_DEFAULT(tlul_pkg::TL_A_USER_DEFAULT), - .PutFullData(tlul_pkg::PutFullData), - .Get(tlul_pkg::Get) - ) reg_to_tlul_i2c_0_i ( - .tl_o(i2c_0_tl_h2d), - .tl_i(i2c_0_tl_d2h), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::I2C_0_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::I2C_0_IDX]) - ); - - i2c i2c_0_i ( - .clk_i(clk_cg), - .rst_ni, - .intr_fmt_watermark_o(i2c_0_fmt_watermark_intr_o), - .intr_rx_watermark_o(i2c_0_rx_watermark_intr_o), - .intr_fmt_overflow_o(i2c_0_fmt_overflow_intr_o), - .intr_rx_overflow_o(i2c_0_rx_overflow_intr_o), - .intr_nak_o(i2c_0_nak_intr_o), - .intr_scl_interference_o(i2c_0_scl_interference_intr_o), - .intr_sda_interference_o(i2c_0_sda_interference_intr_o), - .intr_stretch_timeout_o(i2c_0_stretch_timeout_intr_o), - .intr_sda_unstable_o(i2c_0_sda_unstable_intr_o), - .intr_trans_complete_o(i2c_0_trans_complete_intr_o), - .intr_tx_empty_o(i2c_0_tx_empty_intr_o), - .intr_tx_nonempty_o(i2c_0_tx_nonempty_intr_o), - .intr_tx_overflow_o(i2c_0_tx_overflow_intr_o), - .intr_acq_overflow_o(i2c_0_acq_overflow_intr_o), - .intr_ack_stop_o(i2c_0_ack_stop_intr_o), - .intr_host_timeout_o(i2c_0_host_timeout_intr_o), - .cio_sda_i(bundle__pd_peripheral__root__if.i2c0_sda0_i), - .cio_sda_o(bundle__pd_peripheral__root__if.i2c0_sda0_o), - .cio_sda_en_o(bundle__pd_peripheral__root__if.i2c0_sda0_oe), - .cio_scl_i(bundle__pd_peripheral__root__if.i2c0_scl0_i), - .cio_scl_o(bundle__pd_peripheral__root__if.i2c0_scl0_o), - .cio_scl_en_o(bundle__pd_peripheral__root__if.i2c0_scl0_oe), - .tl_i(i2c_0_tl_h2d), - .tl_o(i2c_0_tl_d2h) - ); - - i2s #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) i2s_0_i ( - .clk_i(clk_cg), - .rst_ni, - .intr_i2s_event_o(i2s_0_i2s_event_intr_o), - .i2s_sck_i(bundle__pd_peripheral__root__if.i2s0_sck0_i), - .i2s_sck_o(bundle__pd_peripheral__root__if.i2s0_sck0_o), - .i2s_sck_oe_o(bundle__pd_peripheral__root__if.i2s0_sck0_oe), - .i2s_ws_i(bundle__pd_peripheral__root__if.i2s0_ws0_i), - .i2s_ws_o(bundle__pd_peripheral__root__if.i2s0_ws0_o), - .i2s_ws_oe_o(bundle__pd_peripheral__root__if.i2s0_ws0_oe), - .i2s_sd_i(bundle__pd_peripheral__root__if.i2s0_sd0_i), - .i2s_sd_o(bundle__pd_peripheral__root__if.i2s0_sd0_o), - .i2s_sd_oe_o(bundle__pd_peripheral__root__if.i2s0_sd0_oe), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::I2S_0_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::I2S_0_IDX]), - .i2s_rx_valid_o(bundle__ao_periph__pd_peripheral__if.i2s_0_rx_valid) - ); - - logic [rv_plic_reg_pkg::NumTarget-1:0] rv_plic_0_irq_plic; - logic [rv_plic_reg_pkg::NumSrc-1:0] rv_plic_0_intr_vector; - - assign rv_plic_0_intr_vector[0] = 1'b0; // ID [0] is a special case and must be tied to zero. - assign rv_plic_0_intr_vector[1] = spi_host_0_error_intr_o; - assign rv_plic_0_intr_vector[2] = spi_host_1_error_intr_o; - assign rv_plic_0_intr_vector[3] = spi_host_1_spi_event_intr_o; - assign rv_plic_0_intr_vector[4] = i2c_0_fmt_watermark_intr_o; - assign rv_plic_0_intr_vector[5] = i2c_0_rx_watermark_intr_o; - assign rv_plic_0_intr_vector[6] = i2c_0_fmt_overflow_intr_o; - assign rv_plic_0_intr_vector[7] = i2c_0_rx_overflow_intr_o; - assign rv_plic_0_intr_vector[8] = i2c_0_nak_intr_o; - assign rv_plic_0_intr_vector[9] = i2c_0_scl_interference_intr_o; - assign rv_plic_0_intr_vector[10] = i2c_0_sda_interference_intr_o; - assign rv_plic_0_intr_vector[11] = i2c_0_stretch_timeout_intr_o; - assign rv_plic_0_intr_vector[12] = i2c_0_sda_unstable_intr_o; - assign rv_plic_0_intr_vector[13] = i2c_0_trans_complete_intr_o; - assign rv_plic_0_intr_vector[14] = i2c_0_tx_empty_intr_o; - assign rv_plic_0_intr_vector[15] = i2c_0_tx_nonempty_intr_o; - assign rv_plic_0_intr_vector[16] = i2c_0_tx_overflow_intr_o; - assign rv_plic_0_intr_vector[17] = i2c_0_acq_overflow_intr_o; - assign rv_plic_0_intr_vector[18] = i2c_0_ack_stop_intr_o; - assign rv_plic_0_intr_vector[19] = i2c_0_host_timeout_intr_o; - assign rv_plic_0_intr_vector[20] = i2s_0_i2s_event_intr_o; - assign rv_plic_0_intr_vector[21] = gpio_8_intr_o; - assign rv_plic_0_intr_vector[22] = gpio_9_intr_o; - assign rv_plic_0_intr_vector[23] = gpio_10_intr_o; - assign rv_plic_0_intr_vector[24] = gpio_11_intr_o; - assign rv_plic_0_intr_vector[25] = gpio_12_intr_o; - assign rv_plic_0_intr_vector[26] = gpio_13_intr_o; - assign rv_plic_0_intr_vector[27] = gpio_14_intr_o; - assign rv_plic_0_intr_vector[28] = gpio_15_intr_o; - assign rv_plic_0_intr_vector[29] = gpio_16_intr_o; - assign rv_plic_0_intr_vector[30] = gpio_17_intr_o; - assign rv_plic_0_intr_vector[31] = gpio_18_intr_o; - assign rv_plic_0_intr_vector[32] = gpio_19_intr_o; - assign rv_plic_0_intr_vector[33] = gpio_20_intr_o; - assign rv_plic_0_intr_vector[34] = gpio_21_intr_o; - assign rv_plic_0_intr_vector[35] = gpio_22_intr_o; - assign rv_plic_0_intr_vector[36] = gpio_23_intr_o; - assign rv_plic_0_intr_vector[37] = gpio_24_intr_o; - assign rv_plic_0_intr_vector[38] = gpio_25_intr_o; - assign rv_plic_0_intr_vector[39] = gpio_26_intr_o; - assign rv_plic_0_intr_vector[40] = gpio_27_intr_o; - assign rv_plic_0_intr_vector[41] = gpio_28_intr_o; - assign rv_plic_0_intr_vector[42] = gpio_29_intr_o; - assign rv_plic_0_intr_vector[43] = gpio_30_intr_o; - assign rv_plic_0_intr_vector[44] = gpio_31_intr_o; - assign rv_plic_0_intr_vector[45] = uart_0_tx_watermark_intr_o; - assign rv_plic_0_intr_vector[46] = uart_0_rx_watermark_intr_o; - assign rv_plic_0_intr_vector[47] = uart_0_tx_empty_intr_o; - assign rv_plic_0_intr_vector[48] = uart_0_rx_overflow_intr_o; - assign rv_plic_0_intr_vector[49] = uart_0_rx_frame_err_intr_o; - assign rv_plic_0_intr_vector[50] = uart_0_rx_break_err_intr_o; - assign rv_plic_0_intr_vector[51] = uart_0_rx_timeout_intr_o; - assign rv_plic_0_intr_vector[52] = uart_0_rx_parity_err_intr_o; - assign rv_plic_0_intr_vector[53] = bundle__pd_peripheral__root__if.ext_intr_0; - assign rv_plic_0_intr_vector[54] = bundle__pd_peripheral__root__if.ext_intr_1; - assign rv_plic_0_intr_vector[55] = bundle__ao_periph__pd_peripheral__if.dma_window_intr; - assign rv_plic_0_intr_vector[55] = 1'b0; - assign rv_plic_0_intr_vector[56] = 1'b0; - assign rv_plic_0_intr_vector[57] = 1'b0; - assign rv_plic_0_intr_vector[58] = 1'b0; - assign rv_plic_0_intr_vector[59] = 1'b0; - assign rv_plic_0_intr_vector[60] = 1'b0; - assign rv_plic_0_intr_vector[61] = 1'b0; - assign rv_plic_0_intr_vector[62] = 1'b0; - assign rv_plic_0_intr_vector[63] = 1'b0; - - reg_to_tlul #( - .req_t(reg_pkg::reg_req_t), - .rsp_t(reg_pkg::reg_rsp_t), - .tl_h2d_t(tlul_pkg::tl_h2d_t), - .tl_d2h_t(tlul_pkg::tl_d2h_t), - .tl_a_user_t(tlul_pkg::tl_a_user_t), - .tl_a_op_e(tlul_pkg::tl_a_op_e), - .TL_A_USER_DEFAULT(tlul_pkg::TL_A_USER_DEFAULT), - .PutFullData(tlul_pkg::PutFullData), - .Get(tlul_pkg::Get) - ) reg_to_tlul_rv_plic_0_i ( - .tl_o(rv_plic_0_tl_h2d), - .tl_i(rv_plic_0_tl_d2h), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::RV_PLIC_0_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::RV_PLIC_0_IDX]) - ); - - rv_plic rv_plic_0_i ( - .clk_i(clk_cg), - .rst_ni, - .tl_i(rv_plic_0_tl_h2d), - .tl_o(rv_plic_0_tl_d2h), - .intr_src_i(rv_plic_0_intr_vector), - .irq_id_o(), - .irq_o(bundle__core_v_mini_mcu__pd_peripheral__if.rv_plic_0_irq), - .msip_o(bundle__core_v_mini_mcu__pd_peripheral__if.rv_plic_0_msip) - ); - - pdm2pcm #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) pdm2pcm_0_i ( - .clk_i(clk_cg), - .rst_ni, - .pdm_i(bundle__pd_peripheral__root__if.pdm2pcm0_pdm0_i), - .pdm_clk_o(bundle__pd_peripheral__root__if.pdm2pcm0_pdm_clk0_o), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::PDM2PCM_0_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::PDM2PCM_0_IDX]) - ); - - logic [32-1:0] gpio_0_intr; - logic [32-1:0] gpio_0_in; - logic [32-1:0] gpio_0_out; - logic [32-1:0] gpio_0_out_en; - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_0_intr_o = gpio_0_intr[0]; - assign gpio_0_in[0] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_0_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_0_o = gpio_0_out[0]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_0_oe = gpio_0_out_en[0]; - - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_1_intr_o = gpio_0_intr[1]; - assign gpio_0_in[1] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_1_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_1_o = gpio_0_out[1]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_1_oe = gpio_0_out_en[1]; - - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_2_intr_o = gpio_0_intr[2]; - assign gpio_0_in[2] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_2_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_2_o = gpio_0_out[2]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_2_oe = gpio_0_out_en[2]; - - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_3_intr_o = gpio_0_intr[3]; - assign gpio_0_in[3] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_3_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_3_o = gpio_0_out[3]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_3_oe = gpio_0_out_en[3]; - - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_4_intr_o = gpio_0_intr[4]; - assign gpio_0_in[4] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_4_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_4_o = gpio_0_out[4]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_4_oe = gpio_0_out_en[4]; - - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_5_intr_o = gpio_0_intr[5]; - assign gpio_0_in[5] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_5_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_5_o = gpio_0_out[5]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_5_oe = gpio_0_out_en[5]; - - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_6_intr_o = gpio_0_intr[6]; - assign gpio_0_in[6] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_6_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_6_o = gpio_0_out[6]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_6_oe = gpio_0_out_en[6]; - - assign bundle__core_v_mini_mcu__pd_peripheral__if.gpio_7_intr_o = gpio_0_intr[7]; - assign gpio_0_in[7] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_7_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_7_o = gpio_0_out[7]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_7_oe = gpio_0_out_en[7]; - - assign gpio_0_in[8] = 1'b0; - - assign gpio_0_in[9] = 1'b0; - - assign gpio_0_in[10] = 1'b0; - - assign gpio_0_in[11] = 1'b0; - - assign gpio_0_in[12] = 1'b0; - - assign gpio_0_in[13] = 1'b0; - - assign gpio_0_in[14] = 1'b0; - - assign gpio_0_in[15] = 1'b0; - - assign gpio_0_in[16] = 1'b0; - - assign gpio_0_in[17] = 1'b0; - - assign gpio_0_in[18] = 1'b0; - - assign gpio_0_in[19] = 1'b0; - - assign gpio_0_in[20] = 1'b0; - - assign gpio_0_in[21] = 1'b0; - - assign gpio_0_in[22] = 1'b0; - - assign gpio_0_in[23] = 1'b0; - - assign gpio_0_in[24] = 1'b0; - - assign gpio_0_in[25] = 1'b0; - - assign gpio_0_in[26] = 1'b0; - - assign gpio_0_in[27] = 1'b0; - - assign gpio_0_in[28] = 1'b0; - - assign gpio_0_in[29] = 1'b0; - - assign gpio_0_in[30] = 1'b0; - - assign gpio_0_in[31] = 1'b0; - - gpio #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) gpio_0_i ( - .clk_i(clk_cg), - .rst_ni, - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::GPIO_0_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::GPIO_0_IDX]), - .gpio_in(gpio_0_in), - .gpio_out(gpio_0_out), - .gpio_tx_en_o(gpio_0_out_en), - .gpio_in_sync_o(), - .pin_level_interrupts_o(gpio_0_intr), - .global_interrupt_o() - ); - - logic [32-1:0] gpio_1_intr; - logic [32-1:0] gpio_1_in; - logic [32-1:0] gpio_1_out; - logic [32-1:0] gpio_1_out_en; - assign gpio_1_in[0] = 1'b0; - - assign gpio_1_in[1] = 1'b0; - - assign gpio_1_in[2] = 1'b0; - - assign gpio_1_in[3] = 1'b0; - - assign gpio_1_in[4] = 1'b0; - - assign gpio_1_in[5] = 1'b0; - - assign gpio_1_in[6] = 1'b0; - - assign gpio_1_in[7] = 1'b0; - - assign gpio_8_intr_o = gpio_1_intr[8]; - assign gpio_1_in[8] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_8_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_8_o = gpio_1_out[8]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_8_oe = gpio_1_out_en[8]; - - assign gpio_9_intr_o = gpio_1_intr[9]; - assign gpio_1_in[9] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_9_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_9_o = gpio_1_out[9]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_9_oe = gpio_1_out_en[9]; - - assign gpio_10_intr_o = gpio_1_intr[10]; - assign gpio_1_in[10] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_10_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_10_o = gpio_1_out[10]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_10_oe = gpio_1_out_en[10]; - - assign gpio_11_intr_o = gpio_1_intr[11]; - assign gpio_1_in[11] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_11_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_11_o = gpio_1_out[11]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_11_oe = gpio_1_out_en[11]; - - assign gpio_12_intr_o = gpio_1_intr[12]; - assign gpio_1_in[12] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_12_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_12_o = gpio_1_out[12]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_12_oe = gpio_1_out_en[12]; - - assign gpio_13_intr_o = gpio_1_intr[13]; - assign gpio_1_in[13] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_13_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_13_o = gpio_1_out[13]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_13_oe = gpio_1_out_en[13]; - - assign gpio_14_intr_o = gpio_1_intr[14]; - assign gpio_1_in[14] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_14_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_14_o = gpio_1_out[14]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_14_oe = gpio_1_out_en[14]; - - assign gpio_15_intr_o = gpio_1_intr[15]; - assign gpio_1_in[15] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_15_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_15_o = gpio_1_out[15]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_15_oe = gpio_1_out_en[15]; - - assign gpio_16_intr_o = gpio_1_intr[16]; - assign gpio_1_in[16] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_16_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_16_o = gpio_1_out[16]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_16_oe = gpio_1_out_en[16]; - - assign gpio_17_intr_o = gpio_1_intr[17]; - assign gpio_1_in[17] = bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_17_i; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_17_o = gpio_1_out[17]; - assign bundle__pad_ring__pd_peripheral__if.io_pad_target_gpio_17_oe = gpio_1_out_en[17]; - - assign gpio_18_intr_o = gpio_1_intr[18]; - assign gpio_1_in[18] = bundle__pd_peripheral__root__if.io_pad_target_gpio_18_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_18_o = gpio_1_out[18]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_18_oe = gpio_1_out_en[18]; - - assign gpio_19_intr_o = gpio_1_intr[19]; - assign gpio_1_in[19] = bundle__pd_peripheral__root__if.io_pad_target_gpio_19_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_19_o = gpio_1_out[19]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_19_oe = gpio_1_out_en[19]; - - assign gpio_20_intr_o = gpio_1_intr[20]; - assign gpio_1_in[20] = bundle__pd_peripheral__root__if.io_pad_target_gpio_20_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_20_o = gpio_1_out[20]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_20_oe = gpio_1_out_en[20]; - - assign gpio_21_intr_o = gpio_1_intr[21]; - assign gpio_1_in[21] = bundle__pd_peripheral__root__if.io_pad_target_gpio_21_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_21_o = gpio_1_out[21]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_21_oe = gpio_1_out_en[21]; - - assign gpio_22_intr_o = gpio_1_intr[22]; - assign gpio_1_in[22] = bundle__pd_peripheral__root__if.io_pad_target_gpio_22_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_22_o = gpio_1_out[22]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_22_oe = gpio_1_out_en[22]; - - assign gpio_23_intr_o = gpio_1_intr[23]; - assign gpio_1_in[23] = bundle__pd_peripheral__root__if.io_pad_target_gpio_23_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_23_o = gpio_1_out[23]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_23_oe = gpio_1_out_en[23]; - - assign gpio_24_intr_o = gpio_1_intr[24]; - assign gpio_1_in[24] = bundle__pd_peripheral__root__if.io_pad_target_gpio_24_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_24_o = gpio_1_out[24]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_24_oe = gpio_1_out_en[24]; - - assign gpio_25_intr_o = gpio_1_intr[25]; - assign gpio_1_in[25] = bundle__pd_peripheral__root__if.io_pad_target_gpio_25_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_25_o = gpio_1_out[25]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_25_oe = gpio_1_out_en[25]; - - assign gpio_26_intr_o = gpio_1_intr[26]; - assign gpio_1_in[26] = bundle__pd_peripheral__root__if.io_pad_target_gpio_26_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_26_o = gpio_1_out[26]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_26_oe = gpio_1_out_en[26]; - - assign gpio_27_intr_o = gpio_1_intr[27]; - assign gpio_1_in[27] = bundle__pd_peripheral__root__if.io_pad_target_gpio_27_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_27_o = gpio_1_out[27]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_27_oe = gpio_1_out_en[27]; - - assign gpio_28_intr_o = gpio_1_intr[28]; - assign gpio_1_in[28] = bundle__pd_peripheral__root__if.io_pad_target_gpio_28_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_28_o = gpio_1_out[28]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_28_oe = gpio_1_out_en[28]; - - assign gpio_29_intr_o = gpio_1_intr[29]; - assign gpio_1_in[29] = bundle__pd_peripheral__root__if.io_pad_target_gpio_29_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_29_o = gpio_1_out[29]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_29_oe = gpio_1_out_en[29]; - - assign gpio_30_intr_o = gpio_1_intr[30]; - assign gpio_1_in[30] = bundle__pd_peripheral__root__if.io_pad_target_gpio_30_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_30_o = gpio_1_out[30]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_30_oe = gpio_1_out_en[30]; - - assign gpio_31_intr_o = gpio_1_intr[31]; - assign gpio_1_in[31] = bundle__pd_peripheral__root__if.io_pad_target_gpio_31_i; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_31_o = gpio_1_out[31]; - assign bundle__pd_peripheral__root__if.io_pad_target_gpio_31_oe = gpio_1_out_en[31]; - - gpio #( - .reg_req_t(reg_pkg::reg_req_t), - .reg_rsp_t(reg_pkg::reg_rsp_t) - ) gpio_1_i ( - .clk_i(clk_cg), - .rst_ni, - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::GPIO_1_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::GPIO_1_IDX]), - .gpio_in(gpio_1_in), - .gpio_out(gpio_1_out), - .gpio_tx_en_o(gpio_1_out_en), - .gpio_in_sync_o(), - .pin_level_interrupts_o(gpio_1_intr), - .global_interrupt_o() - ); - - reg_to_tlul #( - .req_t(reg_pkg::reg_req_t), - .rsp_t(reg_pkg::reg_rsp_t), - .tl_h2d_t(tlul_pkg::tl_h2d_t), - .tl_d2h_t(tlul_pkg::tl_d2h_t), - .tl_a_user_t(tlul_pkg::tl_a_user_t), - .tl_a_op_e(tlul_pkg::tl_a_op_e), - .TL_A_USER_DEFAULT(tlul_pkg::TL_A_USER_DEFAULT), - .PutFullData(tlul_pkg::PutFullData), - .Get(tlul_pkg::Get) - ) reg_to_tlul_uart_0_i ( - .tl_o(uart_0_tl_h2d), - .tl_i(uart_0_tl_d2h), - .reg_req_i(peripheral_slv_req[core_v_mini_mcu_pkg::UART_0_IDX]), - .reg_rsp_o(peripheral_slv_rsp[core_v_mini_mcu_pkg::UART_0_IDX]) - ); - - uart uart_0_i ( - .clk_i(clk_cg), - .rst_ni, - .intr_tx_watermark_o(uart_0_tx_watermark_intr_o), - .intr_rx_watermark_o(uart_0_rx_watermark_intr_o), - .intr_tx_empty_o(uart_0_tx_empty_intr_o), - .intr_rx_overflow_o(uart_0_rx_overflow_intr_o), - .intr_rx_frame_err_o(uart_0_rx_frame_err_intr_o), - .intr_rx_break_err_o(uart_0_rx_break_err_intr_o), - .intr_rx_timeout_o(uart_0_rx_timeout_intr_o), - .intr_rx_parity_err_o(uart_0_rx_parity_err_intr_o), - .cio_rx_i(bundle__pad_ring__pd_peripheral__if.uart0_rx0_i), - .cio_tx_o(bundle__pad_ring__pd_peripheral__if.uart0_tx0_o), - .cio_tx_en_o(bundle__pad_ring__pd_peripheral__if.uart0_tx0_oe), - .tl_i(uart_0_tl_h2d), - .tl_o(uart_0_tl_d2h) - ); - - -endmodule : peripheral_subsystem