lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1 | // Copyright lowRISC contributors. |
| 2 | // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | // SPDX-License-Identifier: Apache-2.0 |
Michael Schaffner | 40b6bd2 | 2020-10-27 19:52:23 -0700 | [diff] [blame] | 4 | // |
| 5 | // ------------------- W A R N I N G: A U T O - G E N E R A T E D C O D E !! -------------------// |
| 6 | // PLEASE DO NOT HAND-EDIT THIS FILE. IT HAS BEEN AUTO-GENERATED WITH THE FOLLOWING COMMAND: |
| 7 | // |
| 8 | // util/topgen.py -t hw/top_earlgrey/data/top_earlgrey.hjson \ |
Michael Schaffner | 40b6bd2 | 2020-10-27 19:52:23 -0700 | [diff] [blame] | 9 | // -o hw/top_earlgrey/ \ |
| 10 | // --rnd_cnst_seed 4881560218908238235 |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 11 | |
Timothy Chen | 7ff5312 | 2019-09-19 15:20:43 -0700 | [diff] [blame] | 12 | module top_earlgrey #( |
Pirmin Vogel | 15e1b91 | 2020-09-16 14:43:22 +0200 | [diff] [blame] | 13 | // Auto-inferred parameters |
Michael Schaffner | 20972a6 | 2021-02-24 18:53:46 -0800 | [diff] [blame] | 14 | parameter OtpCtrlMemInitFile = "", |
Michael Schaffner | 5f54587 | 2021-03-05 17:54:28 -0800 | [diff] [blame] | 15 | parameter pinmux_pkg::target_cfg_t PinmuxAonTargetCfg = pinmux_pkg::DefaultTargetCfg, |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 16 | parameter bit SramCtrlRetAonInstrExec = 1, |
Timothy Chen | 20ae79e | 2020-11-03 16:25:03 -0800 | [diff] [blame] | 17 | parameter bit AesMasking = 1'b1, |
Pirmin Vogel | e6ca872 | 2021-01-31 11:36:47 +0100 | [diff] [blame] | 18 | parameter aes_pkg::sbox_impl_e AesSBoxImpl = aes_pkg::SBoxImplDom, |
Pirmin Vogel | 15e1b91 | 2020-09-16 14:43:22 +0200 | [diff] [blame] | 19 | parameter int unsigned SecAesStartTriggerDelay = 0, |
Pirmin Vogel | 4429c36 | 2020-10-02 17:54:11 +0200 | [diff] [blame] | 20 | parameter bit SecAesAllowForcingMasks = 1'b0, |
Pirmin Vogel | 95cea45 | 2021-03-02 08:54:01 +0100 | [diff] [blame] | 21 | parameter bit SecAesSkipPRNGReseeding = 1'b0, |
Eunchan Kim | f7ed184 | 2020-12-29 12:59:39 -0800 | [diff] [blame] | 22 | parameter bit KmacEnMasking = 0, |
Eunchan Kim | e5d33b7 | 2020-11-03 14:34:16 -0800 | [diff] [blame] | 23 | parameter int KmacReuseShare = 0, |
Pirmin Vogel | f839476 | 2021-02-19 11:32:39 +0100 | [diff] [blame] | 24 | parameter aes_pkg::sbox_impl_e CsrngSBoxImpl = aes_pkg::SBoxImplCanright, |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 25 | parameter bit SramCtrlMainInstrExec = 1, |
Pirmin Vogel | 69b55a8 | 2020-10-01 09:54:39 +0200 | [diff] [blame] | 26 | parameter otbn_pkg::regfile_e OtbnRegFile = otbn_pkg::RegFileFF, |
Rupert Swarbrick | 9855d4b | 2020-12-02 08:41:35 +0000 | [diff] [blame] | 27 | parameter RomCtrlBootRomInitFile = "", |
Pirmin Vogel | 15e1b91 | 2020-09-16 14:43:22 +0200 | [diff] [blame] | 28 | |
| 29 | // Manually defined parameters |
Pirmin Vogel | 4eb2502 | 2020-08-27 15:27:33 +0200 | [diff] [blame] | 30 | parameter ibex_pkg::regfile_e IbexRegFile = ibex_pkg::RegFileFF, |
Tom Roberts | 7824ccc | 2020-11-05 11:34:03 +0000 | [diff] [blame] | 31 | parameter bit IbexICache = 1, |
Rupert Swarbrick | 9855d4b | 2020-12-02 08:41:35 +0000 | [diff] [blame] | 32 | parameter bit IbexPipeLine = 0 |
Timothy Chen | 7ff5312 | 2019-09-19 15:20:43 -0700 | [diff] [blame] | 33 | ) ( |
Timothy Chen | 371c94d | 2020-06-30 17:18:14 -0700 | [diff] [blame] | 34 | // Reset, clocks defined as part of intermodule |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 35 | input rst_ni, |
| 36 | |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 37 | // Multiplexed I/O |
Michael Schaffner | b5b8eba | 2021-02-09 20:07:04 -0800 | [diff] [blame] | 38 | input [43:0] mio_in_i, |
| 39 | output logic [43:0] mio_out_o, |
| 40 | output logic [43:0] mio_oe_o, |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 41 | // Dedicated I/O |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 42 | input [20:0] dio_in_i, |
| 43 | output logic [20:0] dio_out_o, |
| 44 | output logic [20:0] dio_oe_o, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 45 | |
Michael Schaffner | 79eb65f | 2020-05-01 19:12:47 -0700 | [diff] [blame] | 46 | // pad attributes to padring |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 47 | output prim_pad_wrapper_pkg::pad_attr_t [pinmux_reg_pkg::NMioPads-1:0] mio_attr_o, |
| 48 | output prim_pad_wrapper_pkg::pad_attr_t [pinmux_reg_pkg::NDioPads-1:0] dio_attr_o, |
Michael Schaffner | 79eb65f | 2020-05-01 19:12:47 -0700 | [diff] [blame] | 49 | |
Timothy Chen | 371c94d | 2020-06-30 17:18:14 -0700 | [diff] [blame] | 50 | |
| 51 | // Inter-module Signal External type |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 52 | output ast_pkg::adc_ast_req_t adc_req_o, |
| 53 | input ast_pkg::adc_ast_rsp_t adc_rsp_i, |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 54 | input edn_pkg::edn_req_t ast_edn_req_i, |
| 55 | output edn_pkg::edn_rsp_t ast_edn_rsp_o, |
| 56 | output lc_ctrl_pkg::lc_tx_t ast_lc_dft_en_o, |
| 57 | input prim_ram_1p_pkg::ram_1p_cfg_t ram_1p_cfg_i, |
| 58 | input prim_ram_2p_pkg::ram_2p_cfg_t ram_2p_cfg_i, |
| 59 | input prim_rom_pkg::rom_cfg_t rom_cfg_i, |
Eunchan Kim | 5511bbe | 2020-08-07 14:04:20 -0700 | [diff] [blame] | 60 | input logic clk_main_i, |
| 61 | input logic clk_io_i, |
| 62 | input logic clk_usb_i, |
| 63 | input logic clk_aon_i, |
Timothy Chen | e38c470 | 2021-02-08 18:38:03 -0800 | [diff] [blame] | 64 | output logic clk_main_jitter_en_o, |
Timothy Chen | fa60a60 | 2021-03-23 14:29:40 -0700 | [diff] [blame] | 65 | output lc_ctrl_pkg::lc_tx_t ast_clk_byp_req_o, |
| 66 | input lc_ctrl_pkg::lc_tx_t ast_clk_byp_ack_i, |
Timothy Chen | d39fd39 | 2021-01-15 21:29:36 -0800 | [diff] [blame] | 67 | input lc_ctrl_pkg::lc_tx_t flash_bist_enable_i, |
Timothy Chen | 2422a6c | 2020-11-19 16:06:14 -0800 | [diff] [blame] | 68 | input logic flash_power_down_h_i, |
| 69 | input logic flash_power_ready_h_i, |
Timothy Chen | ea59ad3 | 2021-02-03 17:51:38 -0800 | [diff] [blame] | 70 | output entropy_src_pkg::entropy_src_rng_req_t es_rng_req_o, |
| 71 | input entropy_src_pkg::entropy_src_rng_rsp_t es_rng_rsp_i, |
Timothy Chen | 5270b7c | 2021-03-17 17:38:30 -0700 | [diff] [blame] | 72 | output logic es_rng_fips_o, |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 73 | output tlul_pkg::tl_h2d_t ast_tl_req_o, |
| 74 | input tlul_pkg::tl_d2h_t ast_tl_rsp_i, |
| 75 | output pinmux_pkg::dft_strap_test_req_t dft_strap_test_o, |
| 76 | output pwrmgr_pkg::pwr_ast_req_t pwrmgr_ast_req_o, |
| 77 | input pwrmgr_pkg::pwr_ast_rsp_t pwrmgr_ast_rsp_i, |
| 78 | output otp_ctrl_pkg::otp_ast_req_t otp_ctrl_otp_ast_pwr_seq_o, |
| 79 | input otp_ctrl_pkg::otp_ast_rsp_t otp_ctrl_otp_ast_pwr_seq_h_i, |
| 80 | input ast_pkg::ast_alert_req_t sensor_ctrl_ast_alert_req_i, |
| 81 | output ast_pkg::ast_alert_rsp_t sensor_ctrl_ast_alert_rsp_o, |
| 82 | input ast_pkg::ast_status_t sensor_ctrl_ast_status_i, |
| 83 | output logic [9:0] pinmux2ast_o, |
| 84 | input logic [9:0] ast2pinmux_i, |
| 85 | output logic usbdev_usb_ref_val_o, |
| 86 | output logic usbdev_usb_ref_pulse_o, |
Timothy Chen | 437fd9a | 2020-08-26 12:48:40 -0700 | [diff] [blame] | 87 | output clkmgr_pkg::clkmgr_ast_out_t clks_ast_o, |
| 88 | output rstmgr_pkg::rstmgr_ast_out_t rsts_ast_o, |
Timothy Chen | 5270b7c | 2021-03-17 17:38:30 -0700 | [diff] [blame] | 89 | |
| 90 | // Flash specific voltages |
| 91 | inout [3:0] flash_test_mode_a_io, |
| 92 | inout flash_test_voltage_h_io, |
| 93 | |
Timothy Chen | e38c470 | 2021-02-08 18:38:03 -0800 | [diff] [blame] | 94 | input scan_rst_ni, // reset used for test mode |
| 95 | input scan_en_i, |
Michael Schaffner | 8bf4fe6 | 2021-02-18 12:56:08 -0800 | [diff] [blame] | 96 | input lc_ctrl_pkg::lc_tx_t scanmode_i // lc_ctrl_pkg::On for Scan |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 97 | ); |
| 98 | |
Philipp Wagner | 086b703 | 2019-10-25 17:06:15 +0100 | [diff] [blame] | 99 | // JTAG IDCODE for development versions of this code. |
| 100 | // Manufacturers of OpenTitan chips must replace this code with one of their |
| 101 | // own IDs. |
| 102 | // Field structure as defined in the IEEE 1149.1 (JTAG) specification, |
| 103 | // section 12.1.1. |
Michael Schaffner | d4d5d2f | 2020-04-17 15:45:55 -0700 | [diff] [blame] | 104 | localparam logic [31:0] JTAG_IDCODE = { |
Philipp Wagner | 086b703 | 2019-10-25 17:06:15 +0100 | [diff] [blame] | 105 | 4'h0, // Version |
| 106 | 16'h4F54, // Part Number: "OT" |
Philipp Wagner | f57964e | 2019-11-04 17:57:06 +0000 | [diff] [blame] | 107 | 11'h426, // Manufacturer Identity: Google |
Philipp Wagner | 086b703 | 2019-10-25 17:06:15 +0100 | [diff] [blame] | 108 | 1'b1 // (fixed) |
| 109 | }; |
| 110 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 111 | import tlul_pkg::*; |
| 112 | import top_pkg::*; |
| 113 | import tl_main_pkg::*; |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 114 | import top_earlgrey_pkg::*; |
Michael Schaffner | 40b6bd2 | 2020-10-27 19:52:23 -0700 | [diff] [blame] | 115 | // Compile-time random constants |
| 116 | import top_earlgrey_rnd_cnst_pkg::*; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 117 | |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 118 | // Signals |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 119 | logic [58:0] mio_p2d; |
| 120 | logic [62:0] mio_d2p; |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 121 | logic [62:0] mio_en_d2p; |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 122 | logic [20:0] dio_p2d; |
| 123 | logic [20:0] dio_d2p; |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 124 | logic [20:0] dio_en_d2p; |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 125 | // uart0 |
| 126 | logic cio_uart0_rx_p2d; |
| 127 | logic cio_uart0_tx_d2p; |
| 128 | logic cio_uart0_tx_en_d2p; |
| 129 | // uart1 |
| 130 | logic cio_uart1_rx_p2d; |
| 131 | logic cio_uart1_tx_d2p; |
| 132 | logic cio_uart1_tx_en_d2p; |
| 133 | // uart2 |
| 134 | logic cio_uart2_rx_p2d; |
| 135 | logic cio_uart2_tx_d2p; |
| 136 | logic cio_uart2_tx_en_d2p; |
| 137 | // uart3 |
| 138 | logic cio_uart3_rx_p2d; |
| 139 | logic cio_uart3_tx_d2p; |
| 140 | logic cio_uart3_tx_en_d2p; |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 141 | // gpio |
| 142 | logic [31:0] cio_gpio_gpio_p2d; |
| 143 | logic [31:0] cio_gpio_gpio_d2p; |
| 144 | logic [31:0] cio_gpio_gpio_en_d2p; |
| 145 | // spi_device |
| 146 | logic cio_spi_device_sck_p2d; |
| 147 | logic cio_spi_device_csb_p2d; |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 148 | logic [3:0] cio_spi_device_sd_p2d; |
| 149 | logic [3:0] cio_spi_device_sd_d2p; |
| 150 | logic [3:0] cio_spi_device_sd_en_d2p; |
| 151 | // spi_host0 |
| 152 | logic [3:0] cio_spi_host0_sd_p2d; |
| 153 | logic cio_spi_host0_sck_d2p; |
| 154 | logic cio_spi_host0_sck_en_d2p; |
| 155 | logic cio_spi_host0_csb_d2p; |
| 156 | logic cio_spi_host0_csb_en_d2p; |
| 157 | logic [3:0] cio_spi_host0_sd_d2p; |
| 158 | logic [3:0] cio_spi_host0_sd_en_d2p; |
| 159 | // spi_host1 |
| 160 | logic [3:0] cio_spi_host1_sd_p2d; |
| 161 | logic cio_spi_host1_sck_d2p; |
| 162 | logic cio_spi_host1_sck_en_d2p; |
| 163 | logic cio_spi_host1_csb_d2p; |
| 164 | logic cio_spi_host1_csb_en_d2p; |
| 165 | logic [3:0] cio_spi_host1_sd_d2p; |
| 166 | logic [3:0] cio_spi_host1_sd_en_d2p; |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 167 | // i2c0 |
| 168 | logic cio_i2c0_sda_p2d; |
| 169 | logic cio_i2c0_scl_p2d; |
| 170 | logic cio_i2c0_sda_d2p; |
| 171 | logic cio_i2c0_sda_en_d2p; |
| 172 | logic cio_i2c0_scl_d2p; |
| 173 | logic cio_i2c0_scl_en_d2p; |
| 174 | // i2c1 |
| 175 | logic cio_i2c1_sda_p2d; |
| 176 | logic cio_i2c1_scl_p2d; |
| 177 | logic cio_i2c1_sda_d2p; |
| 178 | logic cio_i2c1_sda_en_d2p; |
| 179 | logic cio_i2c1_scl_d2p; |
| 180 | logic cio_i2c1_scl_en_d2p; |
| 181 | // i2c2 |
| 182 | logic cio_i2c2_sda_p2d; |
| 183 | logic cio_i2c2_scl_p2d; |
| 184 | logic cio_i2c2_sda_d2p; |
| 185 | logic cio_i2c2_sda_en_d2p; |
| 186 | logic cio_i2c2_scl_d2p; |
| 187 | logic cio_i2c2_scl_en_d2p; |
| 188 | // pattgen |
| 189 | logic cio_pattgen_pda0_tx_d2p; |
| 190 | logic cio_pattgen_pda0_tx_en_d2p; |
| 191 | logic cio_pattgen_pcl0_tx_d2p; |
| 192 | logic cio_pattgen_pcl0_tx_en_d2p; |
| 193 | logic cio_pattgen_pda1_tx_d2p; |
| 194 | logic cio_pattgen_pda1_tx_en_d2p; |
| 195 | logic cio_pattgen_pcl1_tx_d2p; |
| 196 | logic cio_pattgen_pcl1_tx_en_d2p; |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 197 | // rv_timer |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 198 | // usbdev |
| 199 | logic cio_usbdev_sense_p2d; |
Pirmin Vogel | b054fc0 | 2020-03-11 11:23:03 +0100 | [diff] [blame] | 200 | logic cio_usbdev_d_p2d; |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 201 | logic cio_usbdev_dp_p2d; |
| 202 | logic cio_usbdev_dn_p2d; |
Pirmin Vogel | b054fc0 | 2020-03-11 11:23:03 +0100 | [diff] [blame] | 203 | logic cio_usbdev_se0_d2p; |
| 204 | logic cio_usbdev_se0_en_d2p; |
Pirmin Vogel | fe6863b | 2020-05-11 17:30:54 +0200 | [diff] [blame] | 205 | logic cio_usbdev_dp_pullup_d2p; |
| 206 | logic cio_usbdev_dp_pullup_en_d2p; |
| 207 | logic cio_usbdev_dn_pullup_d2p; |
| 208 | logic cio_usbdev_dn_pullup_en_d2p; |
Pirmin Vogel | b054fc0 | 2020-03-11 11:23:03 +0100 | [diff] [blame] | 209 | logic cio_usbdev_tx_mode_se_d2p; |
| 210 | logic cio_usbdev_tx_mode_se_en_d2p; |
| 211 | logic cio_usbdev_suspend_d2p; |
| 212 | logic cio_usbdev_suspend_en_d2p; |
| 213 | logic cio_usbdev_d_d2p; |
| 214 | logic cio_usbdev_d_en_d2p; |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 215 | logic cio_usbdev_dp_d2p; |
| 216 | logic cio_usbdev_dp_en_d2p; |
| 217 | logic cio_usbdev_dn_d2p; |
| 218 | logic cio_usbdev_dn_en_d2p; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 219 | // otp_ctrl |
| 220 | // lc_ctrl |
| 221 | // alert_handler |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 222 | // pwrmgr_aon |
| 223 | // rstmgr_aon |
| 224 | // clkmgr_aon |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 225 | // adc_ctrl_aon |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 226 | // pinmux_aon |
Timothy Chen | 2b8ef76 | 2021-02-16 14:44:55 -0800 | [diff] [blame] | 227 | // aon_timer_aon |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 228 | // sensor_ctrl_aon |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 229 | logic [9:0] cio_sensor_ctrl_aon_ast_debug_in_p2d; |
| 230 | logic [9:0] cio_sensor_ctrl_aon_ast_debug_out_d2p; |
| 231 | logic [9:0] cio_sensor_ctrl_aon_ast_debug_out_en_d2p; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 232 | // sram_ctrl_ret_aon |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 233 | // flash_ctrl |
Timothy Chen | 6a34b6e | 2021-02-22 11:33:11 -0800 | [diff] [blame] | 234 | logic cio_flash_ctrl_tck_p2d; |
| 235 | logic cio_flash_ctrl_tms_p2d; |
| 236 | logic cio_flash_ctrl_tdi_p2d; |
| 237 | logic cio_flash_ctrl_tdo_d2p; |
| 238 | logic cio_flash_ctrl_tdo_en_d2p; |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 239 | // rv_plic |
| 240 | // aes |
| 241 | // hmac |
| 242 | // kmac |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 243 | // keymgr |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 244 | // csrng |
| 245 | // entropy_src |
| 246 | // edn0 |
| 247 | // edn1 |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 248 | // sram_ctrl_main |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 249 | // otbn |
Rupert Swarbrick | 9855d4b | 2020-12-02 08:41:35 +0000 | [diff] [blame] | 250 | // rom_ctrl |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 251 | |
| 252 | |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 253 | logic [177:0] intr_vector; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 254 | // Interrupt source list |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 255 | logic intr_uart0_tx_watermark; |
| 256 | logic intr_uart0_rx_watermark; |
| 257 | logic intr_uart0_tx_empty; |
| 258 | logic intr_uart0_rx_overflow; |
| 259 | logic intr_uart0_rx_frame_err; |
| 260 | logic intr_uart0_rx_break_err; |
| 261 | logic intr_uart0_rx_timeout; |
| 262 | logic intr_uart0_rx_parity_err; |
| 263 | logic intr_uart1_tx_watermark; |
| 264 | logic intr_uart1_rx_watermark; |
| 265 | logic intr_uart1_tx_empty; |
| 266 | logic intr_uart1_rx_overflow; |
| 267 | logic intr_uart1_rx_frame_err; |
| 268 | logic intr_uart1_rx_break_err; |
| 269 | logic intr_uart1_rx_timeout; |
| 270 | logic intr_uart1_rx_parity_err; |
| 271 | logic intr_uart2_tx_watermark; |
| 272 | logic intr_uart2_rx_watermark; |
| 273 | logic intr_uart2_tx_empty; |
| 274 | logic intr_uart2_rx_overflow; |
| 275 | logic intr_uart2_rx_frame_err; |
| 276 | logic intr_uart2_rx_break_err; |
| 277 | logic intr_uart2_rx_timeout; |
| 278 | logic intr_uart2_rx_parity_err; |
| 279 | logic intr_uart3_tx_watermark; |
| 280 | logic intr_uart3_rx_watermark; |
| 281 | logic intr_uart3_tx_empty; |
| 282 | logic intr_uart3_rx_overflow; |
| 283 | logic intr_uart3_rx_frame_err; |
| 284 | logic intr_uart3_rx_break_err; |
| 285 | logic intr_uart3_rx_timeout; |
| 286 | logic intr_uart3_rx_parity_err; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 287 | logic [31:0] intr_gpio_gpio; |
Eunchan Kim | 8c57fe3 | 2019-09-02 21:14:24 -0700 | [diff] [blame] | 288 | logic intr_spi_device_rxf; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 289 | logic intr_spi_device_rxlvl; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 290 | logic intr_spi_device_txlvl; |
| 291 | logic intr_spi_device_rxerr; |
Eunchan Kim | 546c0d4 | 2019-09-24 15:07:06 -0700 | [diff] [blame] | 292 | logic intr_spi_device_rxoverflow; |
| 293 | logic intr_spi_device_txunderflow; |
Martin Lueker-Boden | eb9498c | 2021-02-02 08:33:29 -0800 | [diff] [blame] | 294 | logic intr_spi_host0_error; |
| 295 | logic intr_spi_host0_spi_event; |
| 296 | logic intr_spi_host1_error; |
| 297 | logic intr_spi_host1_spi_event; |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 298 | logic intr_i2c0_fmt_watermark; |
| 299 | logic intr_i2c0_rx_watermark; |
| 300 | logic intr_i2c0_fmt_overflow; |
| 301 | logic intr_i2c0_rx_overflow; |
| 302 | logic intr_i2c0_nak; |
| 303 | logic intr_i2c0_scl_interference; |
| 304 | logic intr_i2c0_sda_interference; |
| 305 | logic intr_i2c0_stretch_timeout; |
| 306 | logic intr_i2c0_sda_unstable; |
| 307 | logic intr_i2c0_trans_complete; |
| 308 | logic intr_i2c0_tx_empty; |
| 309 | logic intr_i2c0_tx_nonempty; |
| 310 | logic intr_i2c0_tx_overflow; |
| 311 | logic intr_i2c0_acq_overflow; |
| 312 | logic intr_i2c0_ack_stop; |
| 313 | logic intr_i2c0_host_timeout; |
| 314 | logic intr_i2c1_fmt_watermark; |
| 315 | logic intr_i2c1_rx_watermark; |
| 316 | logic intr_i2c1_fmt_overflow; |
| 317 | logic intr_i2c1_rx_overflow; |
| 318 | logic intr_i2c1_nak; |
| 319 | logic intr_i2c1_scl_interference; |
| 320 | logic intr_i2c1_sda_interference; |
| 321 | logic intr_i2c1_stretch_timeout; |
| 322 | logic intr_i2c1_sda_unstable; |
| 323 | logic intr_i2c1_trans_complete; |
| 324 | logic intr_i2c1_tx_empty; |
| 325 | logic intr_i2c1_tx_nonempty; |
| 326 | logic intr_i2c1_tx_overflow; |
| 327 | logic intr_i2c1_acq_overflow; |
| 328 | logic intr_i2c1_ack_stop; |
| 329 | logic intr_i2c1_host_timeout; |
| 330 | logic intr_i2c2_fmt_watermark; |
| 331 | logic intr_i2c2_rx_watermark; |
| 332 | logic intr_i2c2_fmt_overflow; |
| 333 | logic intr_i2c2_rx_overflow; |
| 334 | logic intr_i2c2_nak; |
| 335 | logic intr_i2c2_scl_interference; |
| 336 | logic intr_i2c2_sda_interference; |
| 337 | logic intr_i2c2_stretch_timeout; |
| 338 | logic intr_i2c2_sda_unstable; |
| 339 | logic intr_i2c2_trans_complete; |
| 340 | logic intr_i2c2_tx_empty; |
| 341 | logic intr_i2c2_tx_nonempty; |
| 342 | logic intr_i2c2_tx_overflow; |
| 343 | logic intr_i2c2_acq_overflow; |
| 344 | logic intr_i2c2_ack_stop; |
| 345 | logic intr_i2c2_host_timeout; |
| 346 | logic intr_pattgen_done_ch0; |
| 347 | logic intr_pattgen_done_ch1; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 348 | logic intr_rv_timer_timer_expired_0_0; |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 349 | logic intr_usbdev_pkt_received; |
| 350 | logic intr_usbdev_pkt_sent; |
| 351 | logic intr_usbdev_disconnected; |
| 352 | logic intr_usbdev_host_lost; |
| 353 | logic intr_usbdev_link_reset; |
| 354 | logic intr_usbdev_link_suspend; |
| 355 | logic intr_usbdev_link_resume; |
| 356 | logic intr_usbdev_av_empty; |
| 357 | logic intr_usbdev_rx_full; |
| 358 | logic intr_usbdev_av_overflow; |
| 359 | logic intr_usbdev_link_in_err; |
| 360 | logic intr_usbdev_rx_crc_err; |
| 361 | logic intr_usbdev_rx_pid_err; |
| 362 | logic intr_usbdev_rx_bitstuff_err; |
| 363 | logic intr_usbdev_frame; |
| 364 | logic intr_usbdev_connected; |
Stefan Lippuner | 207b1a6 | 2020-11-10 09:25:53 +0100 | [diff] [blame] | 365 | logic intr_usbdev_link_out_err; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 366 | logic intr_otp_ctrl_otp_operation_done; |
| 367 | logic intr_otp_ctrl_otp_error; |
| 368 | logic intr_alert_handler_classa; |
| 369 | logic intr_alert_handler_classb; |
| 370 | logic intr_alert_handler_classc; |
| 371 | logic intr_alert_handler_classd; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 372 | logic intr_pwrmgr_aon_wakeup; |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 373 | logic intr_adc_ctrl_aon_debug_cable; |
Timothy Chen | 2b8ef76 | 2021-02-16 14:44:55 -0800 | [diff] [blame] | 374 | logic intr_aon_timer_aon_wkup_timer_expired; |
| 375 | logic intr_aon_timer_aon_wdog_timer_bark; |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 376 | logic intr_flash_ctrl_prog_empty; |
| 377 | logic intr_flash_ctrl_prog_lvl; |
| 378 | logic intr_flash_ctrl_rd_full; |
| 379 | logic intr_flash_ctrl_rd_lvl; |
| 380 | logic intr_flash_ctrl_op_done; |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 381 | logic intr_flash_ctrl_err; |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 382 | logic intr_hmac_hmac_done; |
| 383 | logic intr_hmac_fifo_empty; |
| 384 | logic intr_hmac_hmac_err; |
| 385 | logic intr_kmac_kmac_done; |
| 386 | logic intr_kmac_fifo_empty; |
| 387 | logic intr_kmac_kmac_err; |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 388 | logic intr_keymgr_op_done; |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 389 | logic intr_csrng_cs_cmd_req_done; |
| 390 | logic intr_csrng_cs_entropy_req; |
| 391 | logic intr_csrng_cs_hw_inst_exc; |
Mark Branstad | d65d139 | 2021-02-10 13:15:39 -0800 | [diff] [blame] | 392 | logic intr_csrng_cs_fatal_err; |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 393 | logic intr_entropy_src_es_entropy_valid; |
| 394 | logic intr_entropy_src_es_health_test_failed; |
Mark Branstad | 789ea02 | 2021-02-12 14:35:42 -0800 | [diff] [blame] | 395 | logic intr_entropy_src_es_fatal_err; |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 396 | logic intr_edn0_edn_cmd_req_done; |
Mark Branstad | 1e7fa2e | 2021-02-18 08:41:37 -0800 | [diff] [blame] | 397 | logic intr_edn0_edn_fatal_err; |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 398 | logic intr_edn1_edn_cmd_req_done; |
Mark Branstad | 1e7fa2e | 2021-02-18 08:41:37 -0800 | [diff] [blame] | 399 | logic intr_edn1_edn_fatal_err; |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 400 | logic intr_otbn_done; |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 401 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 402 | |
Michael Schaffner | d4d5d2f | 2020-04-17 15:45:55 -0700 | [diff] [blame] | 403 | |
Michael Schaffner | 1ba89b8 | 2019-11-03 14:25:54 -0800 | [diff] [blame] | 404 | logic [0:0] irq_plic; |
| 405 | logic [0:0] msip; |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 406 | logic [7:0] irq_id[1]; |
| 407 | logic [7:0] unused_irq_id[1]; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 408 | |
Michael Schaffner | 1ba89b8 | 2019-11-03 14:25:54 -0800 | [diff] [blame] | 409 | // this avoids lint errors |
| 410 | assign unused_irq_id = irq_id; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 411 | |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 412 | // Alert list |
Philipp Wagner | 79725e1 | 2020-03-03 23:34:38 +0000 | [diff] [blame] | 413 | prim_alert_pkg::alert_tx_t [alert_pkg::NAlerts-1:0] alert_tx; |
| 414 | prim_alert_pkg::alert_rx_t [alert_pkg::NAlerts-1:0] alert_rx; |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 415 | |
| 416 | |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 417 | // define inter-module signals |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 418 | prim_ram_1p_pkg::ram_1p_cfg_t ast_ram_1p_cfg; |
| 419 | prim_ram_2p_pkg::ram_2p_cfg_t ast_ram_2p_cfg; |
| 420 | prim_rom_pkg::rom_cfg_t ast_rom_cfg; |
Timothy Chen | ccf343d | 2020-12-04 20:38:15 -0800 | [diff] [blame] | 421 | alert_pkg::alert_crashdump_t alert_handler_crashdump; |
Timothy Chen | c0d32d9 | 2020-12-16 18:01:22 -0800 | [diff] [blame] | 422 | prim_esc_pkg::esc_rx_t [3:0] alert_handler_esc_rx; |
| 423 | prim_esc_pkg::esc_tx_t [3:0] alert_handler_esc_tx; |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 424 | csrng_pkg::csrng_req_t [1:0] csrng_csrng_cmd_req; |
| 425 | csrng_pkg::csrng_rsp_t [1:0] csrng_csrng_cmd_rsp; |
Timothy Chen | ccf343d | 2020-12-04 20:38:15 -0800 | [diff] [blame] | 426 | entropy_src_pkg::entropy_src_hw_if_req_t csrng_entropy_src_hw_if_req; |
| 427 | entropy_src_pkg::entropy_src_hw_if_rsp_t csrng_entropy_src_hw_if_rsp; |
Mark Branstad | de7eba3 | 2021-03-22 14:18:38 -0700 | [diff] [blame] | 428 | entropy_src_pkg::cs_aes_halt_req_t csrng_cs_aes_halt_req; |
| 429 | entropy_src_pkg::cs_aes_halt_rsp_t csrng_cs_aes_halt_rsp; |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 430 | flash_ctrl_pkg::flash_req_t flash_ctrl_flash_req; |
| 431 | flash_ctrl_pkg::flash_rsp_t flash_ctrl_flash_rsp; |
Timothy Chen | ccf343d | 2020-12-04 20:38:15 -0800 | [diff] [blame] | 432 | flash_ctrl_pkg::keymgr_flash_t flash_ctrl_keymgr; |
| 433 | otp_ctrl_pkg::flash_otp_key_req_t flash_ctrl_otp_req; |
| 434 | otp_ctrl_pkg::flash_otp_key_rsp_t flash_ctrl_otp_rsp; |
Timothy Chen | 3cb138f | 2020-12-15 20:35:03 -0800 | [diff] [blame] | 435 | lc_ctrl_pkg::lc_tx_t flash_ctrl_rma_req; |
| 436 | lc_ctrl_pkg::lc_tx_t flash_ctrl_rma_ack; |
| 437 | lc_ctrl_pkg::lc_flash_rma_seed_t flash_ctrl_rma_seed; |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 438 | sram_ctrl_pkg::sram_scr_req_t sram_ctrl_main_sram_scr_req; |
| 439 | sram_ctrl_pkg::sram_scr_rsp_t sram_ctrl_main_sram_scr_rsp; |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 440 | sram_ctrl_pkg::sram_scr_init_req_t sram_ctrl_main_sram_scr_init_req; |
| 441 | sram_ctrl_pkg::sram_scr_init_rsp_t sram_ctrl_main_sram_scr_init_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 442 | sram_ctrl_pkg::sram_scr_req_t sram_ctrl_ret_aon_sram_scr_req; |
| 443 | sram_ctrl_pkg::sram_scr_rsp_t sram_ctrl_ret_aon_sram_scr_rsp; |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 444 | sram_ctrl_pkg::sram_scr_init_req_t sram_ctrl_ret_aon_sram_scr_init_req; |
| 445 | sram_ctrl_pkg::sram_scr_init_rsp_t sram_ctrl_ret_aon_sram_scr_init_rsp; |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 446 | tlul_pkg::tl_instr_en_t sram_ctrl_main_en_ifetch; |
| 447 | tlul_pkg::tl_instr_en_t sram_ctrl_ret_aon_en_ifetch; |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 448 | logic ram_main_intg_error; |
| 449 | logic ram_ret_aon_intg_error; |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 450 | otp_ctrl_pkg::sram_otp_key_req_t [1:0] otp_ctrl_sram_otp_key_req; |
| 451 | otp_ctrl_pkg::sram_otp_key_rsp_t [1:0] otp_ctrl_sram_otp_key_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 452 | pwrmgr_pkg::pwr_flash_req_t pwrmgr_aon_pwr_flash_req; |
| 453 | pwrmgr_pkg::pwr_flash_rsp_t pwrmgr_aon_pwr_flash_rsp; |
| 454 | pwrmgr_pkg::pwr_rst_req_t pwrmgr_aon_pwr_rst_req; |
| 455 | pwrmgr_pkg::pwr_rst_rsp_t pwrmgr_aon_pwr_rst_rsp; |
| 456 | pwrmgr_pkg::pwr_clk_req_t pwrmgr_aon_pwr_clk_req; |
| 457 | pwrmgr_pkg::pwr_clk_rsp_t pwrmgr_aon_pwr_clk_rsp; |
| 458 | pwrmgr_pkg::pwr_otp_req_t pwrmgr_aon_pwr_otp_req; |
| 459 | pwrmgr_pkg::pwr_otp_rsp_t pwrmgr_aon_pwr_otp_rsp; |
| 460 | pwrmgr_pkg::pwr_lc_req_t pwrmgr_aon_pwr_lc_req; |
| 461 | pwrmgr_pkg::pwr_lc_rsp_t pwrmgr_aon_pwr_lc_rsp; |
Timothy Chen | 383afb8 | 2021-02-23 13:18:53 -0800 | [diff] [blame] | 462 | logic pwrmgr_aon_strap; |
| 463 | logic pwrmgr_aon_low_power; |
Tom Roberts | c88e97f | 2021-03-04 13:38:20 +0000 | [diff] [blame] | 464 | ibex_pkg::crash_dump_t rv_core_ibex_crash_dump; |
Timothy Chen | c2b279a | 2021-01-14 18:53:34 -0800 | [diff] [blame] | 465 | logic usbdev_usb_out_of_rst; |
| 466 | logic usbdev_usb_aon_wake_en; |
| 467 | logic usbdev_usb_aon_wake_ack; |
| 468 | logic usbdev_usb_suspend; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 469 | usbdev_pkg::awk_state_t pinmux_aon_usb_state_debug; |
Greg Chadwick | cc0dd2a | 2021-03-10 15:55:58 +0000 | [diff] [blame] | 470 | edn_pkg::edn_req_t [6:0] edn0_edn_req; |
| 471 | edn_pkg::edn_rsp_t [6:0] edn0_edn_rsp; |
| 472 | edn_pkg::edn_req_t [6:0] edn1_edn_req; |
| 473 | edn_pkg::edn_rsp_t [6:0] edn1_edn_rsp; |
Timothy Chen | 77cc8b9 | 2020-12-05 09:19:14 -0800 | [diff] [blame] | 474 | otp_ctrl_pkg::otp_keymgr_key_t otp_ctrl_otp_keymgr_key; |
Eunchan Kim | e5d33b7 | 2020-11-03 14:34:16 -0800 | [diff] [blame] | 475 | keymgr_pkg::hw_key_req_t keymgr_kmac_key; |
Eunchan Kim | 4af433f | 2021-03-25 17:11:41 -0700 | [diff] [blame] | 476 | kmac_pkg::app_req_t [2:0] kmac_app_req; |
| 477 | kmac_pkg::app_rsp_t [2:0] kmac_app_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 478 | logic [3:0] clkmgr_aon_idle; |
Michael Schaffner | a706380 | 2021-02-18 18:06:03 -0800 | [diff] [blame] | 479 | jtag_pkg::jtag_req_t pinmux_aon_lc_jtag_req; |
| 480 | jtag_pkg::jtag_rsp_t pinmux_aon_lc_jtag_rsp; |
Michael Schaffner | 5f54587 | 2021-03-05 17:54:28 -0800 | [diff] [blame] | 481 | jtag_pkg::jtag_req_t pinmux_aon_rv_jtag_req; |
| 482 | jtag_pkg::jtag_rsp_t pinmux_aon_rv_jtag_rsp; |
Michael Schaffner | 6d3d6a0 | 2020-12-11 13:52:51 -0800 | [diff] [blame] | 483 | otp_ctrl_pkg::otp_lc_data_t otp_ctrl_otp_lc_data; |
| 484 | otp_ctrl_pkg::lc_otp_program_req_t lc_ctrl_lc_otp_program_req; |
| 485 | otp_ctrl_pkg::lc_otp_program_rsp_t lc_ctrl_lc_otp_program_rsp; |
| 486 | otp_ctrl_pkg::lc_otp_token_req_t lc_ctrl_lc_otp_token_req; |
| 487 | otp_ctrl_pkg::lc_otp_token_rsp_t lc_ctrl_lc_otp_token_rsp; |
| 488 | otp_ctrl_part_pkg::otp_hw_cfg_t otp_ctrl_otp_hw_cfg; |
| 489 | lc_ctrl_pkg::lc_keymgr_div_t lc_ctrl_lc_keymgr_div; |
| 490 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_dft_en; |
| 491 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_nvm_debug_en; |
| 492 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_hw_debug_en; |
| 493 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_cpu_en; |
Michael Schaffner | dc0c1e9 | 2021-03-02 14:41:31 -0800 | [diff] [blame] | 494 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_keymgr_en; |
Michael Schaffner | 6d3d6a0 | 2020-12-11 13:52:51 -0800 | [diff] [blame] | 495 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_escalate_en; |
Michael Schaffner | c506dc5 | 2020-12-22 21:07:17 -0800 | [diff] [blame] | 496 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_check_byp_en; |
Timothy Chen | fa60a60 | 2021-03-23 14:29:40 -0700 | [diff] [blame] | 497 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_clk_byp_req; |
Timothy Chen | 33c9078 | 2021-01-06 17:38:48 -0800 | [diff] [blame] | 498 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_clk_byp_ack; |
Michael Schaffner | 6d3d6a0 | 2020-12-11 13:52:51 -0800 | [diff] [blame] | 499 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_creator_seed_sw_rw_en; |
| 500 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_owner_seed_sw_rw_en; |
| 501 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_iso_part_sw_rd_en; |
| 502 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_iso_part_sw_wr_en; |
| 503 | lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_seed_hw_rd_en; |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 504 | logic [3:0] pwrmgr_aon_wakeups; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 505 | logic pwrmgr_aon_rstreqs; |
Rupert Swarbrick | 9855d4b | 2020-12-02 08:41:35 +0000 | [diff] [blame] | 506 | tlul_pkg::tl_h2d_t rom_ctrl_rom_tl_req; |
| 507 | tlul_pkg::tl_d2h_t rom_ctrl_rom_tl_rsp; |
| 508 | tlul_pkg::tl_h2d_t rom_ctrl_regs_tl_req; |
| 509 | tlul_pkg::tl_d2h_t rom_ctrl_regs_tl_rsp; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 510 | tlul_pkg::tl_h2d_t ram_main_tl_req; |
| 511 | tlul_pkg::tl_d2h_t ram_main_tl_rsp; |
| 512 | tlul_pkg::tl_h2d_t eflash_tl_req; |
| 513 | tlul_pkg::tl_d2h_t eflash_tl_rsp; |
| 514 | tlul_pkg::tl_h2d_t main_tl_peri_req; |
| 515 | tlul_pkg::tl_d2h_t main_tl_peri_rsp; |
Timothy Chen | 76eb883 | 2021-03-25 16:49:58 -0700 | [diff] [blame] | 516 | tlul_pkg::tl_h2d_t flash_ctrl_core_tl_req; |
| 517 | tlul_pkg::tl_d2h_t flash_ctrl_core_tl_rsp; |
| 518 | tlul_pkg::tl_h2d_t flash_ctrl_prim_tl_req; |
| 519 | tlul_pkg::tl_d2h_t flash_ctrl_prim_tl_rsp; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 520 | tlul_pkg::tl_h2d_t hmac_tl_req; |
| 521 | tlul_pkg::tl_d2h_t hmac_tl_rsp; |
Eunchan Kim | e5d33b7 | 2020-11-03 14:34:16 -0800 | [diff] [blame] | 522 | tlul_pkg::tl_h2d_t kmac_tl_req; |
| 523 | tlul_pkg::tl_d2h_t kmac_tl_rsp; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 524 | tlul_pkg::tl_h2d_t aes_tl_req; |
| 525 | tlul_pkg::tl_d2h_t aes_tl_rsp; |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 526 | tlul_pkg::tl_h2d_t entropy_src_tl_req; |
| 527 | tlul_pkg::tl_d2h_t entropy_src_tl_rsp; |
| 528 | tlul_pkg::tl_h2d_t csrng_tl_req; |
| 529 | tlul_pkg::tl_d2h_t csrng_tl_rsp; |
| 530 | tlul_pkg::tl_h2d_t edn0_tl_req; |
| 531 | tlul_pkg::tl_d2h_t edn0_tl_rsp; |
| 532 | tlul_pkg::tl_h2d_t edn1_tl_req; |
| 533 | tlul_pkg::tl_d2h_t edn1_tl_rsp; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 534 | tlul_pkg::tl_h2d_t rv_plic_tl_req; |
| 535 | tlul_pkg::tl_d2h_t rv_plic_tl_rsp; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 536 | tlul_pkg::tl_h2d_t otbn_tl_req; |
| 537 | tlul_pkg::tl_d2h_t otbn_tl_rsp; |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 538 | tlul_pkg::tl_h2d_t keymgr_tl_req; |
| 539 | tlul_pkg::tl_d2h_t keymgr_tl_rsp; |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 540 | tlul_pkg::tl_h2d_t sram_ctrl_main_tl_req; |
| 541 | tlul_pkg::tl_d2h_t sram_ctrl_main_tl_rsp; |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 542 | tlul_pkg::tl_h2d_t uart0_tl_req; |
| 543 | tlul_pkg::tl_d2h_t uart0_tl_rsp; |
| 544 | tlul_pkg::tl_h2d_t uart1_tl_req; |
| 545 | tlul_pkg::tl_d2h_t uart1_tl_rsp; |
| 546 | tlul_pkg::tl_h2d_t uart2_tl_req; |
| 547 | tlul_pkg::tl_d2h_t uart2_tl_rsp; |
| 548 | tlul_pkg::tl_h2d_t uart3_tl_req; |
| 549 | tlul_pkg::tl_d2h_t uart3_tl_rsp; |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 550 | tlul_pkg::tl_h2d_t i2c0_tl_req; |
| 551 | tlul_pkg::tl_d2h_t i2c0_tl_rsp; |
| 552 | tlul_pkg::tl_h2d_t i2c1_tl_req; |
| 553 | tlul_pkg::tl_d2h_t i2c1_tl_rsp; |
| 554 | tlul_pkg::tl_h2d_t i2c2_tl_req; |
| 555 | tlul_pkg::tl_d2h_t i2c2_tl_rsp; |
| 556 | tlul_pkg::tl_h2d_t pattgen_tl_req; |
| 557 | tlul_pkg::tl_d2h_t pattgen_tl_rsp; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 558 | tlul_pkg::tl_h2d_t gpio_tl_req; |
| 559 | tlul_pkg::tl_d2h_t gpio_tl_rsp; |
| 560 | tlul_pkg::tl_h2d_t spi_device_tl_req; |
| 561 | tlul_pkg::tl_d2h_t spi_device_tl_rsp; |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 562 | tlul_pkg::tl_h2d_t spi_host0_tl_req; |
| 563 | tlul_pkg::tl_d2h_t spi_host0_tl_rsp; |
| 564 | tlul_pkg::tl_h2d_t spi_host1_tl_req; |
| 565 | tlul_pkg::tl_d2h_t spi_host1_tl_rsp; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 566 | tlul_pkg::tl_h2d_t rv_timer_tl_req; |
| 567 | tlul_pkg::tl_d2h_t rv_timer_tl_rsp; |
| 568 | tlul_pkg::tl_h2d_t usbdev_tl_req; |
| 569 | tlul_pkg::tl_d2h_t usbdev_tl_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 570 | tlul_pkg::tl_h2d_t pwrmgr_aon_tl_req; |
| 571 | tlul_pkg::tl_d2h_t pwrmgr_aon_tl_rsp; |
| 572 | tlul_pkg::tl_h2d_t rstmgr_aon_tl_req; |
| 573 | tlul_pkg::tl_d2h_t rstmgr_aon_tl_rsp; |
| 574 | tlul_pkg::tl_h2d_t clkmgr_aon_tl_req; |
| 575 | tlul_pkg::tl_d2h_t clkmgr_aon_tl_rsp; |
| 576 | tlul_pkg::tl_h2d_t pinmux_aon_tl_req; |
| 577 | tlul_pkg::tl_d2h_t pinmux_aon_tl_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 578 | tlul_pkg::tl_h2d_t ram_ret_aon_tl_req; |
| 579 | tlul_pkg::tl_d2h_t ram_ret_aon_tl_rsp; |
Michael Schaffner | a304560 | 2020-10-06 19:19:46 -0700 | [diff] [blame] | 580 | tlul_pkg::tl_h2d_t otp_ctrl_tl_req; |
| 581 | tlul_pkg::tl_d2h_t otp_ctrl_tl_rsp; |
Michael Schaffner | 6d3d6a0 | 2020-12-11 13:52:51 -0800 | [diff] [blame] | 582 | tlul_pkg::tl_h2d_t lc_ctrl_tl_req; |
| 583 | tlul_pkg::tl_d2h_t lc_ctrl_tl_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 584 | tlul_pkg::tl_h2d_t sensor_ctrl_aon_tl_req; |
| 585 | tlul_pkg::tl_d2h_t sensor_ctrl_aon_tl_rsp; |
Michael Schaffner | d1fc7d1 | 2020-12-21 12:52:23 -0800 | [diff] [blame] | 586 | tlul_pkg::tl_h2d_t alert_handler_tl_req; |
| 587 | tlul_pkg::tl_d2h_t alert_handler_tl_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 588 | tlul_pkg::tl_h2d_t sram_ctrl_ret_aon_tl_req; |
| 589 | tlul_pkg::tl_d2h_t sram_ctrl_ret_aon_tl_rsp; |
Timothy Chen | 2b8ef76 | 2021-02-16 14:44:55 -0800 | [diff] [blame] | 590 | tlul_pkg::tl_h2d_t aon_timer_aon_tl_req; |
| 591 | tlul_pkg::tl_d2h_t aon_timer_aon_tl_rsp; |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 592 | tlul_pkg::tl_h2d_t adc_ctrl_aon_tl_req; |
| 593 | tlul_pkg::tl_d2h_t adc_ctrl_aon_tl_rsp; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 594 | rstmgr_pkg::rstmgr_out_t rstmgr_aon_resets; |
| 595 | rstmgr_pkg::rstmgr_cpu_t rstmgr_aon_cpu; |
| 596 | pwrmgr_pkg::pwr_cpu_t pwrmgr_aon_pwr_cpu; |
| 597 | clkmgr_pkg::clkmgr_out_t clkmgr_aon_clocks; |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 598 | tlul_pkg::tl_h2d_t main_tl_corei_req; |
| 599 | tlul_pkg::tl_d2h_t main_tl_corei_rsp; |
| 600 | tlul_pkg::tl_h2d_t main_tl_cored_req; |
| 601 | tlul_pkg::tl_d2h_t main_tl_cored_rsp; |
| 602 | tlul_pkg::tl_h2d_t main_tl_dm_sba_req; |
| 603 | tlul_pkg::tl_d2h_t main_tl_dm_sba_rsp; |
| 604 | tlul_pkg::tl_h2d_t main_tl_debug_mem_req; |
| 605 | tlul_pkg::tl_d2h_t main_tl_debug_mem_rsp; |
Pirmin Vogel | a2d411d | 2020-07-13 17:33:42 +0200 | [diff] [blame] | 606 | |
Timothy Chen | 075ed37 | 2021-02-04 14:42:29 -0800 | [diff] [blame] | 607 | // define mixed connection to port |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 608 | assign edn0_edn_req[2] = ast_edn_req_i; |
| 609 | assign ast_edn_rsp_o = edn0_edn_rsp[2]; |
| 610 | assign ast_lc_dft_en_o = lc_ctrl_lc_dft_en; |
| 611 | assign ast_ram_1p_cfg = ram_1p_cfg_i; |
| 612 | assign ast_ram_2p_cfg = ram_2p_cfg_i; |
| 613 | assign ast_rom_cfg = rom_cfg_i; |
Timothy Chen | 075ed37 | 2021-02-04 14:42:29 -0800 | [diff] [blame] | 614 | |
Timothy Chen | 90b8242 | 2021-02-03 23:45:21 -0800 | [diff] [blame] | 615 | // define partial inter-module tie-off |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 616 | edn_pkg::edn_rsp_t unused_edn1_edn_rsp1; |
| 617 | edn_pkg::edn_rsp_t unused_edn1_edn_rsp2; |
Timothy Chen | 44b404e | 2021-02-05 13:06:01 -0800 | [diff] [blame] | 618 | edn_pkg::edn_rsp_t unused_edn1_edn_rsp3; |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 619 | edn_pkg::edn_rsp_t unused_edn1_edn_rsp4; |
| 620 | edn_pkg::edn_rsp_t unused_edn1_edn_rsp5; |
Greg Chadwick | cc0dd2a | 2021-03-10 15:55:58 +0000 | [diff] [blame] | 621 | edn_pkg::edn_rsp_t unused_edn1_edn_rsp6; |
Eunchan Kim | 4af433f | 2021-03-25 17:11:41 -0700 | [diff] [blame] | 622 | kmac_pkg::app_rsp_t unused_kmac_app_rsp1; |
| 623 | kmac_pkg::app_rsp_t unused_kmac_app_rsp2; |
Timothy Chen | 90b8242 | 2021-02-03 23:45:21 -0800 | [diff] [blame] | 624 | |
| 625 | // assign partial inter-module tie-off |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 626 | assign unused_edn1_edn_rsp1 = edn1_edn_rsp[1]; |
| 627 | assign unused_edn1_edn_rsp2 = edn1_edn_rsp[2]; |
Timothy Chen | 44b404e | 2021-02-05 13:06:01 -0800 | [diff] [blame] | 628 | assign unused_edn1_edn_rsp3 = edn1_edn_rsp[3]; |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 629 | assign unused_edn1_edn_rsp4 = edn1_edn_rsp[4]; |
| 630 | assign unused_edn1_edn_rsp5 = edn1_edn_rsp[5]; |
Greg Chadwick | cc0dd2a | 2021-03-10 15:55:58 +0000 | [diff] [blame] | 631 | assign unused_edn1_edn_rsp6 = edn1_edn_rsp[6]; |
Eunchan Kim | 4af433f | 2021-03-25 17:11:41 -0700 | [diff] [blame] | 632 | assign unused_kmac_app_rsp1 = kmac_app_rsp[1]; |
| 633 | assign unused_kmac_app_rsp2 = kmac_app_rsp[2]; |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 634 | assign edn1_edn_req[1] = '0; |
| 635 | assign edn1_edn_req[2] = '0; |
Timothy Chen | 44b404e | 2021-02-05 13:06:01 -0800 | [diff] [blame] | 636 | assign edn1_edn_req[3] = '0; |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 637 | assign edn1_edn_req[4] = '0; |
| 638 | assign edn1_edn_req[5] = '0; |
Greg Chadwick | cc0dd2a | 2021-03-10 15:55:58 +0000 | [diff] [blame] | 639 | assign edn1_edn_req[6] = '0; |
Eunchan Kim | 4af433f | 2021-03-25 17:11:41 -0700 | [diff] [blame] | 640 | assign kmac_app_req[1] = kmac_pkg::APP_REQ_DEFAULT; |
| 641 | assign kmac_app_req[2] = kmac_pkg::APP_REQ_DEFAULT; |
Timothy Chen | 90b8242 | 2021-02-03 23:45:21 -0800 | [diff] [blame] | 642 | |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 643 | |
Timothy Chen | 3b50be1 | 2020-11-11 13:19:59 -0800 | [diff] [blame] | 644 | // Unused reset signals |
| 645 | logic unused_d0_rst_por_aon; |
| 646 | logic unused_d0_rst_por; |
| 647 | logic unused_d0_rst_por_io; |
| 648 | logic unused_d0_rst_por_io_div2; |
| 649 | logic unused_d0_rst_por_io_div4; |
| 650 | logic unused_d0_rst_por_usb; |
| 651 | logic unused_daon_rst_lc; |
| 652 | logic unused_daon_rst_lc_io_div4; |
Timothy Chen | ac6af87 | 2021-02-22 17:17:52 -0800 | [diff] [blame] | 653 | logic unused_daon_rst_sys; |
Timothy Chen | 3b50be1 | 2020-11-11 13:19:59 -0800 | [diff] [blame] | 654 | logic unused_daon_rst_spi_device; |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 655 | logic unused_daon_rst_spi_host0; |
| 656 | logic unused_daon_rst_spi_host1; |
Timothy Chen | c2b279a | 2021-01-14 18:53:34 -0800 | [diff] [blame] | 657 | logic unused_daon_rst_usb; |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 658 | logic unused_daon_rst_i2c0; |
| 659 | logic unused_daon_rst_i2c1; |
| 660 | logic unused_daon_rst_i2c2; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 661 | assign unused_d0_rst_por_aon = rstmgr_aon_resets.rst_por_aon_n[rstmgr_pkg::Domain0Sel]; |
| 662 | assign unused_d0_rst_por = rstmgr_aon_resets.rst_por_n[rstmgr_pkg::Domain0Sel]; |
| 663 | assign unused_d0_rst_por_io = rstmgr_aon_resets.rst_por_io_n[rstmgr_pkg::Domain0Sel]; |
| 664 | assign unused_d0_rst_por_io_div2 = rstmgr_aon_resets.rst_por_io_div2_n[rstmgr_pkg::Domain0Sel]; |
| 665 | assign unused_d0_rst_por_io_div4 = rstmgr_aon_resets.rst_por_io_div4_n[rstmgr_pkg::Domain0Sel]; |
| 666 | assign unused_d0_rst_por_usb = rstmgr_aon_resets.rst_por_usb_n[rstmgr_pkg::Domain0Sel]; |
| 667 | assign unused_daon_rst_lc = rstmgr_aon_resets.rst_lc_n[rstmgr_pkg::DomainAonSel]; |
| 668 | assign unused_daon_rst_lc_io_div4 = rstmgr_aon_resets.rst_lc_io_div4_n[rstmgr_pkg::DomainAonSel]; |
Timothy Chen | ac6af87 | 2021-02-22 17:17:52 -0800 | [diff] [blame] | 669 | assign unused_daon_rst_sys = rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::DomainAonSel]; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 670 | assign unused_daon_rst_spi_device = rstmgr_aon_resets.rst_spi_device_n[rstmgr_pkg::DomainAonSel]; |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 671 | assign unused_daon_rst_spi_host0 = rstmgr_aon_resets.rst_spi_host0_n[rstmgr_pkg::DomainAonSel]; |
| 672 | assign unused_daon_rst_spi_host1 = rstmgr_aon_resets.rst_spi_host1_n[rstmgr_pkg::DomainAonSel]; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 673 | assign unused_daon_rst_usb = rstmgr_aon_resets.rst_usb_n[rstmgr_pkg::DomainAonSel]; |
| 674 | assign unused_daon_rst_i2c0 = rstmgr_aon_resets.rst_i2c0_n[rstmgr_pkg::DomainAonSel]; |
| 675 | assign unused_daon_rst_i2c1 = rstmgr_aon_resets.rst_i2c1_n[rstmgr_pkg::DomainAonSel]; |
| 676 | assign unused_daon_rst_i2c2 = rstmgr_aon_resets.rst_i2c2_n[rstmgr_pkg::DomainAonSel]; |
Timothy Chen | 3b50be1 | 2020-11-11 13:19:59 -0800 | [diff] [blame] | 677 | |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 678 | // Non-debug module reset == reset for everything except for the debug module |
| 679 | logic ndmreset_req; |
| 680 | |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 681 | // debug request from rv_dm to core |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 682 | logic debug_req; |
| 683 | |
| 684 | // processor core |
| 685 | rv_core_ibex #( |
Philipp Wagner | 25d88922 | 2020-04-03 11:52:41 +0100 | [diff] [blame] | 686 | .PMPEnable (1), |
| 687 | .PMPGranularity (0), // 2^(PMPGranularity+2) == 4 byte granularity |
| 688 | .PMPNumRegions (16), |
Pirmin Vogel | 185d1bf | 2020-08-27 13:30:10 +0200 | [diff] [blame] | 689 | .MHPMCounterNum (10), |
| 690 | .MHPMCounterWidth (32), |
Greg Chadwick | dadb1af | 2020-04-16 17:10:23 +0100 | [diff] [blame] | 691 | .RV32E (0), |
Pirmin Vogel | e381464 | 2020-08-27 12:44:23 +0200 | [diff] [blame] | 692 | .RV32M (ibex_pkg::RV32MSingleCycle), |
| 693 | .RV32B (ibex_pkg::RV32BNone), |
Pirmin Vogel | 4eb2502 | 2020-08-27 15:27:33 +0200 | [diff] [blame] | 694 | .RegFile (IbexRegFile), |
Greg Chadwick | dadb1af | 2020-04-16 17:10:23 +0100 | [diff] [blame] | 695 | .BranchTargetALU (1), |
| 696 | .WritebackStage (1), |
Tom Roberts | 7824ccc | 2020-11-05 11:34:03 +0000 | [diff] [blame] | 697 | .ICache (IbexICache), |
| 698 | .ICacheECC (1), |
Pirmin Vogel | e381464 | 2020-08-27 12:44:23 +0200 | [diff] [blame] | 699 | .BranchPredictor (0), |
Greg Chadwick | dadb1af | 2020-04-16 17:10:23 +0100 | [diff] [blame] | 700 | .DbgTriggerEn (1), |
Tom Roberts | 78bb2ae | 2020-06-03 15:24:22 +0100 | [diff] [blame] | 701 | .SecureIbex (0), |
Rupert Swarbrick | da341bf | 2021-03-10 15:45:25 +0000 | [diff] [blame] | 702 | .DmHaltAddr (ADDR_SPACE_DEBUG_MEM + dm::HaltAddress[31:0]), |
| 703 | .DmExceptionAddr (ADDR_SPACE_DEBUG_MEM + dm::ExceptionAddress[31:0]), |
Greg Chadwick | dadb1af | 2020-04-16 17:10:23 +0100 | [diff] [blame] | 704 | .PipeLine (IbexPipeLine) |
Michael Schaffner | a39557e | 2020-03-17 18:30:21 -0700 | [diff] [blame] | 705 | ) u_rv_core_ibex ( |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 706 | // clock and reset |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 707 | .clk_i (clkmgr_aon_clocks.clk_proc_main), |
| 708 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
| 709 | .clk_esc_i (clkmgr_aon_clocks.clk_io_div4_timers), |
| 710 | .rst_esc_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 711 | .test_en_i (1'b0), |
Tom Roberts | 5344169 | 2021-03-12 17:30:38 +0000 | [diff] [blame] | 712 | .ram_cfg_i (ast_ram_1p_cfg), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 713 | // static pinning |
Greg Chadwick | 53ef2ec | 2019-09-03 14:53:54 +0100 | [diff] [blame] | 714 | .hart_id_i (32'b0), |
Rupert Swarbrick | 9855d4b | 2020-12-02 08:41:35 +0000 | [diff] [blame] | 715 | .boot_addr_i (ADDR_SPACE_ROM_CTRL__ROM), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 716 | // TL-UL buses |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 717 | .tl_i_o (main_tl_corei_req), |
| 718 | .tl_i_i (main_tl_corei_rsp), |
| 719 | .tl_d_o (main_tl_cored_req), |
| 720 | .tl_d_i (main_tl_cored_rsp), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 721 | // interrupts |
| 722 | .irq_software_i (msip), |
| 723 | .irq_timer_i (intr_rv_timer_timer_expired_0_0), |
| 724 | .irq_external_i (irq_plic), |
Michael Schaffner | bdcbd20 | 2020-07-27 12:18:21 -0700 | [diff] [blame] | 725 | // escalation input from alert handler (NMI) |
Timothy Chen | c0d32d9 | 2020-12-16 18:01:22 -0800 | [diff] [blame] | 726 | .esc_tx_i (alert_handler_esc_tx[0]), |
| 727 | .esc_rx_o (alert_handler_esc_rx[0]), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 728 | // debug interface |
| 729 | .debug_req_i (debug_req), |
Timothy Chen | 580ed91 | 2020-12-21 21:21:50 -0800 | [diff] [blame] | 730 | // crash dump interface |
Tom Roberts | c88e97f | 2021-03-04 13:38:20 +0000 | [diff] [blame] | 731 | .crash_dump_o (rv_core_ibex_crash_dump), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 732 | // CPU control signals |
Michael Schaffner | dc0c1e9 | 2021-03-02 14:41:31 -0800 | [diff] [blame] | 733 | .lc_cpu_en_i (lc_ctrl_lc_cpu_en), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 734 | .core_sleep_o (pwrmgr_aon_pwr_cpu.core_sleeping) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 735 | ); |
| 736 | |
| 737 | // Debug Module (RISC-V Debug Spec 0.13) |
| 738 | // |
| 739 | |
| 740 | rv_dm #( |
Philipp Wagner | 086b703 | 2019-10-25 17:06:15 +0100 | [diff] [blame] | 741 | .NrHarts (1), |
| 742 | .IdcodeValue (JTAG_IDCODE) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 743 | ) u_dm_top ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 744 | .clk_i (clkmgr_aon_clocks.clk_proc_main), |
| 745 | .rst_ni (rstmgr_aon_resets.rst_lc_n[rstmgr_pkg::Domain0Sel]), |
Michael Schaffner | 7ce0e52 | 2021-02-25 16:39:42 -0800 | [diff] [blame] | 746 | .hw_debug_en_i (lc_ctrl_lc_hw_debug_en), |
Michael Schaffner | 8bf4fe6 | 2021-02-18 12:56:08 -0800 | [diff] [blame] | 747 | .scanmode_i, |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 748 | .ndmreset_o (ndmreset_req), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 749 | .dmactive_o (), |
| 750 | .debug_req_o (debug_req), |
| 751 | .unavailable_i (1'b0), |
| 752 | |
| 753 | // bus device with debug memory (for execution-based debug) |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 754 | .tl_d_i (main_tl_debug_mem_req), |
| 755 | .tl_d_o (main_tl_debug_mem_rsp), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 756 | |
| 757 | // bus host (for system bus accesses, SBA) |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 758 | .tl_h_o (main_tl_dm_sba_req), |
| 759 | .tl_h_i (main_tl_dm_sba_rsp), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 760 | |
| 761 | //JTAG |
Michael Schaffner | 5f54587 | 2021-03-05 17:54:28 -0800 | [diff] [blame] | 762 | .jtag_req_i (pinmux_aon_rv_jtag_req), |
| 763 | .jtag_rsp_o (pinmux_aon_rv_jtag_rsp) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 764 | ); |
| 765 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 766 | assign rstmgr_aon_cpu.ndmreset_req = ndmreset_req; |
| 767 | assign rstmgr_aon_cpu.rst_cpu_n = rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]; |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 768 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 769 | // sram device |
| 770 | logic ram_main_req; |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 771 | logic ram_main_gnt; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 772 | logic ram_main_we; |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 773 | logic ram_main_intg_err; |
Timothy Chen | 4367c48 | 2021-01-22 00:18:45 -0800 | [diff] [blame] | 774 | logic [14:0] ram_main_addr; |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 775 | logic [38:0] ram_main_wdata; |
| 776 | logic [38:0] ram_main_wmask; |
Timothy Chen | 466585e | 2021-03-01 15:06:01 -0800 | [diff] [blame] | 777 | logic [38:0] ram_main_rdata; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 778 | logic ram_main_rvalid; |
Philipp Wagner | e1efc18 | 2020-05-21 18:26:17 +0100 | [diff] [blame] | 779 | logic [1:0] ram_main_rerror; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 780 | |
| 781 | tlul_adapter_sram #( |
Timothy Chen | 4367c48 | 2021-01-22 00:18:45 -0800 | [diff] [blame] | 782 | .SramAw(15), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 783 | .SramDw(32), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 784 | .Outstanding(2), |
| 785 | .CmdIntgCheck(1), |
| 786 | .EnableRspIntgGen(1), |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 787 | .EnableDataIntgGen(0), |
| 788 | .EnableDataIntgPt(1) |
Michael Schaffner | a39557e | 2020-03-17 18:30:21 -0700 | [diff] [blame] | 789 | ) u_tl_adapter_ram_main ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 790 | .clk_i (clkmgr_aon_clocks.clk_main_infra), |
| 791 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 792 | .tl_i (ram_main_tl_req), |
| 793 | .tl_o (ram_main_tl_rsp), |
| 794 | .en_ifetch_i (sram_ctrl_main_en_ifetch), |
| 795 | .req_o (ram_main_req), |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 796 | .req_type_o (), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 797 | .gnt_i (ram_main_gnt), |
| 798 | .we_o (ram_main_we), |
| 799 | .addr_o (ram_main_addr), |
| 800 | .wdata_o (ram_main_wdata), |
| 801 | .wmask_o (ram_main_wmask), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 802 | .intg_error_o(ram_main_intg_err), |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 803 | .rdata_i (ram_main_rdata), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 804 | .rvalid_i (ram_main_rvalid), |
| 805 | .rerror_i (ram_main_rerror) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 806 | ); |
| 807 | |
Michael Schaffner | bec47c7 | 2020-11-06 14:03:54 -0800 | [diff] [blame] | 808 | prim_ram_1p_scr #( |
Timothy Chen | 466585e | 2021-03-01 15:06:01 -0800 | [diff] [blame] | 809 | .Width(39), |
Timothy Chen | 4367c48 | 2021-01-22 00:18:45 -0800 | [diff] [blame] | 810 | .Depth(32768), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 811 | .EnableParity(0), |
| 812 | .LfsrWidth(32), |
Timothy Chen | 3b25716 | 2021-03-18 12:39:36 -0700 | [diff] [blame] | 813 | .StatePerm(RndCnstSramCtrlMainSramLfsrPerm), |
| 814 | .DataBitsPerMask(1), // TODO: Temporary change to ensure byte updates can still be done |
| 815 | .DiffWidth(8) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 816 | ) u_ram1p_ram_main ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 817 | .clk_i (clkmgr_aon_clocks.clk_main_infra), |
| 818 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 819 | |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 820 | .key_valid_i (sram_ctrl_main_sram_scr_req.valid), |
| 821 | .key_i (sram_ctrl_main_sram_scr_req.key), |
| 822 | .nonce_i (sram_ctrl_main_sram_scr_req.nonce), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 823 | .init_req_i (sram_ctrl_main_sram_scr_init_req.req), |
| 824 | .init_seed_i (sram_ctrl_main_sram_scr_init_req.seed), |
| 825 | .init_ack_o (sram_ctrl_main_sram_scr_init_rsp.ack), |
Michael Schaffner | bec47c7 | 2020-11-06 14:03:54 -0800 | [diff] [blame] | 826 | |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 827 | .req_i (ram_main_req), |
| 828 | .intg_error_i(ram_main_intg_err), |
| 829 | .gnt_o (ram_main_gnt), |
| 830 | .write_i (ram_main_we), |
| 831 | .addr_i (ram_main_addr), |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 832 | .wdata_i (ram_main_wdata), |
| 833 | .wmask_i (ram_main_wmask), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 834 | .rdata_o (ram_main_rdata), |
| 835 | .rvalid_o (ram_main_rvalid), |
| 836 | .rerror_o (ram_main_rerror), |
| 837 | .raddr_o (sram_ctrl_main_sram_scr_rsp.raddr), |
| 838 | .intg_error_o(ram_main_intg_error), |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 839 | .cfg_i (ram_1p_cfg_i) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 840 | ); |
Michael Schaffner | bec47c7 | 2020-11-06 14:03:54 -0800 | [diff] [blame] | 841 | |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 842 | assign sram_ctrl_main_sram_scr_rsp.rerror = ram_main_rerror; |
| 843 | |
Timothy Chen | 6e2ba84 | 2020-06-29 15:04:13 -0700 | [diff] [blame] | 844 | // sram device |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 845 | logic ram_ret_aon_req; |
| 846 | logic ram_ret_aon_gnt; |
| 847 | logic ram_ret_aon_we; |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 848 | logic ram_ret_aon_intg_err; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 849 | logic [9:0] ram_ret_aon_addr; |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 850 | logic [38:0] ram_ret_aon_wdata; |
| 851 | logic [38:0] ram_ret_aon_wmask; |
Timothy Chen | 466585e | 2021-03-01 15:06:01 -0800 | [diff] [blame] | 852 | logic [38:0] ram_ret_aon_rdata; |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 853 | logic ram_ret_aon_rvalid; |
| 854 | logic [1:0] ram_ret_aon_rerror; |
Timothy Chen | 6e2ba84 | 2020-06-29 15:04:13 -0700 | [diff] [blame] | 855 | |
| 856 | tlul_adapter_sram #( |
| 857 | .SramAw(10), |
| 858 | .SramDw(32), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 859 | .Outstanding(2), |
| 860 | .CmdIntgCheck(1), |
| 861 | .EnableRspIntgGen(1), |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 862 | .EnableDataIntgGen(0), |
| 863 | .EnableDataIntgPt(1) |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 864 | ) u_tl_adapter_ram_ret_aon ( |
| 865 | .clk_i (clkmgr_aon_clocks.clk_io_div4_infra), |
| 866 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::DomainAonSel]), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 867 | .tl_i (ram_ret_aon_tl_req), |
| 868 | .tl_o (ram_ret_aon_tl_rsp), |
| 869 | .en_ifetch_i (sram_ctrl_ret_aon_en_ifetch), |
| 870 | .req_o (ram_ret_aon_req), |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 871 | .req_type_o (), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 872 | .gnt_i (ram_ret_aon_gnt), |
| 873 | .we_o (ram_ret_aon_we), |
| 874 | .addr_o (ram_ret_aon_addr), |
| 875 | .wdata_o (ram_ret_aon_wdata), |
| 876 | .wmask_o (ram_ret_aon_wmask), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 877 | .intg_error_o(ram_ret_aon_intg_err), |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 878 | .rdata_i (ram_ret_aon_rdata), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 879 | .rvalid_i (ram_ret_aon_rvalid), |
| 880 | .rerror_i (ram_ret_aon_rerror) |
Timothy Chen | 6e2ba84 | 2020-06-29 15:04:13 -0700 | [diff] [blame] | 881 | ); |
| 882 | |
Michael Schaffner | bec47c7 | 2020-11-06 14:03:54 -0800 | [diff] [blame] | 883 | prim_ram_1p_scr #( |
Timothy Chen | 466585e | 2021-03-01 15:06:01 -0800 | [diff] [blame] | 884 | .Width(39), |
Timothy Chen | 6e2ba84 | 2020-06-29 15:04:13 -0700 | [diff] [blame] | 885 | .Depth(1024), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 886 | .EnableParity(0), |
| 887 | .LfsrWidth(32), |
Timothy Chen | 3b25716 | 2021-03-18 12:39:36 -0700 | [diff] [blame] | 888 | .StatePerm(RndCnstSramCtrlRetAonSramLfsrPerm), |
| 889 | .DataBitsPerMask(1), // TODO: Temporary change to ensure byte updates can still be done |
| 890 | .DiffWidth(8) |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 891 | ) u_ram1p_ram_ret_aon ( |
| 892 | .clk_i (clkmgr_aon_clocks.clk_io_div4_infra), |
| 893 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::DomainAonSel]), |
Timothy Chen | 6e2ba84 | 2020-06-29 15:04:13 -0700 | [diff] [blame] | 894 | |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 895 | .key_valid_i (sram_ctrl_ret_aon_sram_scr_req.valid), |
| 896 | .key_i (sram_ctrl_ret_aon_sram_scr_req.key), |
| 897 | .nonce_i (sram_ctrl_ret_aon_sram_scr_req.nonce), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 898 | .init_req_i (sram_ctrl_ret_aon_sram_scr_init_req.req), |
| 899 | .init_seed_i (sram_ctrl_ret_aon_sram_scr_init_req.seed), |
| 900 | .init_ack_o (sram_ctrl_ret_aon_sram_scr_init_rsp.ack), |
Michael Schaffner | bec47c7 | 2020-11-06 14:03:54 -0800 | [diff] [blame] | 901 | |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 902 | .req_i (ram_ret_aon_req), |
| 903 | .intg_error_i(ram_ret_aon_intg_err), |
| 904 | .gnt_o (ram_ret_aon_gnt), |
| 905 | .write_i (ram_ret_aon_we), |
| 906 | .addr_i (ram_ret_aon_addr), |
Timothy Chen | 2799bf0 | 2021-03-18 14:48:47 -0700 | [diff] [blame] | 907 | .wdata_i (ram_ret_aon_wdata), |
| 908 | .wmask_i (ram_ret_aon_wmask), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 909 | .rdata_o (ram_ret_aon_rdata), |
| 910 | .rvalid_o (ram_ret_aon_rvalid), |
| 911 | .rerror_o (ram_ret_aon_rerror), |
| 912 | .raddr_o (sram_ctrl_ret_aon_sram_scr_rsp.raddr), |
| 913 | .intg_error_o(ram_ret_aon_intg_error), |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 914 | .cfg_i (ram_1p_cfg_i) |
Timothy Chen | 6e2ba84 | 2020-06-29 15:04:13 -0700 | [diff] [blame] | 915 | ); |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 916 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 917 | assign sram_ctrl_ret_aon_sram_scr_rsp.rerror = ram_ret_aon_rerror; |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 918 | |
Michael Schaffner | bec47c7 | 2020-11-06 14:03:54 -0800 | [diff] [blame] | 919 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 920 | // host to flash communication |
| 921 | logic flash_host_req; |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 922 | tlul_pkg::tl_type_e flash_host_req_type; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 923 | logic flash_host_req_rdy; |
| 924 | logic flash_host_req_done; |
Timothy Chen | d9a9877 | 2020-09-15 13:57:03 -0700 | [diff] [blame] | 925 | logic flash_host_rderr; |
Timothy Chen | 1451840 | 2020-04-13 15:25:22 -0700 | [diff] [blame] | 926 | logic [flash_ctrl_pkg::BusWidth-1:0] flash_host_rdata; |
Timothy Chen | b35a340 | 2020-06-23 00:14:11 -0700 | [diff] [blame] | 927 | logic [flash_ctrl_pkg::BusAddrW-1:0] flash_host_addr; |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 928 | |
Timothy Chen | 5aec528 | 2019-09-10 21:10:56 -0700 | [diff] [blame] | 929 | tlul_adapter_sram #( |
Timothy Chen | b35a340 | 2020-06-23 00:14:11 -0700 | [diff] [blame] | 930 | .SramAw(flash_ctrl_pkg::BusAddrW), |
Timothy Chen | 1451840 | 2020-04-13 15:25:22 -0700 | [diff] [blame] | 931 | .SramDw(flash_ctrl_pkg::BusWidth), |
Eunchan Kim | 6c731a8 | 2020-03-04 14:48:52 -0800 | [diff] [blame] | 932 | .Outstanding(2), |
Timothy Chen | 5aec528 | 2019-09-10 21:10:56 -0700 | [diff] [blame] | 933 | .ByteAccess(0), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 934 | .ErrOnWrite(1), |
| 935 | .CmdIntgCheck(1), |
| 936 | .EnableRspIntgGen(1), |
| 937 | .EnableDataIntgGen(1) |
Michael Schaffner | a39557e | 2020-03-17 18:30:21 -0700 | [diff] [blame] | 938 | ) u_tl_adapter_eflash ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 939 | .clk_i (clkmgr_aon_clocks.clk_main_infra), |
| 940 | .rst_ni (rstmgr_aon_resets.rst_lc_n[rstmgr_pkg::Domain0Sel]), |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 941 | |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 942 | .tl_i (eflash_tl_req), |
| 943 | .tl_o (eflash_tl_rsp), |
| 944 | .en_ifetch_i (tlul_pkg::InstrEn), // tie this to secure boot somehow |
| 945 | .req_o (flash_host_req), |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 946 | .req_type_o (flash_host_req_type), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 947 | .gnt_i (flash_host_req_rdy), |
| 948 | .we_o (), |
| 949 | .addr_o (flash_host_addr), |
| 950 | .wdata_o (), |
| 951 | .wmask_o (), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 952 | .intg_error_o(), // TODO: connect to flash controller and flash scramble later |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 953 | .rdata_i (flash_host_rdata), |
| 954 | .rvalid_i (flash_host_req_done), |
| 955 | .rerror_i ({flash_host_rderr,1'b0}) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 956 | ); |
| 957 | |
Timothy Chen | 1451840 | 2020-04-13 15:25:22 -0700 | [diff] [blame] | 958 | flash_phy u_flash_eflash ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 959 | .clk_i (clkmgr_aon_clocks.clk_main_infra), |
| 960 | .rst_ni (rstmgr_aon_resets.rst_lc_n[rstmgr_pkg::Domain0Sel]), |
Timothy Chen | 1b9fd90 | 2021-01-07 12:18:46 -0800 | [diff] [blame] | 961 | .host_req_i (flash_host_req), |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 962 | .host_req_type_i (flash_host_req_type), |
Timothy Chen | 1b9fd90 | 2021-01-07 12:18:46 -0800 | [diff] [blame] | 963 | .host_addr_i (flash_host_addr), |
| 964 | .host_req_rdy_o (flash_host_req_rdy), |
| 965 | .host_req_done_o (flash_host_req_done), |
| 966 | .host_rderr_o (flash_host_rderr), |
| 967 | .host_rdata_o (flash_host_rdata), |
| 968 | .flash_ctrl_i (flash_ctrl_flash_req), |
| 969 | .flash_ctrl_o (flash_ctrl_flash_rsp), |
| 970 | .lc_nvm_debug_en_i (lc_ctrl_lc_nvm_debug_en), |
Timothy Chen | 1b9fd90 | 2021-01-07 12:18:46 -0800 | [diff] [blame] | 971 | .flash_bist_enable_i, |
Timothy Chen | 2422a6c | 2020-11-19 16:06:14 -0800 | [diff] [blame] | 972 | .flash_power_down_h_i, |
| 973 | .flash_power_ready_h_i, |
Timothy Chen | 5270b7c | 2021-03-17 17:38:30 -0700 | [diff] [blame] | 974 | .flash_test_mode_a_io, |
| 975 | .flash_test_voltage_h_io, |
Timothy Chen | 2422a6c | 2020-11-19 16:06:14 -0800 | [diff] [blame] | 976 | .scanmode_i, |
Timothy Chen | 010e3cc | 2021-02-02 14:55:09 -0800 | [diff] [blame] | 977 | .scan_en_i, |
Timothy Chen | 2422a6c | 2020-11-19 16:06:14 -0800 | [diff] [blame] | 978 | .scan_rst_ni |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 979 | ); |
| 980 | |
| 981 | |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 982 | |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 983 | uart u_uart0 ( |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 984 | |
| 985 | // Input |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 986 | .cio_rx_i (cio_uart0_rx_p2d), |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 987 | |
| 988 | // Output |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 989 | .cio_tx_o (cio_uart0_tx_d2p), |
| 990 | .cio_tx_en_o (cio_uart0_tx_en_d2p), |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 991 | |
| 992 | // Interrupt |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 993 | .intr_tx_watermark_o (intr_uart0_tx_watermark), |
| 994 | .intr_rx_watermark_o (intr_uart0_rx_watermark), |
| 995 | .intr_tx_empty_o (intr_uart0_tx_empty), |
| 996 | .intr_rx_overflow_o (intr_uart0_rx_overflow), |
| 997 | .intr_rx_frame_err_o (intr_uart0_rx_frame_err), |
| 998 | .intr_rx_break_err_o (intr_uart0_rx_break_err), |
| 999 | .intr_rx_timeout_o (intr_uart0_rx_timeout), |
| 1000 | .intr_rx_parity_err_o (intr_uart0_rx_parity_err), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 1001 | |
| 1002 | // Inter-module signals |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 1003 | .tl_i(uart0_tl_req), |
| 1004 | .tl_o(uart0_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1005 | |
| 1006 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1007 | .clk_i (clkmgr_aon_clocks.clk_io_div4_secure), |
| 1008 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 1009 | ); |
| 1010 | |
| 1011 | uart u_uart1 ( |
| 1012 | |
| 1013 | // Input |
| 1014 | .cio_rx_i (cio_uart1_rx_p2d), |
| 1015 | |
| 1016 | // Output |
| 1017 | .cio_tx_o (cio_uart1_tx_d2p), |
| 1018 | .cio_tx_en_o (cio_uart1_tx_en_d2p), |
| 1019 | |
| 1020 | // Interrupt |
| 1021 | .intr_tx_watermark_o (intr_uart1_tx_watermark), |
| 1022 | .intr_rx_watermark_o (intr_uart1_rx_watermark), |
| 1023 | .intr_tx_empty_o (intr_uart1_tx_empty), |
| 1024 | .intr_rx_overflow_o (intr_uart1_rx_overflow), |
| 1025 | .intr_rx_frame_err_o (intr_uart1_rx_frame_err), |
| 1026 | .intr_rx_break_err_o (intr_uart1_rx_break_err), |
| 1027 | .intr_rx_timeout_o (intr_uart1_rx_timeout), |
| 1028 | .intr_rx_parity_err_o (intr_uart1_rx_parity_err), |
| 1029 | |
| 1030 | // Inter-module signals |
| 1031 | .tl_i(uart1_tl_req), |
| 1032 | .tl_o(uart1_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1033 | |
| 1034 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1035 | .clk_i (clkmgr_aon_clocks.clk_io_div4_secure), |
| 1036 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 1037 | ); |
| 1038 | |
| 1039 | uart u_uart2 ( |
| 1040 | |
| 1041 | // Input |
| 1042 | .cio_rx_i (cio_uart2_rx_p2d), |
| 1043 | |
| 1044 | // Output |
| 1045 | .cio_tx_o (cio_uart2_tx_d2p), |
| 1046 | .cio_tx_en_o (cio_uart2_tx_en_d2p), |
| 1047 | |
| 1048 | // Interrupt |
| 1049 | .intr_tx_watermark_o (intr_uart2_tx_watermark), |
| 1050 | .intr_rx_watermark_o (intr_uart2_rx_watermark), |
| 1051 | .intr_tx_empty_o (intr_uart2_tx_empty), |
| 1052 | .intr_rx_overflow_o (intr_uart2_rx_overflow), |
| 1053 | .intr_rx_frame_err_o (intr_uart2_rx_frame_err), |
| 1054 | .intr_rx_break_err_o (intr_uart2_rx_break_err), |
| 1055 | .intr_rx_timeout_o (intr_uart2_rx_timeout), |
| 1056 | .intr_rx_parity_err_o (intr_uart2_rx_parity_err), |
| 1057 | |
| 1058 | // Inter-module signals |
| 1059 | .tl_i(uart2_tl_req), |
| 1060 | .tl_o(uart2_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1061 | |
| 1062 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1063 | .clk_i (clkmgr_aon_clocks.clk_io_div4_secure), |
| 1064 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 1065 | ); |
| 1066 | |
| 1067 | uart u_uart3 ( |
| 1068 | |
| 1069 | // Input |
| 1070 | .cio_rx_i (cio_uart3_rx_p2d), |
| 1071 | |
| 1072 | // Output |
| 1073 | .cio_tx_o (cio_uart3_tx_d2p), |
| 1074 | .cio_tx_en_o (cio_uart3_tx_en_d2p), |
| 1075 | |
| 1076 | // Interrupt |
| 1077 | .intr_tx_watermark_o (intr_uart3_tx_watermark), |
| 1078 | .intr_rx_watermark_o (intr_uart3_rx_watermark), |
| 1079 | .intr_tx_empty_o (intr_uart3_tx_empty), |
| 1080 | .intr_rx_overflow_o (intr_uart3_rx_overflow), |
| 1081 | .intr_rx_frame_err_o (intr_uart3_rx_frame_err), |
| 1082 | .intr_rx_break_err_o (intr_uart3_rx_break_err), |
| 1083 | .intr_rx_timeout_o (intr_uart3_rx_timeout), |
| 1084 | .intr_rx_parity_err_o (intr_uart3_rx_parity_err), |
| 1085 | |
| 1086 | // Inter-module signals |
| 1087 | .tl_i(uart3_tl_req), |
| 1088 | .tl_o(uart3_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1089 | |
| 1090 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1091 | .clk_i (clkmgr_aon_clocks.clk_io_div4_secure), |
| 1092 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1093 | ); |
| 1094 | |
Michael Schaffner | a39557e | 2020-03-17 18:30:21 -0700 | [diff] [blame] | 1095 | gpio u_gpio ( |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 1096 | |
| 1097 | // Input |
| 1098 | .cio_gpio_i (cio_gpio_gpio_p2d), |
| 1099 | |
| 1100 | // Output |
| 1101 | .cio_gpio_o (cio_gpio_gpio_d2p), |
| 1102 | .cio_gpio_en_o (cio_gpio_gpio_en_d2p), |
| 1103 | |
| 1104 | // Interrupt |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1105 | .intr_gpio_o (intr_gpio_gpio), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 1106 | |
| 1107 | // Inter-module signals |
| 1108 | .tl_i(gpio_tl_req), |
| 1109 | .tl_o(gpio_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1110 | |
| 1111 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1112 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1113 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1114 | ); |
| 1115 | |
Michael Schaffner | a39557e | 2020-03-17 18:30:21 -0700 | [diff] [blame] | 1116 | spi_device u_spi_device ( |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 1117 | |
| 1118 | // Input |
Timothy Chen | c38f789 | 2020-07-16 18:19:48 -0700 | [diff] [blame] | 1119 | .cio_sck_i (cio_spi_device_sck_p2d), |
| 1120 | .cio_csb_i (cio_spi_device_csb_p2d), |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1121 | .cio_sd_i (cio_spi_device_sd_p2d), |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 1122 | |
| 1123 | // Output |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1124 | .cio_sd_o (cio_spi_device_sd_d2p), |
| 1125 | .cio_sd_en_o (cio_spi_device_sd_en_d2p), |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 1126 | |
| 1127 | // Interrupt |
| 1128 | .intr_rxf_o (intr_spi_device_rxf), |
| 1129 | .intr_rxlvl_o (intr_spi_device_rxlvl), |
| 1130 | .intr_txlvl_o (intr_spi_device_txlvl), |
| 1131 | .intr_rxerr_o (intr_spi_device_rxerr), |
| 1132 | .intr_rxoverflow_o (intr_spi_device_rxoverflow), |
Eunchan Kim | 546c0d4 | 2019-09-24 15:07:06 -0700 | [diff] [blame] | 1133 | .intr_txunderflow_o (intr_spi_device_txunderflow), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 1134 | |
| 1135 | // Inter-module signals |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 1136 | .ram_cfg_i(ast_ram_2p_cfg), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 1137 | .tl_i(spi_device_tl_req), |
| 1138 | .tl_o(spi_device_tl_rsp), |
Michael Schaffner | 8bf4fe6 | 2021-02-18 12:56:08 -0800 | [diff] [blame] | 1139 | .scanmode_i, |
Timothy Chen | e38c470 | 2021-02-08 18:38:03 -0800 | [diff] [blame] | 1140 | .scan_rst_ni (scan_rst_ni), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1141 | |
| 1142 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1143 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
Timothy Chen | 04192e0 | 2021-02-19 16:16:25 -0800 | [diff] [blame] | 1144 | .scan_clk_i (clkmgr_aon_clocks.clk_io_div2_peri), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1145 | .rst_ni (rstmgr_aon_resets.rst_spi_device_n[rstmgr_pkg::Domain0Sel]) |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1146 | ); |
| 1147 | |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1148 | spi_host u_spi_host0 ( |
| 1149 | |
| 1150 | // Input |
| 1151 | .cio_sd_i (cio_spi_host0_sd_p2d), |
| 1152 | |
| 1153 | // Output |
| 1154 | .cio_sck_o (cio_spi_host0_sck_d2p), |
| 1155 | .cio_sck_en_o (cio_spi_host0_sck_en_d2p), |
| 1156 | .cio_csb_o (cio_spi_host0_csb_d2p), |
| 1157 | .cio_csb_en_o (cio_spi_host0_csb_en_d2p), |
| 1158 | .cio_sd_o (cio_spi_host0_sd_d2p), |
| 1159 | .cio_sd_en_o (cio_spi_host0_sd_en_d2p), |
| 1160 | |
Martin Lueker-Boden | eb9498c | 2021-02-02 08:33:29 -0800 | [diff] [blame] | 1161 | // Interrupt |
| 1162 | .intr_error_o (intr_spi_host0_error), |
| 1163 | .intr_spi_event_o (intr_spi_host0_spi_event), |
| 1164 | |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1165 | // Inter-module signals |
| 1166 | .tl_i(spi_host0_tl_req), |
| 1167 | .tl_o(spi_host0_tl_rsp), |
Rupert Swarbrick | 0fdf008 | 2021-03-09 16:39:48 +0000 | [diff] [blame] | 1168 | .scanmode_i, |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1169 | |
| 1170 | // Clock and reset connections |
| 1171 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
Martin Lueker-Boden | eb9498c | 2021-02-02 08:33:29 -0800 | [diff] [blame] | 1172 | .clk_core_i (clkmgr_aon_clocks.clk_io_div2_peri), |
| 1173 | .rst_ni (rstmgr_aon_resets.rst_spi_host0_n[rstmgr_pkg::Domain0Sel]), |
| 1174 | .rst_core_ni (rstmgr_aon_resets.rst_spi_host0_n[rstmgr_pkg::Domain0Sel]) |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1175 | ); |
| 1176 | |
| 1177 | spi_host u_spi_host1 ( |
| 1178 | |
| 1179 | // Input |
| 1180 | .cio_sd_i (cio_spi_host1_sd_p2d), |
| 1181 | |
| 1182 | // Output |
| 1183 | .cio_sck_o (cio_spi_host1_sck_d2p), |
| 1184 | .cio_sck_en_o (cio_spi_host1_sck_en_d2p), |
| 1185 | .cio_csb_o (cio_spi_host1_csb_d2p), |
| 1186 | .cio_csb_en_o (cio_spi_host1_csb_en_d2p), |
| 1187 | .cio_sd_o (cio_spi_host1_sd_d2p), |
| 1188 | .cio_sd_en_o (cio_spi_host1_sd_en_d2p), |
| 1189 | |
Martin Lueker-Boden | eb9498c | 2021-02-02 08:33:29 -0800 | [diff] [blame] | 1190 | // Interrupt |
| 1191 | .intr_error_o (intr_spi_host1_error), |
| 1192 | .intr_spi_event_o (intr_spi_host1_spi_event), |
| 1193 | |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1194 | // Inter-module signals |
| 1195 | .tl_i(spi_host1_tl_req), |
| 1196 | .tl_o(spi_host1_tl_rsp), |
Rupert Swarbrick | 0fdf008 | 2021-03-09 16:39:48 +0000 | [diff] [blame] | 1197 | .scanmode_i, |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1198 | |
| 1199 | // Clock and reset connections |
| 1200 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
Martin Lueker-Boden | eb9498c | 2021-02-02 08:33:29 -0800 | [diff] [blame] | 1201 | .clk_core_i (clkmgr_aon_clocks.clk_io_div2_peri), |
| 1202 | .rst_ni (rstmgr_aon_resets.rst_spi_host1_n[rstmgr_pkg::Domain0Sel]), |
| 1203 | .rst_core_ni (rstmgr_aon_resets.rst_spi_host1_n[rstmgr_pkg::Domain0Sel]) |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 1204 | ); |
| 1205 | |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1206 | i2c u_i2c0 ( |
| 1207 | |
| 1208 | // Input |
| 1209 | .cio_sda_i (cio_i2c0_sda_p2d), |
| 1210 | .cio_scl_i (cio_i2c0_scl_p2d), |
| 1211 | |
| 1212 | // Output |
| 1213 | .cio_sda_o (cio_i2c0_sda_d2p), |
| 1214 | .cio_sda_en_o (cio_i2c0_sda_en_d2p), |
| 1215 | .cio_scl_o (cio_i2c0_scl_d2p), |
| 1216 | .cio_scl_en_o (cio_i2c0_scl_en_d2p), |
| 1217 | |
| 1218 | // Interrupt |
| 1219 | .intr_fmt_watermark_o (intr_i2c0_fmt_watermark), |
| 1220 | .intr_rx_watermark_o (intr_i2c0_rx_watermark), |
| 1221 | .intr_fmt_overflow_o (intr_i2c0_fmt_overflow), |
| 1222 | .intr_rx_overflow_o (intr_i2c0_rx_overflow), |
| 1223 | .intr_nak_o (intr_i2c0_nak), |
| 1224 | .intr_scl_interference_o (intr_i2c0_scl_interference), |
| 1225 | .intr_sda_interference_o (intr_i2c0_sda_interference), |
| 1226 | .intr_stretch_timeout_o (intr_i2c0_stretch_timeout), |
| 1227 | .intr_sda_unstable_o (intr_i2c0_sda_unstable), |
| 1228 | .intr_trans_complete_o (intr_i2c0_trans_complete), |
| 1229 | .intr_tx_empty_o (intr_i2c0_tx_empty), |
| 1230 | .intr_tx_nonempty_o (intr_i2c0_tx_nonempty), |
| 1231 | .intr_tx_overflow_o (intr_i2c0_tx_overflow), |
| 1232 | .intr_acq_overflow_o (intr_i2c0_acq_overflow), |
| 1233 | .intr_ack_stop_o (intr_i2c0_ack_stop), |
| 1234 | .intr_host_timeout_o (intr_i2c0_host_timeout), |
| 1235 | |
| 1236 | // Inter-module signals |
| 1237 | .tl_i(i2c0_tl_req), |
| 1238 | .tl_o(i2c0_tl_rsp), |
| 1239 | |
| 1240 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1241 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1242 | .rst_ni (rstmgr_aon_resets.rst_i2c0_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1243 | ); |
| 1244 | |
| 1245 | i2c u_i2c1 ( |
| 1246 | |
| 1247 | // Input |
| 1248 | .cio_sda_i (cio_i2c1_sda_p2d), |
| 1249 | .cio_scl_i (cio_i2c1_scl_p2d), |
| 1250 | |
| 1251 | // Output |
| 1252 | .cio_sda_o (cio_i2c1_sda_d2p), |
| 1253 | .cio_sda_en_o (cio_i2c1_sda_en_d2p), |
| 1254 | .cio_scl_o (cio_i2c1_scl_d2p), |
| 1255 | .cio_scl_en_o (cio_i2c1_scl_en_d2p), |
| 1256 | |
| 1257 | // Interrupt |
| 1258 | .intr_fmt_watermark_o (intr_i2c1_fmt_watermark), |
| 1259 | .intr_rx_watermark_o (intr_i2c1_rx_watermark), |
| 1260 | .intr_fmt_overflow_o (intr_i2c1_fmt_overflow), |
| 1261 | .intr_rx_overflow_o (intr_i2c1_rx_overflow), |
| 1262 | .intr_nak_o (intr_i2c1_nak), |
| 1263 | .intr_scl_interference_o (intr_i2c1_scl_interference), |
| 1264 | .intr_sda_interference_o (intr_i2c1_sda_interference), |
| 1265 | .intr_stretch_timeout_o (intr_i2c1_stretch_timeout), |
| 1266 | .intr_sda_unstable_o (intr_i2c1_sda_unstable), |
| 1267 | .intr_trans_complete_o (intr_i2c1_trans_complete), |
| 1268 | .intr_tx_empty_o (intr_i2c1_tx_empty), |
| 1269 | .intr_tx_nonempty_o (intr_i2c1_tx_nonempty), |
| 1270 | .intr_tx_overflow_o (intr_i2c1_tx_overflow), |
| 1271 | .intr_acq_overflow_o (intr_i2c1_acq_overflow), |
| 1272 | .intr_ack_stop_o (intr_i2c1_ack_stop), |
| 1273 | .intr_host_timeout_o (intr_i2c1_host_timeout), |
| 1274 | |
| 1275 | // Inter-module signals |
| 1276 | .tl_i(i2c1_tl_req), |
| 1277 | .tl_o(i2c1_tl_rsp), |
| 1278 | |
| 1279 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1280 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1281 | .rst_ni (rstmgr_aon_resets.rst_i2c1_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1282 | ); |
| 1283 | |
| 1284 | i2c u_i2c2 ( |
| 1285 | |
| 1286 | // Input |
| 1287 | .cio_sda_i (cio_i2c2_sda_p2d), |
| 1288 | .cio_scl_i (cio_i2c2_scl_p2d), |
| 1289 | |
| 1290 | // Output |
| 1291 | .cio_sda_o (cio_i2c2_sda_d2p), |
| 1292 | .cio_sda_en_o (cio_i2c2_sda_en_d2p), |
| 1293 | .cio_scl_o (cio_i2c2_scl_d2p), |
| 1294 | .cio_scl_en_o (cio_i2c2_scl_en_d2p), |
| 1295 | |
| 1296 | // Interrupt |
| 1297 | .intr_fmt_watermark_o (intr_i2c2_fmt_watermark), |
| 1298 | .intr_rx_watermark_o (intr_i2c2_rx_watermark), |
| 1299 | .intr_fmt_overflow_o (intr_i2c2_fmt_overflow), |
| 1300 | .intr_rx_overflow_o (intr_i2c2_rx_overflow), |
| 1301 | .intr_nak_o (intr_i2c2_nak), |
| 1302 | .intr_scl_interference_o (intr_i2c2_scl_interference), |
| 1303 | .intr_sda_interference_o (intr_i2c2_sda_interference), |
| 1304 | .intr_stretch_timeout_o (intr_i2c2_stretch_timeout), |
| 1305 | .intr_sda_unstable_o (intr_i2c2_sda_unstable), |
| 1306 | .intr_trans_complete_o (intr_i2c2_trans_complete), |
| 1307 | .intr_tx_empty_o (intr_i2c2_tx_empty), |
| 1308 | .intr_tx_nonempty_o (intr_i2c2_tx_nonempty), |
| 1309 | .intr_tx_overflow_o (intr_i2c2_tx_overflow), |
| 1310 | .intr_acq_overflow_o (intr_i2c2_acq_overflow), |
| 1311 | .intr_ack_stop_o (intr_i2c2_ack_stop), |
| 1312 | .intr_host_timeout_o (intr_i2c2_host_timeout), |
| 1313 | |
| 1314 | // Inter-module signals |
| 1315 | .tl_i(i2c2_tl_req), |
| 1316 | .tl_o(i2c2_tl_rsp), |
| 1317 | |
| 1318 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1319 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1320 | .rst_ni (rstmgr_aon_resets.rst_i2c2_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1321 | ); |
| 1322 | |
| 1323 | pattgen u_pattgen ( |
| 1324 | |
| 1325 | // Output |
| 1326 | .cio_pda0_tx_o (cio_pattgen_pda0_tx_d2p), |
| 1327 | .cio_pda0_tx_en_o (cio_pattgen_pda0_tx_en_d2p), |
| 1328 | .cio_pcl0_tx_o (cio_pattgen_pcl0_tx_d2p), |
| 1329 | .cio_pcl0_tx_en_o (cio_pattgen_pcl0_tx_en_d2p), |
| 1330 | .cio_pda1_tx_o (cio_pattgen_pda1_tx_d2p), |
| 1331 | .cio_pda1_tx_en_o (cio_pattgen_pda1_tx_en_d2p), |
| 1332 | .cio_pcl1_tx_o (cio_pattgen_pcl1_tx_d2p), |
| 1333 | .cio_pcl1_tx_en_o (cio_pattgen_pcl1_tx_en_d2p), |
| 1334 | |
| 1335 | // Interrupt |
| 1336 | .intr_done_ch0_o (intr_pattgen_done_ch0), |
| 1337 | .intr_done_ch1_o (intr_pattgen_done_ch1), |
| 1338 | |
| 1339 | // Inter-module signals |
| 1340 | .tl_i(pattgen_tl_req), |
| 1341 | .tl_o(pattgen_tl_rsp), |
| 1342 | |
| 1343 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1344 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1345 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1346 | ); |
| 1347 | |
Michael Schaffner | a39557e | 2020-03-17 18:30:21 -0700 | [diff] [blame] | 1348 | rv_timer u_rv_timer ( |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 1349 | |
| 1350 | // Interrupt |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1351 | .intr_timer_expired_0_0_o (intr_rv_timer_timer_expired_0_0), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 1352 | |
| 1353 | // Inter-module signals |
| 1354 | .tl_i(rv_timer_tl_req), |
| 1355 | .tl_o(rv_timer_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1356 | |
| 1357 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1358 | .clk_i (clkmgr_aon_clocks.clk_io_div4_timers), |
| 1359 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]) |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 1360 | ); |
| 1361 | |
Michael Schaffner | a39557e | 2020-03-17 18:30:21 -0700 | [diff] [blame] | 1362 | usbdev u_usbdev ( |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 1363 | |
Pirmin Vogel | b054fc0 | 2020-03-11 11:23:03 +0100 | [diff] [blame] | 1364 | // Input |
| 1365 | .cio_sense_i (cio_usbdev_sense_p2d), |
| 1366 | .cio_d_i (cio_usbdev_d_p2d), |
| 1367 | .cio_dp_i (cio_usbdev_dp_p2d), |
| 1368 | .cio_dn_i (cio_usbdev_dn_p2d), |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 1369 | |
Pirmin Vogel | b054fc0 | 2020-03-11 11:23:03 +0100 | [diff] [blame] | 1370 | // Output |
| 1371 | .cio_se0_o (cio_usbdev_se0_d2p), |
| 1372 | .cio_se0_en_o (cio_usbdev_se0_en_d2p), |
Pirmin Vogel | fe6863b | 2020-05-11 17:30:54 +0200 | [diff] [blame] | 1373 | .cio_dp_pullup_o (cio_usbdev_dp_pullup_d2p), |
| 1374 | .cio_dp_pullup_en_o (cio_usbdev_dp_pullup_en_d2p), |
| 1375 | .cio_dn_pullup_o (cio_usbdev_dn_pullup_d2p), |
| 1376 | .cio_dn_pullup_en_o (cio_usbdev_dn_pullup_en_d2p), |
Pirmin Vogel | b054fc0 | 2020-03-11 11:23:03 +0100 | [diff] [blame] | 1377 | .cio_tx_mode_se_o (cio_usbdev_tx_mode_se_d2p), |
| 1378 | .cio_tx_mode_se_en_o (cio_usbdev_tx_mode_se_en_d2p), |
| 1379 | .cio_suspend_o (cio_usbdev_suspend_d2p), |
| 1380 | .cio_suspend_en_o (cio_usbdev_suspend_en_d2p), |
| 1381 | .cio_d_o (cio_usbdev_d_d2p), |
| 1382 | .cio_d_en_o (cio_usbdev_d_en_d2p), |
| 1383 | .cio_dp_o (cio_usbdev_dp_d2p), |
| 1384 | .cio_dp_en_o (cio_usbdev_dp_en_d2p), |
| 1385 | .cio_dn_o (cio_usbdev_dn_d2p), |
| 1386 | .cio_dn_en_o (cio_usbdev_dn_en_d2p), |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 1387 | |
| 1388 | // Interrupt |
| 1389 | .intr_pkt_received_o (intr_usbdev_pkt_received), |
| 1390 | .intr_pkt_sent_o (intr_usbdev_pkt_sent), |
| 1391 | .intr_disconnected_o (intr_usbdev_disconnected), |
| 1392 | .intr_host_lost_o (intr_usbdev_host_lost), |
| 1393 | .intr_link_reset_o (intr_usbdev_link_reset), |
| 1394 | .intr_link_suspend_o (intr_usbdev_link_suspend), |
| 1395 | .intr_link_resume_o (intr_usbdev_link_resume), |
| 1396 | .intr_av_empty_o (intr_usbdev_av_empty), |
| 1397 | .intr_rx_full_o (intr_usbdev_rx_full), |
| 1398 | .intr_av_overflow_o (intr_usbdev_av_overflow), |
| 1399 | .intr_link_in_err_o (intr_usbdev_link_in_err), |
| 1400 | .intr_rx_crc_err_o (intr_usbdev_rx_crc_err), |
| 1401 | .intr_rx_pid_err_o (intr_usbdev_rx_pid_err), |
| 1402 | .intr_rx_bitstuff_err_o (intr_usbdev_rx_bitstuff_err), |
| 1403 | .intr_frame_o (intr_usbdev_frame), |
| 1404 | .intr_connected_o (intr_usbdev_connected), |
Stefan Lippuner | 207b1a6 | 2020-11-10 09:25:53 +0100 | [diff] [blame] | 1405 | .intr_link_out_err_o (intr_usbdev_link_out_err), |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 1406 | |
Pirmin Vogel | dd3a2f0 | 2020-05-12 14:59:50 +0200 | [diff] [blame] | 1407 | // Inter-module signals |
Timothy Chen | 1555dce | 2020-08-11 11:26:50 -0700 | [diff] [blame] | 1408 | .usb_ref_val_o(usbdev_usb_ref_val_o), |
| 1409 | .usb_ref_pulse_o(usbdev_usb_ref_pulse_o), |
Timothy Chen | c2b279a | 2021-01-14 18:53:34 -0800 | [diff] [blame] | 1410 | .usb_out_of_rst_o(usbdev_usb_out_of_rst), |
| 1411 | .usb_aon_wake_en_o(usbdev_usb_aon_wake_en), |
| 1412 | .usb_aon_wake_ack_o(usbdev_usb_aon_wake_ack), |
| 1413 | .usb_suspend_o(usbdev_usb_suspend), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1414 | .usb_state_debug_i(pinmux_aon_usb_state_debug), |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 1415 | .ram_cfg_i(ast_ram_2p_cfg), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 1416 | .tl_i(usbdev_tl_req), |
| 1417 | .tl_o(usbdev_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1418 | |
| 1419 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1420 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1421 | .clk_aon_i (clkmgr_aon_clocks.clk_aon_peri), |
| 1422 | .clk_usb_48mhz_i (clkmgr_aon_clocks.clk_usb_peri), |
| 1423 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]), |
| 1424 | .rst_aon_ni (rstmgr_aon_resets.rst_sys_aon_n[rstmgr_pkg::Domain0Sel]), |
| 1425 | .rst_usb_48mhz_ni (rstmgr_aon_resets.rst_usb_n[rstmgr_pkg::Domain0Sel]) |
| 1426 | ); |
| 1427 | |
| 1428 | otp_ctrl #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 1429 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[1:0]), |
Michael Schaffner | 20972a6 | 2021-02-24 18:53:46 -0800 | [diff] [blame] | 1430 | .MemInitFile(OtpCtrlMemInitFile), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1431 | .RndCnstLfsrSeed(RndCnstOtpCtrlLfsrSeed), |
| 1432 | .RndCnstLfsrPerm(RndCnstOtpCtrlLfsrPerm) |
| 1433 | ) u_otp_ctrl ( |
| 1434 | |
| 1435 | // Interrupt |
| 1436 | .intr_otp_operation_done_o (intr_otp_ctrl_otp_operation_done), |
| 1437 | .intr_otp_error_o (intr_otp_ctrl_otp_error), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1438 | // [0]: fatal_macro_error |
| 1439 | // [1]: fatal_check_error |
| 1440 | .alert_tx_o ( alert_tx[1:0] ), |
| 1441 | .alert_rx_i ( alert_rx[1:0] ), |
| 1442 | |
| 1443 | // Inter-module signals |
| 1444 | .otp_ast_pwr_seq_o(otp_ctrl_otp_ast_pwr_seq_o), |
| 1445 | .otp_ast_pwr_seq_h_i(otp_ctrl_otp_ast_pwr_seq_h_i), |
Timothy Chen | 90b8242 | 2021-02-03 23:45:21 -0800 | [diff] [blame] | 1446 | .edn_o(edn0_edn_req[1]), |
| 1447 | .edn_i(edn0_edn_rsp[1]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1448 | .pwr_otp_i(pwrmgr_aon_pwr_otp_req), |
| 1449 | .pwr_otp_o(pwrmgr_aon_pwr_otp_rsp), |
| 1450 | .lc_otp_program_i(lc_ctrl_lc_otp_program_req), |
| 1451 | .lc_otp_program_o(lc_ctrl_lc_otp_program_rsp), |
| 1452 | .lc_otp_token_i(lc_ctrl_lc_otp_token_req), |
| 1453 | .lc_otp_token_o(lc_ctrl_lc_otp_token_rsp), |
| 1454 | .otp_lc_data_o(otp_ctrl_otp_lc_data), |
| 1455 | .lc_escalate_en_i(lc_ctrl_lc_escalate_en), |
| 1456 | .lc_creator_seed_sw_rw_en_i(lc_ctrl_lc_creator_seed_sw_rw_en), |
| 1457 | .lc_seed_hw_rd_en_i(lc_ctrl_lc_seed_hw_rd_en), |
| 1458 | .lc_dft_en_i(lc_ctrl_lc_dft_en), |
| 1459 | .lc_check_byp_en_i(lc_ctrl_lc_check_byp_en), |
| 1460 | .otp_keymgr_key_o(otp_ctrl_otp_keymgr_key), |
| 1461 | .flash_otp_key_i(flash_ctrl_otp_req), |
| 1462 | .flash_otp_key_o(flash_ctrl_otp_rsp), |
| 1463 | .sram_otp_key_i(otp_ctrl_sram_otp_key_req), |
| 1464 | .sram_otp_key_o(otp_ctrl_sram_otp_key_rsp), |
| 1465 | .otbn_otp_key_i('0), |
| 1466 | .otbn_otp_key_o(), |
| 1467 | .otp_hw_cfg_o(otp_ctrl_otp_hw_cfg), |
| 1468 | .tl_i(otp_ctrl_tl_req), |
| 1469 | .tl_o(otp_ctrl_tl_rsp), |
| 1470 | |
| 1471 | // Clock and reset connections |
| 1472 | .clk_i (clkmgr_aon_clocks.clk_io_div4_timers), |
| 1473 | .clk_edn_i (clkmgr_aon_clocks.clk_main_timers), |
| 1474 | .rst_ni (rstmgr_aon_resets.rst_lc_io_div4_n[rstmgr_pkg::Domain0Sel]), |
| 1475 | .rst_edn_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
| 1476 | ); |
| 1477 | |
| 1478 | lc_ctrl #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 1479 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[3:2]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1480 | .RndCnstLcKeymgrDivInvalid(RndCnstLcCtrlLcKeymgrDivInvalid), |
| 1481 | .RndCnstLcKeymgrDivTestDevRma(RndCnstLcCtrlLcKeymgrDivTestDevRma), |
| 1482 | .RndCnstLcKeymgrDivProduction(RndCnstLcCtrlLcKeymgrDivProduction) |
| 1483 | ) u_lc_ctrl ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1484 | // [2]: fatal_prog_error |
| 1485 | // [3]: fatal_state_error |
| 1486 | .alert_tx_o ( alert_tx[3:2] ), |
| 1487 | .alert_rx_i ( alert_rx[3:2] ), |
| 1488 | |
| 1489 | // Inter-module signals |
Michael Schaffner | a706380 | 2021-02-18 18:06:03 -0800 | [diff] [blame] | 1490 | .jtag_i(pinmux_aon_lc_jtag_req), |
| 1491 | .jtag_o(pinmux_aon_lc_jtag_rsp), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1492 | .esc_wipe_secrets_tx_i(alert_handler_esc_tx[1]), |
| 1493 | .esc_wipe_secrets_rx_o(alert_handler_esc_rx[1]), |
| 1494 | .esc_scrap_state_tx_i(alert_handler_esc_tx[2]), |
| 1495 | .esc_scrap_state_rx_o(alert_handler_esc_rx[2]), |
| 1496 | .pwr_lc_i(pwrmgr_aon_pwr_lc_req), |
| 1497 | .pwr_lc_o(pwrmgr_aon_pwr_lc_rsp), |
| 1498 | .otp_lc_data_i(otp_ctrl_otp_lc_data), |
| 1499 | .lc_otp_program_o(lc_ctrl_lc_otp_program_req), |
| 1500 | .lc_otp_program_i(lc_ctrl_lc_otp_program_rsp), |
| 1501 | .lc_otp_token_o(lc_ctrl_lc_otp_token_req), |
| 1502 | .lc_otp_token_i(lc_ctrl_lc_otp_token_rsp), |
| 1503 | .lc_dft_en_o(lc_ctrl_lc_dft_en), |
| 1504 | .lc_nvm_debug_en_o(lc_ctrl_lc_nvm_debug_en), |
| 1505 | .lc_hw_debug_en_o(lc_ctrl_lc_hw_debug_en), |
| 1506 | .lc_cpu_en_o(lc_ctrl_lc_cpu_en), |
Michael Schaffner | dc0c1e9 | 2021-03-02 14:41:31 -0800 | [diff] [blame] | 1507 | .lc_keymgr_en_o(lc_ctrl_lc_keymgr_en), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1508 | .lc_escalate_en_o(lc_ctrl_lc_escalate_en), |
Timothy Chen | fa60a60 | 2021-03-23 14:29:40 -0700 | [diff] [blame] | 1509 | .lc_clk_byp_req_o(lc_ctrl_lc_clk_byp_req), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1510 | .lc_clk_byp_ack_i(lc_ctrl_lc_clk_byp_ack), |
| 1511 | .lc_flash_rma_req_o(flash_ctrl_rma_req), |
| 1512 | .lc_flash_rma_seed_o(flash_ctrl_rma_seed), |
| 1513 | .lc_flash_rma_ack_i(flash_ctrl_rma_ack), |
| 1514 | .lc_check_byp_en_o(lc_ctrl_lc_check_byp_en), |
| 1515 | .lc_creator_seed_sw_rw_en_o(lc_ctrl_lc_creator_seed_sw_rw_en), |
| 1516 | .lc_owner_seed_sw_rw_en_o(lc_ctrl_lc_owner_seed_sw_rw_en), |
| 1517 | .lc_iso_part_sw_rd_en_o(lc_ctrl_lc_iso_part_sw_rd_en), |
| 1518 | .lc_iso_part_sw_wr_en_o(lc_ctrl_lc_iso_part_sw_wr_en), |
| 1519 | .lc_seed_hw_rd_en_o(lc_ctrl_lc_seed_hw_rd_en), |
| 1520 | .lc_keymgr_div_o(lc_ctrl_lc_keymgr_div), |
| 1521 | .otp_hw_cfg_i(otp_ctrl_otp_hw_cfg), |
| 1522 | .tl_i(lc_ctrl_tl_req), |
| 1523 | .tl_o(lc_ctrl_tl_rsp), |
Michael Schaffner | 8bf4fe6 | 2021-02-18 12:56:08 -0800 | [diff] [blame] | 1524 | .scanmode_i, |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1525 | |
| 1526 | // Clock and reset connections |
| 1527 | .clk_i (clkmgr_aon_clocks.clk_io_div4_timers), |
| 1528 | .rst_ni (rstmgr_aon_resets.rst_lc_io_div4_n[rstmgr_pkg::Domain0Sel]) |
| 1529 | ); |
| 1530 | |
| 1531 | alert_handler #( |
| 1532 | .RndCnstLfsrSeed(RndCnstAlertHandlerLfsrSeed), |
| 1533 | .RndCnstLfsrPerm(RndCnstAlertHandlerLfsrPerm) |
| 1534 | ) u_alert_handler ( |
| 1535 | |
| 1536 | // Interrupt |
| 1537 | .intr_classa_o (intr_alert_handler_classa), |
| 1538 | .intr_classb_o (intr_alert_handler_classb), |
| 1539 | .intr_classc_o (intr_alert_handler_classc), |
| 1540 | .intr_classd_o (intr_alert_handler_classd), |
| 1541 | |
| 1542 | // Inter-module signals |
| 1543 | .crashdump_o(alert_handler_crashdump), |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 1544 | .edn_o(edn0_edn_req[4]), |
| 1545 | .edn_i(edn0_edn_rsp[4]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1546 | .esc_rx_i(alert_handler_esc_rx), |
| 1547 | .esc_tx_o(alert_handler_esc_tx), |
| 1548 | .tl_i(alert_handler_tl_req), |
| 1549 | .tl_o(alert_handler_tl_rsp), |
| 1550 | // alert signals |
| 1551 | .alert_rx_o ( alert_rx ), |
| 1552 | .alert_tx_i ( alert_tx ), |
| 1553 | |
| 1554 | // Clock and reset connections |
| 1555 | .clk_i (clkmgr_aon_clocks.clk_io_div4_timers), |
Timothy Chen | 44b404e | 2021-02-05 13:06:01 -0800 | [diff] [blame] | 1556 | .clk_edn_i (clkmgr_aon_clocks.clk_main_timers), |
| 1557 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]), |
| 1558 | .rst_edn_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1559 | ); |
| 1560 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1561 | pwrmgr u_pwrmgr_aon ( |
| 1562 | |
| 1563 | // Interrupt |
| 1564 | .intr_wakeup_o (intr_pwrmgr_aon_wakeup), |
| 1565 | |
| 1566 | // Inter-module signals |
| 1567 | .pwr_ast_o(pwrmgr_ast_req_o), |
| 1568 | .pwr_ast_i(pwrmgr_ast_rsp_i), |
| 1569 | .pwr_rst_o(pwrmgr_aon_pwr_rst_req), |
| 1570 | .pwr_rst_i(pwrmgr_aon_pwr_rst_rsp), |
| 1571 | .pwr_clk_o(pwrmgr_aon_pwr_clk_req), |
| 1572 | .pwr_clk_i(pwrmgr_aon_pwr_clk_rsp), |
| 1573 | .pwr_otp_o(pwrmgr_aon_pwr_otp_req), |
| 1574 | .pwr_otp_i(pwrmgr_aon_pwr_otp_rsp), |
| 1575 | .pwr_lc_o(pwrmgr_aon_pwr_lc_req), |
| 1576 | .pwr_lc_i(pwrmgr_aon_pwr_lc_rsp), |
| 1577 | .pwr_flash_o(pwrmgr_aon_pwr_flash_req), |
| 1578 | .pwr_flash_i(pwrmgr_aon_pwr_flash_rsp), |
| 1579 | .esc_rst_tx_i(alert_handler_esc_tx[3]), |
| 1580 | .esc_rst_rx_o(alert_handler_esc_rx[3]), |
| 1581 | .pwr_cpu_i(pwrmgr_aon_pwr_cpu), |
| 1582 | .wakeups_i(pwrmgr_aon_wakeups), |
| 1583 | .rstreqs_i(pwrmgr_aon_rstreqs), |
Timothy Chen | 383afb8 | 2021-02-23 13:18:53 -0800 | [diff] [blame] | 1584 | .strap_o(pwrmgr_aon_strap), |
| 1585 | .low_power_o(pwrmgr_aon_low_power), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1586 | .tl_i(pwrmgr_aon_tl_req), |
| 1587 | .tl_o(pwrmgr_aon_tl_rsp), |
| 1588 | |
| 1589 | // Clock and reset connections |
| 1590 | .clk_i (clkmgr_aon_clocks.clk_io_div4_powerup), |
| 1591 | .clk_slow_i (clkmgr_aon_clocks.clk_aon_powerup), |
| 1592 | .rst_ni (rstmgr_aon_resets.rst_por_n[rstmgr_pkg::DomainAonSel]), |
| 1593 | .rst_slow_ni (rstmgr_aon_resets.rst_por_aon_n[rstmgr_pkg::DomainAonSel]) |
| 1594 | ); |
| 1595 | |
| 1596 | rstmgr u_rstmgr_aon ( |
| 1597 | |
| 1598 | // Inter-module signals |
| 1599 | .pwr_i(pwrmgr_aon_pwr_rst_req), |
| 1600 | .pwr_o(pwrmgr_aon_pwr_rst_rsp), |
| 1601 | .resets_o(rstmgr_aon_resets), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1602 | .cpu_i(rstmgr_aon_cpu), |
| 1603 | .alert_dump_i(alert_handler_crashdump), |
Tom Roberts | c88e97f | 2021-03-04 13:38:20 +0000 | [diff] [blame] | 1604 | .cpu_dump_i(rv_core_ibex_crash_dump), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1605 | .resets_ast_o(rsts_ast_o), |
| 1606 | .tl_i(rstmgr_aon_tl_req), |
| 1607 | .tl_o(rstmgr_aon_tl_rsp), |
Michael Schaffner | 8bf4fe6 | 2021-02-18 12:56:08 -0800 | [diff] [blame] | 1608 | .scanmode_i, |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1609 | .scan_rst_ni (scan_rst_ni), |
| 1610 | |
| 1611 | // Clock and reset connections |
| 1612 | .clk_i (clkmgr_aon_clocks.clk_io_div4_powerup), |
| 1613 | .clk_aon_i (clkmgr_aon_clocks.clk_aon_powerup), |
| 1614 | .clk_main_i (clkmgr_aon_clocks.clk_main_powerup), |
| 1615 | .clk_io_i (clkmgr_aon_clocks.clk_io_powerup), |
| 1616 | .clk_usb_i (clkmgr_aon_clocks.clk_usb_powerup), |
| 1617 | .clk_io_div2_i (clkmgr_aon_clocks.clk_io_div2_powerup), |
| 1618 | .clk_io_div4_i (clkmgr_aon_clocks.clk_io_div4_powerup), |
| 1619 | .rst_ni (rst_ni) |
| 1620 | ); |
| 1621 | |
| 1622 | clkmgr u_clkmgr_aon ( |
| 1623 | |
| 1624 | // Inter-module signals |
| 1625 | .clocks_o(clkmgr_aon_clocks), |
Rupert Swarbrick | b3b9a47 | 2021-03-26 10:31:15 +0000 | [diff] [blame] | 1626 | .lc_dft_en_i(lc_ctrl_pkg::LC_TX_DEFAULT), |
Timothy Chen | fa60a60 | 2021-03-23 14:29:40 -0700 | [diff] [blame] | 1627 | .ast_clk_byp_req_o(ast_clk_byp_req_o), |
| 1628 | .ast_clk_byp_ack_i(ast_clk_byp_ack_i), |
| 1629 | .lc_clk_byp_req_i(lc_ctrl_lc_clk_byp_req), |
| 1630 | .lc_clk_byp_ack_o(lc_ctrl_lc_clk_byp_ack), |
Timothy Chen | e38c470 | 2021-02-08 18:38:03 -0800 | [diff] [blame] | 1631 | .jitter_en_o(clk_main_jitter_en_o), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1632 | .clk_main_i(clk_main_i), |
| 1633 | .clk_io_i(clk_io_i), |
| 1634 | .clk_usb_i(clk_usb_i), |
| 1635 | .clk_aon_i(clk_aon_i), |
| 1636 | .clocks_ast_o(clks_ast_o), |
| 1637 | .pwr_i(pwrmgr_aon_pwr_clk_req), |
| 1638 | .pwr_o(pwrmgr_aon_pwr_clk_rsp), |
| 1639 | .idle_i(clkmgr_aon_idle), |
| 1640 | .tl_i(clkmgr_aon_tl_req), |
| 1641 | .tl_o(clkmgr_aon_tl_rsp), |
Michael Schaffner | 8bf4fe6 | 2021-02-18 12:56:08 -0800 | [diff] [blame] | 1642 | .scanmode_i, |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1643 | |
| 1644 | // Clock and reset connections |
| 1645 | .clk_i (clkmgr_aon_clocks.clk_io_div4_powerup), |
| 1646 | .rst_ni (rstmgr_aon_resets.rst_por_io_div4_n[rstmgr_pkg::DomainAonSel]), |
| 1647 | .rst_main_ni (rstmgr_aon_resets.rst_por_n[rstmgr_pkg::DomainAonSel]), |
| 1648 | .rst_io_ni (rstmgr_aon_resets.rst_por_io_n[rstmgr_pkg::DomainAonSel]), |
| 1649 | .rst_usb_ni (rstmgr_aon_resets.rst_por_usb_n[rstmgr_pkg::DomainAonSel]), |
| 1650 | .rst_io_div2_ni (rstmgr_aon_resets.rst_por_io_div2_n[rstmgr_pkg::DomainAonSel]), |
| 1651 | .rst_io_div4_ni (rstmgr_aon_resets.rst_por_io_div4_n[rstmgr_pkg::DomainAonSel]) |
| 1652 | ); |
| 1653 | |
Eric Shiu | 5f1d304 | 2021-03-17 17:24:11 -0700 | [diff] [blame] | 1654 | adc_ctrl u_adc_ctrl_aon ( |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 1655 | |
| 1656 | // Interrupt |
| 1657 | .intr_debug_cable_o (intr_adc_ctrl_aon_debug_cable), |
| 1658 | |
| 1659 | // Inter-module signals |
| 1660 | .adc_o(adc_req_o), |
| 1661 | .adc_i(adc_rsp_i), |
| 1662 | .debug_cable_wakeup_o(pwrmgr_aon_wakeups[0]), |
| 1663 | .tl_i(adc_ctrl_aon_tl_req), |
| 1664 | .tl_o(adc_ctrl_aon_tl_rsp), |
| 1665 | |
| 1666 | // Clock and reset connections |
| 1667 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1668 | .clk_aon_i (clkmgr_aon_clocks.clk_aon_peri), |
| 1669 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::DomainAonSel]), |
| 1670 | .rst_slow_ni (rstmgr_aon_resets.rst_sys_aon_n[rstmgr_pkg::DomainAonSel]) |
| 1671 | ); |
| 1672 | |
Michael Schaffner | 5f54587 | 2021-03-05 17:54:28 -0800 | [diff] [blame] | 1673 | pinmux #( |
| 1674 | .TargetCfg(PinmuxAonTargetCfg) |
| 1675 | ) u_pinmux_aon ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1676 | |
| 1677 | // Inter-module signals |
Michael Schaffner | a706380 | 2021-02-18 18:06:03 -0800 | [diff] [blame] | 1678 | .lc_hw_debug_en_i(lc_ctrl_lc_hw_debug_en), |
| 1679 | .lc_dft_en_i(lc_ctrl_lc_dft_en), |
| 1680 | .lc_jtag_o(pinmux_aon_lc_jtag_req), |
| 1681 | .lc_jtag_i(pinmux_aon_lc_jtag_rsp), |
Michael Schaffner | 5f54587 | 2021-03-05 17:54:28 -0800 | [diff] [blame] | 1682 | .rv_jtag_o(pinmux_aon_rv_jtag_req), |
| 1683 | .rv_jtag_i(pinmux_aon_rv_jtag_rsp), |
Michael Schaffner | a706380 | 2021-02-18 18:06:03 -0800 | [diff] [blame] | 1684 | .dft_jtag_o(), |
| 1685 | .dft_jtag_i(jtag_pkg::JTAG_RSP_DEFAULT), |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 1686 | .dft_strap_test_o(dft_strap_test_o), |
Timothy Chen | 383afb8 | 2021-02-23 13:18:53 -0800 | [diff] [blame] | 1687 | .sleep_en_i(pwrmgr_aon_low_power), |
| 1688 | .strap_en_i(pwrmgr_aon_strap), |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 1689 | .aon_wkup_req_o(pwrmgr_aon_wakeups[1]), |
| 1690 | .usb_wkup_req_o(pwrmgr_aon_wakeups[2]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1691 | .usb_out_of_rst_i(usbdev_usb_out_of_rst), |
| 1692 | .usb_aon_wake_en_i(usbdev_usb_aon_wake_en), |
| 1693 | .usb_aon_wake_ack_i(usbdev_usb_aon_wake_ack), |
| 1694 | .usb_suspend_i(usbdev_usb_suspend), |
| 1695 | .usb_state_debug_o(pinmux_aon_usb_state_debug), |
| 1696 | .tl_i(pinmux_aon_tl_req), |
| 1697 | .tl_o(pinmux_aon_tl_rsp), |
| 1698 | |
| 1699 | .periph_to_mio_i (mio_d2p ), |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 1700 | .periph_to_mio_oe_i (mio_en_d2p ), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1701 | .mio_to_periph_o (mio_p2d ), |
| 1702 | |
Michael Schaffner | 43ce8d5 | 2021-02-10 17:04:57 -0800 | [diff] [blame] | 1703 | .mio_attr_o, |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1704 | .mio_out_o, |
| 1705 | .mio_oe_o, |
| 1706 | .mio_in_i, |
| 1707 | |
| 1708 | .periph_to_dio_i (dio_d2p ), |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 1709 | .periph_to_dio_oe_i (dio_en_d2p ), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1710 | .dio_to_periph_o (dio_p2d ), |
| 1711 | |
Michael Schaffner | 43ce8d5 | 2021-02-10 17:04:57 -0800 | [diff] [blame] | 1712 | .dio_attr_o, |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1713 | .dio_out_o, |
| 1714 | .dio_oe_o, |
| 1715 | .dio_in_i, |
| 1716 | |
Michael Schaffner | a1f7618 | 2021-03-16 18:05:46 -0700 | [diff] [blame] | 1717 | .scanmode_i, |
Michael Schaffner | 43ce8d5 | 2021-02-10 17:04:57 -0800 | [diff] [blame] | 1718 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1719 | // Clock and reset connections |
Timothy Chen | 383afb8 | 2021-02-23 13:18:53 -0800 | [diff] [blame] | 1720 | .clk_i (clkmgr_aon_clocks.clk_io_div4_powerup), |
| 1721 | .clk_aon_i (clkmgr_aon_clocks.clk_aon_powerup), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1722 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::DomainAonSel]), |
| 1723 | .rst_aon_ni (rstmgr_aon_resets.rst_sys_aon_n[rstmgr_pkg::DomainAonSel]) |
| 1724 | ); |
| 1725 | |
Timothy Chen | 2b8ef76 | 2021-02-16 14:44:55 -0800 | [diff] [blame] | 1726 | aon_timer u_aon_timer_aon ( |
| 1727 | |
| 1728 | // Interrupt |
| 1729 | .intr_wkup_timer_expired_o (intr_aon_timer_aon_wkup_timer_expired), |
| 1730 | .intr_wdog_timer_bark_o (intr_aon_timer_aon_wdog_timer_bark), |
| 1731 | |
| 1732 | // Inter-module signals |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 1733 | .aon_timer_wkup_req_o(pwrmgr_aon_wakeups[3]), |
Timothy Chen | 2b8ef76 | 2021-02-16 14:44:55 -0800 | [diff] [blame] | 1734 | .aon_timer_rst_req_o(pwrmgr_aon_rstreqs), |
Timothy Chen | 0481a82 | 2021-03-05 14:30:17 -0800 | [diff] [blame] | 1735 | .lc_cpu_en_i(lc_ctrl_lc_cpu_en), |
Timothy Chen | 383afb8 | 2021-02-23 13:18:53 -0800 | [diff] [blame] | 1736 | .sleep_mode_i(pwrmgr_aon_low_power), |
Timothy Chen | 2b8ef76 | 2021-02-16 14:44:55 -0800 | [diff] [blame] | 1737 | .tl_i(aon_timer_aon_tl_req), |
| 1738 | .tl_o(aon_timer_aon_tl_rsp), |
| 1739 | |
| 1740 | // Clock and reset connections |
| 1741 | .clk_i (clkmgr_aon_clocks.clk_io_div4_timers), |
| 1742 | .clk_aon_i (clkmgr_aon_clocks.clk_aon_timers), |
| 1743 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::DomainAonSel]), |
| 1744 | .rst_aon_ni (rstmgr_aon_resets.rst_sys_aon_n[rstmgr_pkg::DomainAonSel]) |
| 1745 | ); |
| 1746 | |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 1747 | sensor_ctrl #( |
| 1748 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[10:4]) |
| 1749 | ) u_sensor_ctrl_aon ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1750 | |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 1751 | // Input |
| 1752 | .cio_ast_debug_in_i (cio_sensor_ctrl_aon_ast_debug_in_p2d), |
| 1753 | |
| 1754 | // Output |
| 1755 | .cio_ast_debug_out_o (cio_sensor_ctrl_aon_ast_debug_out_d2p), |
| 1756 | .cio_ast_debug_out_en_o (cio_sensor_ctrl_aon_ast_debug_out_en_d2p), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1757 | // [4]: recov_as |
| 1758 | // [5]: recov_cg |
| 1759 | // [6]: recov_gd |
| 1760 | // [7]: recov_ts_hi |
| 1761 | // [8]: recov_ts_lo |
| 1762 | // [9]: recov_ls |
| 1763 | // [10]: recov_ot |
| 1764 | .alert_tx_o ( alert_tx[10:4] ), |
| 1765 | .alert_rx_i ( alert_rx[10:4] ), |
| 1766 | |
| 1767 | // Inter-module signals |
| 1768 | .ast_alert_i(sensor_ctrl_ast_alert_req_i), |
| 1769 | .ast_alert_o(sensor_ctrl_ast_alert_rsp_o), |
| 1770 | .ast_status_i(sensor_ctrl_ast_status_i), |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 1771 | .ast2pinmux_i(ast2pinmux_i), |
| 1772 | .pinmux2ast_o(pinmux2ast_o), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1773 | .tl_i(sensor_ctrl_aon_tl_req), |
| 1774 | .tl_o(sensor_ctrl_aon_tl_rsp), |
| 1775 | |
| 1776 | // Clock and reset connections |
| 1777 | .clk_i (clkmgr_aon_clocks.clk_io_div4_secure), |
| 1778 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::DomainAonSel]) |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 1779 | ); |
| 1780 | |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 1781 | sram_ctrl #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 1782 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[12:11]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1783 | .RndCnstSramKey(RndCnstSramCtrlRetAonSramKey), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 1784 | .RndCnstSramNonce(RndCnstSramCtrlRetAonSramNonce), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 1785 | .RndCnstSramLfsrPerm(RndCnstSramCtrlRetAonSramLfsrPerm), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 1786 | .InstrExec(SramCtrlRetAonInstrExec) |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1787 | ) u_sram_ctrl_ret_aon ( |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 1788 | // [11]: fatal_intg_error |
| 1789 | // [12]: fatal_parity_error |
| 1790 | .alert_tx_o ( alert_tx[12:11] ), |
| 1791 | .alert_rx_i ( alert_rx[12:11] ), |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 1792 | |
| 1793 | // Inter-module signals |
| 1794 | .sram_otp_key_o(otp_ctrl_sram_otp_key_req[1]), |
| 1795 | .sram_otp_key_i(otp_ctrl_sram_otp_key_rsp[1]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1796 | .sram_scr_o(sram_ctrl_ret_aon_sram_scr_req), |
| 1797 | .sram_scr_i(sram_ctrl_ret_aon_sram_scr_rsp), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 1798 | .sram_scr_init_o(sram_ctrl_ret_aon_sram_scr_init_req), |
| 1799 | .sram_scr_init_i(sram_ctrl_ret_aon_sram_scr_init_rsp), |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 1800 | .lc_escalate_en_i(lc_ctrl_lc_escalate_en), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 1801 | .lc_hw_debug_en_i(lc_ctrl_lc_hw_debug_en), |
| 1802 | .otp_hw_cfg_i(otp_ctrl_otp_hw_cfg), |
| 1803 | .en_ifetch_o(sram_ctrl_ret_aon_en_ifetch), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 1804 | .intg_error_i(ram_ret_aon_intg_error), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1805 | .tl_i(sram_ctrl_ret_aon_tl_req), |
| 1806 | .tl_o(sram_ctrl_ret_aon_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1807 | |
| 1808 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1809 | .clk_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1810 | .clk_otp_i (clkmgr_aon_clocks.clk_io_div4_peri), |
| 1811 | .rst_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::DomainAonSel]), |
| 1812 | .rst_otp_ni (rstmgr_aon_resets.rst_lc_io_div4_n[rstmgr_pkg::DomainAonSel]) |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 1813 | ); |
| 1814 | |
Timothy Chen | ccf343d | 2020-12-04 20:38:15 -0800 | [diff] [blame] | 1815 | flash_ctrl #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 1816 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[15:13]), |
Timothy Chen | ccf343d | 2020-12-04 20:38:15 -0800 | [diff] [blame] | 1817 | .RndCnstAddrKey(RndCnstFlashCtrlAddrKey), |
Timothy Chen | 24b6279 | 2020-12-11 15:09:05 -0800 | [diff] [blame] | 1818 | .RndCnstDataKey(RndCnstFlashCtrlDataKey), |
| 1819 | .RndCnstLfsrSeed(RndCnstFlashCtrlLfsrSeed), |
| 1820 | .RndCnstLfsrPerm(RndCnstFlashCtrlLfsrPerm) |
Timothy Chen | ccf343d | 2020-12-04 20:38:15 -0800 | [diff] [blame] | 1821 | ) u_flash_ctrl ( |
Timothy Chen | 1555dce | 2020-08-11 11:26:50 -0700 | [diff] [blame] | 1822 | |
Timothy Chen | 6a34b6e | 2021-02-22 11:33:11 -0800 | [diff] [blame] | 1823 | // Input |
| 1824 | .cio_tck_i (cio_flash_ctrl_tck_p2d), |
| 1825 | .cio_tms_i (cio_flash_ctrl_tms_p2d), |
| 1826 | .cio_tdi_i (cio_flash_ctrl_tdi_p2d), |
| 1827 | |
| 1828 | // Output |
| 1829 | .cio_tdo_o (cio_flash_ctrl_tdo_d2p), |
| 1830 | .cio_tdo_en_o (cio_flash_ctrl_tdo_en_d2p), |
| 1831 | |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1832 | // Interrupt |
| 1833 | .intr_prog_empty_o (intr_flash_ctrl_prog_empty), |
| 1834 | .intr_prog_lvl_o (intr_flash_ctrl_prog_lvl), |
| 1835 | .intr_rd_full_o (intr_flash_ctrl_rd_full), |
| 1836 | .intr_rd_lvl_o (intr_flash_ctrl_rd_lvl), |
| 1837 | .intr_op_done_o (intr_flash_ctrl_op_done), |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 1838 | .intr_err_o (intr_flash_ctrl_err), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 1839 | // [13]: recov_err |
| 1840 | // [14]: recov_mp_err |
| 1841 | // [15]: recov_ecc_err |
| 1842 | .alert_tx_o ( alert_tx[15:13] ), |
| 1843 | .alert_rx_i ( alert_rx[15:13] ), |
Timothy Chen | 1555dce | 2020-08-11 11:26:50 -0700 | [diff] [blame] | 1844 | |
| 1845 | // Inter-module signals |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1846 | .flash_o(flash_ctrl_flash_req), |
| 1847 | .flash_i(flash_ctrl_flash_rsp), |
Timothy Chen | ccf343d | 2020-12-04 20:38:15 -0800 | [diff] [blame] | 1848 | .otp_o(flash_ctrl_otp_req), |
| 1849 | .otp_i(flash_ctrl_otp_rsp), |
Michael Schaffner | 6d3d6a0 | 2020-12-11 13:52:51 -0800 | [diff] [blame] | 1850 | .lc_creator_seed_sw_rw_en_i(lc_ctrl_lc_creator_seed_sw_rw_en), |
| 1851 | .lc_owner_seed_sw_rw_en_i(lc_ctrl_lc_owner_seed_sw_rw_en), |
| 1852 | .lc_iso_part_sw_rd_en_i(lc_ctrl_lc_iso_part_sw_rd_en), |
| 1853 | .lc_iso_part_sw_wr_en_i(lc_ctrl_lc_iso_part_sw_wr_en), |
| 1854 | .lc_seed_hw_rd_en_i(lc_ctrl_lc_seed_hw_rd_en), |
Timothy Chen | 3cb138f | 2020-12-15 20:35:03 -0800 | [diff] [blame] | 1855 | .rma_req_i(flash_ctrl_rma_req), |
| 1856 | .rma_ack_o(flash_ctrl_rma_ack), |
| 1857 | .rma_seed_i(flash_ctrl_rma_seed), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1858 | .pwrmgr_i(pwrmgr_aon_pwr_flash_req), |
| 1859 | .pwrmgr_o(pwrmgr_aon_pwr_flash_rsp), |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1860 | .keymgr_o(flash_ctrl_keymgr), |
Timothy Chen | 76eb883 | 2021-03-25 16:49:58 -0700 | [diff] [blame] | 1861 | .core_tl_i(flash_ctrl_core_tl_req), |
| 1862 | .core_tl_o(flash_ctrl_core_tl_rsp), |
| 1863 | .prim_tl_i(flash_ctrl_prim_tl_req), |
| 1864 | .prim_tl_o(flash_ctrl_prim_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1865 | |
| 1866 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1867 | .clk_i (clkmgr_aon_clocks.clk_main_infra), |
| 1868 | .clk_otp_i (clkmgr_aon_clocks.clk_io_div4_infra), |
| 1869 | .rst_ni (rstmgr_aon_resets.rst_lc_n[rstmgr_pkg::Domain0Sel]), |
| 1870 | .rst_otp_ni (rstmgr_aon_resets.rst_lc_io_div4_n[rstmgr_pkg::Domain0Sel]) |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1871 | ); |
| 1872 | |
| 1873 | rv_plic u_rv_plic ( |
| 1874 | |
| 1875 | // Inter-module signals |
| 1876 | .tl_i(rv_plic_tl_req), |
| 1877 | .tl_o(rv_plic_tl_rsp), |
| 1878 | |
| 1879 | .intr_src_i (intr_vector), |
| 1880 | .irq_o (irq_plic), |
| 1881 | .irq_id_o (irq_id), |
| 1882 | .msip_o (msip), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1883 | |
| 1884 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1885 | .clk_i (clkmgr_aon_clocks.clk_main_secure), |
| 1886 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1887 | ); |
| 1888 | |
| 1889 | aes #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 1890 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[17:16]), |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1891 | .AES192Enable(1'b1), |
| 1892 | .Masking(AesMasking), |
| 1893 | .SBoxImpl(AesSBoxImpl), |
| 1894 | .SecStartTriggerDelay(SecAesStartTriggerDelay), |
| 1895 | .SecAllowForcingMasks(SecAesAllowForcingMasks), |
Pirmin Vogel | 95cea45 | 2021-03-02 08:54:01 +0100 | [diff] [blame] | 1896 | .SecSkipPRNGReseeding(SecAesSkipPRNGReseeding), |
Pirmin Vogel | d31b0cc | 2021-02-26 11:48:39 +0100 | [diff] [blame] | 1897 | .RndCnstClearingLfsrSeed(RndCnstAesClearingLfsrSeed), |
| 1898 | .RndCnstClearingLfsrPerm(RndCnstAesClearingLfsrPerm), |
Pirmin Vogel | 116ecac | 2021-03-19 11:21:42 +0100 | [diff] [blame] | 1899 | .RndCnstClearingSharePerm(RndCnstAesClearingSharePerm), |
Pirmin Vogel | d31b0cc | 2021-02-26 11:48:39 +0100 | [diff] [blame] | 1900 | .RndCnstMaskingLfsrSeed(RndCnstAesMaskingLfsrSeed), |
| 1901 | .RndCnstMskgChunkLfsrPerm(RndCnstAesMskgChunkLfsrPerm) |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1902 | ) u_aes ( |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 1903 | // [16]: recov_ctrl_update_err |
| 1904 | // [17]: fatal_fault |
| 1905 | .alert_tx_o ( alert_tx[17:16] ), |
| 1906 | .alert_rx_i ( alert_rx[17:16] ), |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1907 | |
| 1908 | // Inter-module signals |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1909 | .idle_o(clkmgr_aon_idle[0]), |
Pirmin Vogel | 144ca84 | 2021-02-26 15:46:43 +0100 | [diff] [blame] | 1910 | .lc_escalate_en_i(lc_ctrl_lc_escalate_en), |
Timothy Chen | 72cb99c | 2021-03-08 15:58:44 -0800 | [diff] [blame] | 1911 | .edn_o(edn0_edn_req[5]), |
| 1912 | .edn_i(edn0_edn_rsp[5]), |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1913 | .tl_i(aes_tl_req), |
| 1914 | .tl_o(aes_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1915 | |
| 1916 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1917 | .clk_i (clkmgr_aon_clocks.clk_main_aes), |
Pirmin Vogel | 95cea45 | 2021-03-02 08:54:01 +0100 | [diff] [blame] | 1918 | .clk_edn_i (clkmgr_aon_clocks.clk_main_aes), |
| 1919 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
| 1920 | .rst_edn_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1921 | ); |
| 1922 | |
| 1923 | hmac u_hmac ( |
| 1924 | |
| 1925 | // Interrupt |
| 1926 | .intr_hmac_done_o (intr_hmac_hmac_done), |
| 1927 | .intr_fifo_empty_o (intr_hmac_fifo_empty), |
| 1928 | .intr_hmac_err_o (intr_hmac_hmac_err), |
| 1929 | |
| 1930 | // Inter-module signals |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1931 | .idle_o(clkmgr_aon_idle[1]), |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1932 | .tl_i(hmac_tl_req), |
| 1933 | .tl_o(hmac_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1934 | |
| 1935 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1936 | .clk_i (clkmgr_aon_clocks.clk_main_hmac), |
| 1937 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1938 | ); |
| 1939 | |
| 1940 | kmac #( |
| 1941 | .EnMasking(KmacEnMasking), |
| 1942 | .ReuseShare(KmacReuseShare) |
| 1943 | ) u_kmac ( |
| 1944 | |
| 1945 | // Interrupt |
| 1946 | .intr_kmac_done_o (intr_kmac_kmac_done), |
| 1947 | .intr_fifo_empty_o (intr_kmac_fifo_empty), |
| 1948 | .intr_kmac_err_o (intr_kmac_kmac_err), |
| 1949 | |
| 1950 | // Inter-module signals |
| 1951 | .keymgr_key_i(keymgr_kmac_key), |
Eunchan Kim | 02eaac7 | 2021-03-23 10:54:25 -0700 | [diff] [blame] | 1952 | .app_i(kmac_app_req), |
| 1953 | .app_o(kmac_app_rsp), |
Timothy Chen | 44b404e | 2021-02-05 13:06:01 -0800 | [diff] [blame] | 1954 | .entropy_o(edn0_edn_req[3]), |
| 1955 | .entropy_i(edn0_edn_rsp[3]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1956 | .idle_o(clkmgr_aon_idle[2]), |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 1957 | .tl_i(kmac_tl_req), |
| 1958 | .tl_o(kmac_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 1959 | |
| 1960 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 1961 | .clk_i (clkmgr_aon_clocks.clk_main_kmac), |
| 1962 | .clk_edn_i (clkmgr_aon_clocks.clk_main_kmac), |
| 1963 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
| 1964 | .rst_edn_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 1555dce | 2020-08-11 11:26:50 -0700 | [diff] [blame] | 1965 | ); |
| 1966 | |
Timothy Chen | f9169fa | 2020-12-04 18:08:45 -0800 | [diff] [blame] | 1967 | keymgr #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 1968 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[19:18]), |
Timothy Chen | f9169fa | 2020-12-04 18:08:45 -0800 | [diff] [blame] | 1969 | .RndCnstLfsrSeed(RndCnstKeymgrLfsrSeed), |
| 1970 | .RndCnstLfsrPerm(RndCnstKeymgrLfsrPerm), |
Timothy Chen | be2da9e | 2021-01-07 18:29:01 -0800 | [diff] [blame] | 1971 | .RndCnstRandPerm(RndCnstKeymgrRandPerm), |
Timothy Chen | f9169fa | 2020-12-04 18:08:45 -0800 | [diff] [blame] | 1972 | .RndCnstRevisionSeed(RndCnstKeymgrRevisionSeed), |
| 1973 | .RndCnstCreatorIdentitySeed(RndCnstKeymgrCreatorIdentitySeed), |
| 1974 | .RndCnstOwnerIntIdentitySeed(RndCnstKeymgrOwnerIntIdentitySeed), |
| 1975 | .RndCnstOwnerIdentitySeed(RndCnstKeymgrOwnerIdentitySeed), |
| 1976 | .RndCnstSoftOutputSeed(RndCnstKeymgrSoftOutputSeed), |
Timothy Chen | 51c8546 | 2020-12-10 16:36:02 -0800 | [diff] [blame] | 1977 | .RndCnstHardOutputSeed(RndCnstKeymgrHardOutputSeed), |
| 1978 | .RndCnstAesSeed(RndCnstKeymgrAesSeed), |
| 1979 | .RndCnstHmacSeed(RndCnstKeymgrHmacSeed), |
| 1980 | .RndCnstKmacSeed(RndCnstKeymgrKmacSeed), |
| 1981 | .RndCnstNoneSeed(RndCnstKeymgrNoneSeed) |
Timothy Chen | f9169fa | 2020-12-04 18:08:45 -0800 | [diff] [blame] | 1982 | ) u_keymgr ( |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 1983 | |
| 1984 | // Interrupt |
| 1985 | .intr_op_done_o (intr_keymgr_op_done), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 1986 | // [18]: fatal_fault_err |
| 1987 | // [19]: recov_operation_err |
| 1988 | .alert_tx_o ( alert_tx[19:18] ), |
| 1989 | .alert_rx_i ( alert_rx[19:18] ), |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 1990 | |
| 1991 | // Inter-module signals |
Timothy Chen | 90b8242 | 2021-02-03 23:45:21 -0800 | [diff] [blame] | 1992 | .edn_o(edn0_edn_req[0]), |
| 1993 | .edn_i(edn0_edn_rsp[0]), |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 1994 | .aes_key_o(), |
| 1995 | .hmac_key_o(), |
Eunchan Kim | e5d33b7 | 2020-11-03 14:34:16 -0800 | [diff] [blame] | 1996 | .kmac_key_o(keymgr_kmac_key), |
Eunchan Kim | 4af433f | 2021-03-25 17:11:41 -0700 | [diff] [blame] | 1997 | .kmac_data_o(kmac_app_req[0]), |
| 1998 | .kmac_data_i(kmac_app_rsp[0]), |
Timothy Chen | 77cc8b9 | 2020-12-05 09:19:14 -0800 | [diff] [blame] | 1999 | .otp_key_i(otp_ctrl_otp_keymgr_key), |
Timothy Chen | 6ace8f3 | 2020-12-14 17:26:56 -0800 | [diff] [blame] | 2000 | .otp_hw_cfg_i(otp_ctrl_otp_hw_cfg), |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 2001 | .flash_i(flash_ctrl_keymgr), |
Michael Schaffner | dc0c1e9 | 2021-03-02 14:41:31 -0800 | [diff] [blame] | 2002 | .lc_keymgr_en_i(lc_ctrl_lc_keymgr_en), |
Timothy Chen | 6ace8f3 | 2020-12-14 17:26:56 -0800 | [diff] [blame] | 2003 | .lc_keymgr_div_i(lc_ctrl_lc_keymgr_div), |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 2004 | .tl_i(keymgr_tl_req), |
| 2005 | .tl_o(keymgr_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2006 | |
| 2007 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2008 | .clk_i (clkmgr_aon_clocks.clk_main_secure), |
| 2009 | .clk_edn_i (clkmgr_aon_clocks.clk_main_secure), |
| 2010 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
| 2011 | .rst_edn_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 2012 | ); |
| 2013 | |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2014 | csrng #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 2015 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[20:20]), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2016 | .SBoxImpl(CsrngSBoxImpl) |
| 2017 | ) u_csrng ( |
| 2018 | |
| 2019 | // Interrupt |
| 2020 | .intr_cs_cmd_req_done_o (intr_csrng_cs_cmd_req_done), |
| 2021 | .intr_cs_entropy_req_o (intr_csrng_cs_entropy_req), |
| 2022 | .intr_cs_hw_inst_exc_o (intr_csrng_cs_hw_inst_exc), |
Mark Branstad | d65d139 | 2021-02-10 13:15:39 -0800 | [diff] [blame] | 2023 | .intr_cs_fatal_err_o (intr_csrng_cs_fatal_err), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 2024 | // [20]: fatal_alert |
| 2025 | .alert_tx_o ( alert_tx[20:20] ), |
| 2026 | .alert_rx_i ( alert_rx[20:20] ), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2027 | |
| 2028 | // Inter-module signals |
| 2029 | .csrng_cmd_i(csrng_csrng_cmd_req), |
| 2030 | .csrng_cmd_o(csrng_csrng_cmd_rsp), |
| 2031 | .entropy_src_hw_if_o(csrng_entropy_src_hw_if_req), |
| 2032 | .entropy_src_hw_if_i(csrng_entropy_src_hw_if_rsp), |
Mark Branstad | de7eba3 | 2021-03-22 14:18:38 -0700 | [diff] [blame] | 2033 | .cs_aes_halt_i(csrng_cs_aes_halt_req), |
| 2034 | .cs_aes_halt_o(csrng_cs_aes_halt_rsp), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2035 | .efuse_sw_app_enable_i('0), |
Mark Branstad | 1c3b160 | 2020-12-11 15:09:10 -0800 | [diff] [blame] | 2036 | .lc_hw_debug_en_i(lc_ctrl_pkg::Off), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2037 | .tl_i(csrng_tl_req), |
| 2038 | .tl_o(csrng_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2039 | |
| 2040 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2041 | .clk_i (clkmgr_aon_clocks.clk_main_secure), |
| 2042 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2043 | ); |
| 2044 | |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 2045 | entropy_src #( |
| 2046 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[22:21]) |
| 2047 | ) u_entropy_src ( |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2048 | |
| 2049 | // Interrupt |
| 2050 | .intr_es_entropy_valid_o (intr_entropy_src_es_entropy_valid), |
| 2051 | .intr_es_health_test_failed_o (intr_entropy_src_es_health_test_failed), |
Mark Branstad | 789ea02 | 2021-02-12 14:35:42 -0800 | [diff] [blame] | 2052 | .intr_es_fatal_err_o (intr_entropy_src_es_fatal_err), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 2053 | // [21]: recov_alert |
| 2054 | // [22]: fatal_alert |
| 2055 | .alert_tx_o ( alert_tx[22:21] ), |
| 2056 | .alert_rx_i ( alert_rx[22:21] ), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2057 | |
| 2058 | // Inter-module signals |
| 2059 | .entropy_src_hw_if_i(csrng_entropy_src_hw_if_req), |
| 2060 | .entropy_src_hw_if_o(csrng_entropy_src_hw_if_rsp), |
Mark Branstad | de7eba3 | 2021-03-22 14:18:38 -0700 | [diff] [blame] | 2061 | .cs_aes_halt_o(csrng_cs_aes_halt_req), |
| 2062 | .cs_aes_halt_i(csrng_cs_aes_halt_rsp), |
Timothy Chen | ea59ad3 | 2021-02-03 17:51:38 -0800 | [diff] [blame] | 2063 | .entropy_src_rng_o(es_rng_req_o), |
| 2064 | .entropy_src_rng_i(es_rng_rsp_i), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2065 | .entropy_src_xht_o(), |
| 2066 | .entropy_src_xht_i(entropy_src_pkg::ENTROPY_SRC_XHT_RSP_DEFAULT), |
| 2067 | .efuse_es_sw_reg_en_i('0), |
Timothy Chen | 5270b7c | 2021-03-17 17:38:30 -0700 | [diff] [blame] | 2068 | .rng_fips_o(es_rng_fips_o), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2069 | .tl_i(entropy_src_tl_req), |
| 2070 | .tl_o(entropy_src_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2071 | |
| 2072 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2073 | .clk_i (clkmgr_aon_clocks.clk_main_secure), |
| 2074 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2075 | ); |
| 2076 | |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 2077 | edn #( |
| 2078 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[23:23]) |
| 2079 | ) u_edn0 ( |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2080 | |
| 2081 | // Interrupt |
| 2082 | .intr_edn_cmd_req_done_o (intr_edn0_edn_cmd_req_done), |
Mark Branstad | 1e7fa2e | 2021-02-18 08:41:37 -0800 | [diff] [blame] | 2083 | .intr_edn_fatal_err_o (intr_edn0_edn_fatal_err), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 2084 | // [23]: fatal_alert |
| 2085 | .alert_tx_o ( alert_tx[23:23] ), |
| 2086 | .alert_rx_i ( alert_rx[23:23] ), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2087 | |
| 2088 | // Inter-module signals |
| 2089 | .csrng_cmd_o(csrng_csrng_cmd_req[0]), |
| 2090 | .csrng_cmd_i(csrng_csrng_cmd_rsp[0]), |
Timothy Chen | 90b8242 | 2021-02-03 23:45:21 -0800 | [diff] [blame] | 2091 | .edn_i(edn0_edn_req), |
| 2092 | .edn_o(edn0_edn_rsp), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2093 | .tl_i(edn0_tl_req), |
| 2094 | .tl_o(edn0_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2095 | |
| 2096 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2097 | .clk_i (clkmgr_aon_clocks.clk_main_secure), |
| 2098 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2099 | ); |
| 2100 | |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 2101 | edn #( |
| 2102 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[24:24]) |
| 2103 | ) u_edn1 ( |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2104 | |
| 2105 | // Interrupt |
| 2106 | .intr_edn_cmd_req_done_o (intr_edn1_edn_cmd_req_done), |
Mark Branstad | 1e7fa2e | 2021-02-18 08:41:37 -0800 | [diff] [blame] | 2107 | .intr_edn_fatal_err_o (intr_edn1_edn_fatal_err), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 2108 | // [24]: fatal_alert |
| 2109 | .alert_tx_o ( alert_tx[24:24] ), |
| 2110 | .alert_rx_i ( alert_rx[24:24] ), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2111 | |
| 2112 | // Inter-module signals |
| 2113 | .csrng_cmd_o(csrng_csrng_cmd_req[1]), |
| 2114 | .csrng_cmd_i(csrng_csrng_cmd_rsp[1]), |
Timothy Chen | 44b404e | 2021-02-05 13:06:01 -0800 | [diff] [blame] | 2115 | .edn_i(edn1_edn_req), |
| 2116 | .edn_o(edn1_edn_rsp), |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2117 | .tl_i(edn1_tl_req), |
| 2118 | .tl_o(edn1_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2119 | |
| 2120 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2121 | .clk_i (clkmgr_aon_clocks.clk_main_secure), |
| 2122 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2123 | ); |
| 2124 | |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2125 | sram_ctrl #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 2126 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[26:25]), |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2127 | .RndCnstSramKey(RndCnstSramCtrlMainSramKey), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 2128 | .RndCnstSramNonce(RndCnstSramCtrlMainSramNonce), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 2129 | .RndCnstSramLfsrPerm(RndCnstSramCtrlMainSramLfsrPerm), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 2130 | .InstrExec(SramCtrlMainInstrExec) |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2131 | ) u_sram_ctrl_main ( |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 2132 | // [25]: fatal_intg_error |
| 2133 | // [26]: fatal_parity_error |
| 2134 | .alert_tx_o ( alert_tx[26:25] ), |
| 2135 | .alert_rx_i ( alert_rx[26:25] ), |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2136 | |
| 2137 | // Inter-module signals |
| 2138 | .sram_otp_key_o(otp_ctrl_sram_otp_key_req[0]), |
| 2139 | .sram_otp_key_i(otp_ctrl_sram_otp_key_rsp[0]), |
| 2140 | .sram_scr_o(sram_ctrl_main_sram_scr_req), |
| 2141 | .sram_scr_i(sram_ctrl_main_sram_scr_rsp), |
Timothy Chen | 95d23d9 | 2021-03-11 17:44:59 -0800 | [diff] [blame] | 2142 | .sram_scr_init_o(sram_ctrl_main_sram_scr_init_req), |
| 2143 | .sram_scr_init_i(sram_ctrl_main_sram_scr_init_rsp), |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2144 | .lc_escalate_en_i(lc_ctrl_lc_escalate_en), |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 2145 | .lc_hw_debug_en_i(lc_ctrl_lc_hw_debug_en), |
| 2146 | .otp_hw_cfg_i(otp_ctrl_otp_hw_cfg), |
| 2147 | .en_ifetch_o(sram_ctrl_main_en_ifetch), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 2148 | .intg_error_i(ram_main_intg_error), |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2149 | .tl_i(sram_ctrl_main_tl_req), |
| 2150 | .tl_o(sram_ctrl_main_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2151 | |
| 2152 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2153 | .clk_i (clkmgr_aon_clocks.clk_main_secure), |
| 2154 | .clk_otp_i (clkmgr_aon_clocks.clk_io_div4_secure), |
| 2155 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
| 2156 | .rst_otp_ni (rstmgr_aon_resets.rst_lc_io_div4_n[rstmgr_pkg::Domain0Sel]) |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2157 | ); |
| 2158 | |
Pirmin Vogel | 69b55a8 | 2020-10-01 09:54:39 +0200 | [diff] [blame] | 2159 | otbn #( |
Michael Schaffner | 4ac0a9d | 2021-03-12 14:45:32 -0800 | [diff] [blame] | 2160 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[28:27]), |
Pirmin Vogel | 69b55a8 | 2020-10-01 09:54:39 +0200 | [diff] [blame] | 2161 | .RegFile(OtbnRegFile) |
| 2162 | ) u_otbn ( |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 2163 | |
| 2164 | // Interrupt |
| 2165 | .intr_done_o (intr_otbn_done), |
Timothy Chen | 12cce14 | 2021-03-02 18:11:01 -0800 | [diff] [blame] | 2166 | // [27]: fatal |
| 2167 | // [28]: recov |
| 2168 | .alert_tx_o ( alert_tx[28:27] ), |
| 2169 | .alert_rx_i ( alert_rx[28:27] ), |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 2170 | |
| 2171 | // Inter-module signals |
Greg Chadwick | cc0dd2a | 2021-03-10 15:55:58 +0000 | [diff] [blame] | 2172 | .edn_rnd_o(edn1_edn_req[0]), |
| 2173 | .edn_rnd_i(edn1_edn_rsp[0]), |
| 2174 | .edn_urnd_o(edn0_edn_req[6]), |
| 2175 | .edn_urnd_i(edn0_edn_rsp[6]), |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2176 | .idle_o(clkmgr_aon_idle[3]), |
Timothy Chen | 685d649 | 2021-03-09 21:28:39 -0800 | [diff] [blame] | 2177 | .ram_cfg_i(ast_ram_1p_cfg), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2178 | .tl_i(otbn_tl_req), |
| 2179 | .tl_o(otbn_tl_rsp), |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2180 | |
| 2181 | // Clock and reset connections |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2182 | .clk_i (clkmgr_aon_clocks.clk_main_otbn), |
Greg Chadwick | c62e57b | 2021-02-18 11:30:06 +0000 | [diff] [blame] | 2183 | .clk_edn_i (clkmgr_aon_clocks.clk_main_otbn), |
| 2184 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
| 2185 | .rst_edn_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 2186 | ); |
| 2187 | |
Rupert Swarbrick | 9855d4b | 2020-12-02 08:41:35 +0000 | [diff] [blame] | 2188 | rom_ctrl #( |
| 2189 | .AlertAsyncOn(alert_handler_reg_pkg::AsyncOn[29:29]), |
| 2190 | .BootRomInitFile(RomCtrlBootRomInitFile) |
| 2191 | ) u_rom_ctrl ( |
| 2192 | // [29]: fatal |
| 2193 | .alert_tx_o ( alert_tx[29:29] ), |
| 2194 | .alert_rx_i ( alert_rx[29:29] ), |
| 2195 | |
| 2196 | // Inter-module signals |
| 2197 | .rom_cfg_i(ast_rom_cfg), |
| 2198 | .regs_tl_i(rom_ctrl_regs_tl_req), |
| 2199 | .regs_tl_o(rom_ctrl_regs_tl_rsp), |
| 2200 | .rom_tl_i(rom_ctrl_rom_tl_req), |
| 2201 | .rom_tl_o(rom_ctrl_rom_tl_rsp), |
| 2202 | |
| 2203 | // Clock and reset connections |
| 2204 | .clk_i (clkmgr_aon_clocks.clk_main_infra), |
| 2205 | .rst_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]) |
| 2206 | ); |
| 2207 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 2208 | // interrupt assignments |
| 2209 | assign intr_vector = { |
Timothy Chen | aad796e | 2021-03-24 17:21:33 -0700 | [diff] [blame] | 2210 | intr_otbn_done, // ID 146 |
| 2211 | intr_edn1_edn_fatal_err, // ID 145 |
| 2212 | intr_edn1_edn_cmd_req_done, // ID 144 |
| 2213 | intr_edn0_edn_fatal_err, // ID 143 |
| 2214 | intr_edn0_edn_cmd_req_done, // ID 142 |
| 2215 | intr_entropy_src_es_fatal_err, // ID 141 |
| 2216 | intr_entropy_src_es_health_test_failed, // ID 140 |
| 2217 | intr_entropy_src_es_entropy_valid, // ID 139 |
| 2218 | intr_csrng_cs_fatal_err, // ID 138 |
| 2219 | intr_csrng_cs_hw_inst_exc, // ID 137 |
| 2220 | intr_csrng_cs_entropy_req, // ID 136 |
| 2221 | intr_csrng_cs_cmd_req_done, // ID 135 |
| 2222 | intr_keymgr_op_done, // ID 134 |
| 2223 | intr_kmac_kmac_err, // ID 133 |
| 2224 | intr_kmac_fifo_empty, // ID 132 |
| 2225 | intr_kmac_kmac_done, // ID 131 |
| 2226 | intr_hmac_hmac_err, // ID 130 |
| 2227 | intr_hmac_fifo_empty, // ID 129 |
| 2228 | intr_hmac_hmac_done, // ID 128 |
| 2229 | intr_flash_ctrl_err, // ID 127 |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 2230 | intr_flash_ctrl_op_done, // ID 126 |
| 2231 | intr_flash_ctrl_rd_lvl, // ID 125 |
| 2232 | intr_flash_ctrl_rd_full, // ID 124 |
| 2233 | intr_flash_ctrl_prog_lvl, // ID 123 |
| 2234 | intr_flash_ctrl_prog_empty, // ID 122 |
| 2235 | intr_aon_timer_aon_wdog_timer_bark, // ID 121 |
| 2236 | intr_aon_timer_aon_wkup_timer_expired, // ID 120 |
| 2237 | intr_adc_ctrl_aon_debug_cable, // ID 119 |
Rupert Swarbrick | 13cdb23 | 2021-03-09 15:34:53 +0000 | [diff] [blame] | 2238 | intr_pwrmgr_aon_wakeup, // ID 118 |
| 2239 | intr_alert_handler_classd, // ID 117 |
| 2240 | intr_alert_handler_classc, // ID 116 |
| 2241 | intr_alert_handler_classb, // ID 115 |
| 2242 | intr_alert_handler_classa, // ID 114 |
| 2243 | intr_otp_ctrl_otp_error, // ID 113 |
| 2244 | intr_otp_ctrl_otp_operation_done, // ID 112 |
| 2245 | intr_usbdev_link_out_err, // ID 111 |
| 2246 | intr_usbdev_connected, // ID 110 |
| 2247 | intr_usbdev_frame, // ID 109 |
| 2248 | intr_usbdev_rx_bitstuff_err, // ID 108 |
| 2249 | intr_usbdev_rx_pid_err, // ID 107 |
| 2250 | intr_usbdev_rx_crc_err, // ID 106 |
| 2251 | intr_usbdev_link_in_err, // ID 105 |
| 2252 | intr_usbdev_av_overflow, // ID 104 |
| 2253 | intr_usbdev_rx_full, // ID 103 |
| 2254 | intr_usbdev_av_empty, // ID 102 |
| 2255 | intr_usbdev_link_resume, // ID 101 |
| 2256 | intr_usbdev_link_suspend, // ID 100 |
| 2257 | intr_usbdev_link_reset, // ID 99 |
| 2258 | intr_usbdev_host_lost, // ID 98 |
| 2259 | intr_usbdev_disconnected, // ID 97 |
| 2260 | intr_usbdev_pkt_sent, // ID 96 |
| 2261 | intr_usbdev_pkt_received, // ID 95 |
| 2262 | intr_rv_timer_timer_expired_0_0, // ID 94 |
| 2263 | intr_pattgen_done_ch1, // ID 93 |
| 2264 | intr_pattgen_done_ch0, // ID 92 |
| 2265 | intr_i2c2_host_timeout, // ID 91 |
| 2266 | intr_i2c2_ack_stop, // ID 90 |
| 2267 | intr_i2c2_acq_overflow, // ID 89 |
| 2268 | intr_i2c2_tx_overflow, // ID 88 |
| 2269 | intr_i2c2_tx_nonempty, // ID 87 |
| 2270 | intr_i2c2_tx_empty, // ID 86 |
| 2271 | intr_i2c2_trans_complete, // ID 85 |
| 2272 | intr_i2c2_sda_unstable, // ID 84 |
| 2273 | intr_i2c2_stretch_timeout, // ID 83 |
| 2274 | intr_i2c2_sda_interference, // ID 82 |
| 2275 | intr_i2c2_scl_interference, // ID 81 |
| 2276 | intr_i2c2_nak, // ID 80 |
| 2277 | intr_i2c2_rx_overflow, // ID 79 |
| 2278 | intr_i2c2_fmt_overflow, // ID 78 |
| 2279 | intr_i2c2_rx_watermark, // ID 77 |
| 2280 | intr_i2c2_fmt_watermark, // ID 76 |
| 2281 | intr_i2c1_host_timeout, // ID 75 |
| 2282 | intr_i2c1_ack_stop, // ID 74 |
| 2283 | intr_i2c1_acq_overflow, // ID 73 |
| 2284 | intr_i2c1_tx_overflow, // ID 72 |
| 2285 | intr_i2c1_tx_nonempty, // ID 71 |
| 2286 | intr_i2c1_tx_empty, // ID 70 |
| 2287 | intr_i2c1_trans_complete, // ID 69 |
| 2288 | intr_i2c1_sda_unstable, // ID 68 |
| 2289 | intr_i2c1_stretch_timeout, // ID 67 |
| 2290 | intr_i2c1_sda_interference, // ID 66 |
| 2291 | intr_i2c1_scl_interference, // ID 65 |
| 2292 | intr_i2c1_nak, // ID 64 |
| 2293 | intr_i2c1_rx_overflow, // ID 63 |
| 2294 | intr_i2c1_fmt_overflow, // ID 62 |
| 2295 | intr_i2c1_rx_watermark, // ID 61 |
| 2296 | intr_i2c1_fmt_watermark, // ID 60 |
| 2297 | intr_i2c0_host_timeout, // ID 59 |
| 2298 | intr_i2c0_ack_stop, // ID 58 |
| 2299 | intr_i2c0_acq_overflow, // ID 57 |
| 2300 | intr_i2c0_tx_overflow, // ID 56 |
| 2301 | intr_i2c0_tx_nonempty, // ID 55 |
| 2302 | intr_i2c0_tx_empty, // ID 54 |
| 2303 | intr_i2c0_trans_complete, // ID 53 |
| 2304 | intr_i2c0_sda_unstable, // ID 52 |
| 2305 | intr_i2c0_stretch_timeout, // ID 51 |
| 2306 | intr_i2c0_sda_interference, // ID 50 |
| 2307 | intr_i2c0_scl_interference, // ID 49 |
| 2308 | intr_i2c0_nak, // ID 48 |
| 2309 | intr_i2c0_rx_overflow, // ID 47 |
| 2310 | intr_i2c0_fmt_overflow, // ID 46 |
| 2311 | intr_i2c0_rx_watermark, // ID 45 |
| 2312 | intr_i2c0_fmt_watermark, // ID 44 |
| 2313 | intr_spi_host1_spi_event, // ID 43 |
| 2314 | intr_spi_host1_error, // ID 42 |
| 2315 | intr_spi_host0_spi_event, // ID 41 |
| 2316 | intr_spi_host0_error, // ID 40 |
Michael Schaffner | b5b8eba | 2021-02-09 20:07:04 -0800 | [diff] [blame] | 2317 | intr_spi_device_txunderflow, // ID 39 |
| 2318 | intr_spi_device_rxoverflow, // ID 38 |
| 2319 | intr_spi_device_rxerr, // ID 37 |
| 2320 | intr_spi_device_txlvl, // ID 36 |
| 2321 | intr_spi_device_rxlvl, // ID 35 |
| 2322 | intr_spi_device_rxf, // ID 34 |
| 2323 | intr_gpio_gpio, // ID 33 |
| 2324 | intr_uart3_rx_parity_err, // ID 32 |
| 2325 | intr_uart3_rx_timeout, // ID 31 |
| 2326 | intr_uart3_rx_break_err, // ID 30 |
| 2327 | intr_uart3_rx_frame_err, // ID 29 |
| 2328 | intr_uart3_rx_overflow, // ID 28 |
| 2329 | intr_uart3_tx_empty, // ID 27 |
| 2330 | intr_uart3_rx_watermark, // ID 26 |
| 2331 | intr_uart3_tx_watermark, // ID 25 |
| 2332 | intr_uart2_rx_parity_err, // ID 24 |
| 2333 | intr_uart2_rx_timeout, // ID 23 |
| 2334 | intr_uart2_rx_break_err, // ID 22 |
| 2335 | intr_uart2_rx_frame_err, // ID 21 |
| 2336 | intr_uart2_rx_overflow, // ID 20 |
| 2337 | intr_uart2_tx_empty, // ID 19 |
| 2338 | intr_uart2_rx_watermark, // ID 18 |
| 2339 | intr_uart2_tx_watermark, // ID 17 |
| 2340 | intr_uart1_rx_parity_err, // ID 16 |
| 2341 | intr_uart1_rx_timeout, // ID 15 |
| 2342 | intr_uart1_rx_break_err, // ID 14 |
| 2343 | intr_uart1_rx_frame_err, // ID 13 |
| 2344 | intr_uart1_rx_overflow, // ID 12 |
| 2345 | intr_uart1_tx_empty, // ID 11 |
| 2346 | intr_uart1_rx_watermark, // ID 10 |
| 2347 | intr_uart1_tx_watermark, // ID 9 |
| 2348 | intr_uart0_rx_parity_err, // ID 8 |
| 2349 | intr_uart0_rx_timeout, // ID 7 |
| 2350 | intr_uart0_rx_break_err, // ID 6 |
| 2351 | intr_uart0_rx_frame_err, // ID 5 |
| 2352 | intr_uart0_rx_overflow, // ID 4 |
| 2353 | intr_uart0_tx_empty, // ID 3 |
| 2354 | intr_uart0_rx_watermark, // ID 2 |
| 2355 | intr_uart0_tx_watermark, // ID 1 |
| 2356 | 1'b 0 // ID 0 is a special case and tied to zero. |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 2357 | }; |
| 2358 | |
| 2359 | // TL-UL Crossbar |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 2360 | xbar_main u_xbar_main ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2361 | .clk_main_i (clkmgr_aon_clocks.clk_main_infra), |
| 2362 | .clk_fixed_i (clkmgr_aon_clocks.clk_io_div4_infra), |
| 2363 | .rst_main_ni (rstmgr_aon_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]), |
| 2364 | .rst_fixed_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2365 | |
| 2366 | // port: tl_corei |
| 2367 | .tl_corei_i(main_tl_corei_req), |
| 2368 | .tl_corei_o(main_tl_corei_rsp), |
| 2369 | |
| 2370 | // port: tl_cored |
| 2371 | .tl_cored_i(main_tl_cored_req), |
| 2372 | .tl_cored_o(main_tl_cored_rsp), |
| 2373 | |
| 2374 | // port: tl_dm_sba |
| 2375 | .tl_dm_sba_i(main_tl_dm_sba_req), |
| 2376 | .tl_dm_sba_o(main_tl_dm_sba_rsp), |
| 2377 | |
Rupert Swarbrick | 9855d4b | 2020-12-02 08:41:35 +0000 | [diff] [blame] | 2378 | // port: tl_rom_ctrl__rom |
| 2379 | .tl_rom_ctrl__rom_o(rom_ctrl_rom_tl_req), |
| 2380 | .tl_rom_ctrl__rom_i(rom_ctrl_rom_tl_rsp), |
| 2381 | |
| 2382 | // port: tl_rom_ctrl__regs |
| 2383 | .tl_rom_ctrl__regs_o(rom_ctrl_regs_tl_req), |
| 2384 | .tl_rom_ctrl__regs_i(rom_ctrl_regs_tl_rsp), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2385 | |
| 2386 | // port: tl_debug_mem |
| 2387 | .tl_debug_mem_o(main_tl_debug_mem_req), |
| 2388 | .tl_debug_mem_i(main_tl_debug_mem_rsp), |
| 2389 | |
| 2390 | // port: tl_ram_main |
| 2391 | .tl_ram_main_o(ram_main_tl_req), |
| 2392 | .tl_ram_main_i(ram_main_tl_rsp), |
| 2393 | |
| 2394 | // port: tl_eflash |
| 2395 | .tl_eflash_o(eflash_tl_req), |
| 2396 | .tl_eflash_i(eflash_tl_rsp), |
| 2397 | |
| 2398 | // port: tl_peri |
| 2399 | .tl_peri_o(main_tl_peri_req), |
| 2400 | .tl_peri_i(main_tl_peri_rsp), |
| 2401 | |
Timothy Chen | 76eb883 | 2021-03-25 16:49:58 -0700 | [diff] [blame] | 2402 | // port: tl_flash_ctrl__core |
| 2403 | .tl_flash_ctrl__core_o(flash_ctrl_core_tl_req), |
| 2404 | .tl_flash_ctrl__core_i(flash_ctrl_core_tl_rsp), |
| 2405 | |
| 2406 | // port: tl_flash_ctrl__prim |
| 2407 | .tl_flash_ctrl__prim_o(flash_ctrl_prim_tl_req), |
| 2408 | .tl_flash_ctrl__prim_i(flash_ctrl_prim_tl_rsp), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2409 | |
| 2410 | // port: tl_hmac |
| 2411 | .tl_hmac_o(hmac_tl_req), |
| 2412 | .tl_hmac_i(hmac_tl_rsp), |
| 2413 | |
Eunchan Kim | e5d33b7 | 2020-11-03 14:34:16 -0800 | [diff] [blame] | 2414 | // port: tl_kmac |
| 2415 | .tl_kmac_o(kmac_tl_req), |
| 2416 | .tl_kmac_i(kmac_tl_rsp), |
| 2417 | |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2418 | // port: tl_aes |
| 2419 | .tl_aes_o(aes_tl_req), |
| 2420 | .tl_aes_i(aes_tl_rsp), |
| 2421 | |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 2422 | // port: tl_entropy_src |
| 2423 | .tl_entropy_src_o(entropy_src_tl_req), |
| 2424 | .tl_entropy_src_i(entropy_src_tl_rsp), |
| 2425 | |
| 2426 | // port: tl_csrng |
| 2427 | .tl_csrng_o(csrng_tl_req), |
| 2428 | .tl_csrng_i(csrng_tl_rsp), |
| 2429 | |
| 2430 | // port: tl_edn0 |
| 2431 | .tl_edn0_o(edn0_tl_req), |
| 2432 | .tl_edn0_i(edn0_tl_rsp), |
| 2433 | |
| 2434 | // port: tl_edn1 |
| 2435 | .tl_edn1_o(edn1_tl_req), |
| 2436 | .tl_edn1_i(edn1_tl_rsp), |
| 2437 | |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2438 | // port: tl_rv_plic |
| 2439 | .tl_rv_plic_o(rv_plic_tl_req), |
| 2440 | .tl_rv_plic_i(rv_plic_tl_rsp), |
| 2441 | |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2442 | // port: tl_otbn |
| 2443 | .tl_otbn_o(otbn_tl_req), |
| 2444 | .tl_otbn_i(otbn_tl_rsp), |
| 2445 | |
Timothy Chen | 9495372 | 2020-09-18 16:15:12 -0700 | [diff] [blame] | 2446 | // port: tl_keymgr |
| 2447 | .tl_keymgr_o(keymgr_tl_req), |
| 2448 | .tl_keymgr_i(keymgr_tl_rsp), |
| 2449 | |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2450 | // port: tl_sram_ctrl_main |
| 2451 | .tl_sram_ctrl_main_o(sram_ctrl_main_tl_req), |
| 2452 | .tl_sram_ctrl_main_i(sram_ctrl_main_tl_rsp), |
| 2453 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 2454 | |
| 2455 | .scanmode_i |
| 2456 | ); |
Eunchan Kim | 55d7ae8 | 2019-12-19 17:08:35 -0800 | [diff] [blame] | 2457 | xbar_peri u_xbar_peri ( |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2458 | .clk_peri_i (clkmgr_aon_clocks.clk_io_div4_infra), |
| 2459 | .rst_peri_ni (rstmgr_aon_resets.rst_sys_io_div4_n[rstmgr_pkg::Domain0Sel]), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2460 | |
| 2461 | // port: tl_main |
| 2462 | .tl_main_i(main_tl_peri_req), |
| 2463 | .tl_main_o(main_tl_peri_rsp), |
| 2464 | |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 2465 | // port: tl_uart0 |
| 2466 | .tl_uart0_o(uart0_tl_req), |
| 2467 | .tl_uart0_i(uart0_tl_rsp), |
| 2468 | |
| 2469 | // port: tl_uart1 |
| 2470 | .tl_uart1_o(uart1_tl_req), |
| 2471 | .tl_uart1_i(uart1_tl_rsp), |
| 2472 | |
| 2473 | // port: tl_uart2 |
| 2474 | .tl_uart2_o(uart2_tl_req), |
| 2475 | .tl_uart2_i(uart2_tl_rsp), |
| 2476 | |
| 2477 | // port: tl_uart3 |
| 2478 | .tl_uart3_o(uart3_tl_req), |
| 2479 | .tl_uart3_i(uart3_tl_rsp), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2480 | |
Timothy Chen | 469a303 | 2021-02-01 15:44:09 -0800 | [diff] [blame] | 2481 | // port: tl_i2c0 |
| 2482 | .tl_i2c0_o(i2c0_tl_req), |
| 2483 | .tl_i2c0_i(i2c0_tl_rsp), |
| 2484 | |
| 2485 | // port: tl_i2c1 |
| 2486 | .tl_i2c1_o(i2c1_tl_req), |
| 2487 | .tl_i2c1_i(i2c1_tl_rsp), |
| 2488 | |
| 2489 | // port: tl_i2c2 |
| 2490 | .tl_i2c2_o(i2c2_tl_req), |
| 2491 | .tl_i2c2_i(i2c2_tl_rsp), |
| 2492 | |
| 2493 | // port: tl_pattgen |
| 2494 | .tl_pattgen_o(pattgen_tl_req), |
| 2495 | .tl_pattgen_i(pattgen_tl_rsp), |
| 2496 | |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2497 | // port: tl_gpio |
| 2498 | .tl_gpio_o(gpio_tl_req), |
| 2499 | .tl_gpio_i(gpio_tl_rsp), |
| 2500 | |
| 2501 | // port: tl_spi_device |
| 2502 | .tl_spi_device_o(spi_device_tl_req), |
| 2503 | .tl_spi_device_i(spi_device_tl_rsp), |
| 2504 | |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 2505 | // port: tl_spi_host0 |
| 2506 | .tl_spi_host0_o(spi_host0_tl_req), |
| 2507 | .tl_spi_host0_i(spi_host0_tl_rsp), |
| 2508 | |
| 2509 | // port: tl_spi_host1 |
| 2510 | .tl_spi_host1_o(spi_host1_tl_req), |
| 2511 | .tl_spi_host1_i(spi_host1_tl_rsp), |
| 2512 | |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2513 | // port: tl_rv_timer |
| 2514 | .tl_rv_timer_o(rv_timer_tl_req), |
| 2515 | .tl_rv_timer_i(rv_timer_tl_rsp), |
| 2516 | |
| 2517 | // port: tl_usbdev |
| 2518 | .tl_usbdev_o(usbdev_tl_req), |
| 2519 | .tl_usbdev_i(usbdev_tl_rsp), |
| 2520 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2521 | // port: tl_pwrmgr_aon |
| 2522 | .tl_pwrmgr_aon_o(pwrmgr_aon_tl_req), |
| 2523 | .tl_pwrmgr_aon_i(pwrmgr_aon_tl_rsp), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2524 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2525 | // port: tl_rstmgr_aon |
| 2526 | .tl_rstmgr_aon_o(rstmgr_aon_tl_req), |
| 2527 | .tl_rstmgr_aon_i(rstmgr_aon_tl_rsp), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2528 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2529 | // port: tl_clkmgr_aon |
| 2530 | .tl_clkmgr_aon_o(clkmgr_aon_tl_req), |
| 2531 | .tl_clkmgr_aon_i(clkmgr_aon_tl_rsp), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2532 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2533 | // port: tl_pinmux_aon |
| 2534 | .tl_pinmux_aon_o(pinmux_aon_tl_req), |
| 2535 | .tl_pinmux_aon_i(pinmux_aon_tl_rsp), |
| 2536 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2537 | // port: tl_ram_ret_aon |
| 2538 | .tl_ram_ret_aon_o(ram_ret_aon_tl_req), |
| 2539 | .tl_ram_ret_aon_i(ram_ret_aon_tl_rsp), |
Eunchan Kim | 0f54954 | 2020-08-04 10:40:11 -0700 | [diff] [blame] | 2540 | |
Michael Schaffner | a304560 | 2020-10-06 19:19:46 -0700 | [diff] [blame] | 2541 | // port: tl_otp_ctrl |
| 2542 | .tl_otp_ctrl_o(otp_ctrl_tl_req), |
| 2543 | .tl_otp_ctrl_i(otp_ctrl_tl_rsp), |
| 2544 | |
Michael Schaffner | 6d3d6a0 | 2020-12-11 13:52:51 -0800 | [diff] [blame] | 2545 | // port: tl_lc_ctrl |
| 2546 | .tl_lc_ctrl_o(lc_ctrl_tl_req), |
| 2547 | .tl_lc_ctrl_i(lc_ctrl_tl_rsp), |
| 2548 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2549 | // port: tl_sensor_ctrl_aon |
| 2550 | .tl_sensor_ctrl_aon_o(sensor_ctrl_aon_tl_req), |
| 2551 | .tl_sensor_ctrl_aon_i(sensor_ctrl_aon_tl_rsp), |
Timothy Chen | 1555dce | 2020-08-11 11:26:50 -0700 | [diff] [blame] | 2552 | |
Michael Schaffner | d1fc7d1 | 2020-12-21 12:52:23 -0800 | [diff] [blame] | 2553 | // port: tl_alert_handler |
| 2554 | .tl_alert_handler_o(alert_handler_tl_req), |
| 2555 | .tl_alert_handler_i(alert_handler_tl_rsp), |
| 2556 | |
Timothy Chen | 8aeeb49 | 2021-02-01 21:25:17 -0800 | [diff] [blame] | 2557 | // port: tl_sram_ctrl_ret_aon |
| 2558 | .tl_sram_ctrl_ret_aon_o(sram_ctrl_ret_aon_tl_req), |
| 2559 | .tl_sram_ctrl_ret_aon_i(sram_ctrl_ret_aon_tl_rsp), |
Michael Schaffner | 9da4db8 | 2020-12-21 15:35:24 -0800 | [diff] [blame] | 2560 | |
Timothy Chen | 2b8ef76 | 2021-02-16 14:44:55 -0800 | [diff] [blame] | 2561 | // port: tl_aon_timer_aon |
| 2562 | .tl_aon_timer_aon_o(aon_timer_aon_tl_req), |
| 2563 | .tl_aon_timer_aon_i(aon_timer_aon_tl_rsp), |
Michael Schaffner | d1fc7d1 | 2020-12-21 12:52:23 -0800 | [diff] [blame] | 2564 | |
Timothy Chen | 6f98f35 | 2021-03-10 16:27:29 -0800 | [diff] [blame] | 2565 | // port: tl_adc_ctrl_aon |
| 2566 | .tl_adc_ctrl_aon_o(adc_ctrl_aon_tl_req), |
| 2567 | .tl_adc_ctrl_aon_i(adc_ctrl_aon_tl_rsp), |
| 2568 | |
Timothy Chen | b196687 | 2021-03-01 22:39:01 -0800 | [diff] [blame] | 2569 | // port: tl_ast |
| 2570 | .tl_ast_o(ast_tl_req_o), |
| 2571 | .tl_ast_i(ast_tl_rsp_i), |
Timothy Chen | fb34fe3 | 2020-08-26 17:13:19 -0700 | [diff] [blame] | 2572 | |
Eunchan Kim | 55d7ae8 | 2019-12-19 17:08:35 -0800 | [diff] [blame] | 2573 | |
| 2574 | .scanmode_i |
| 2575 | ); |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 2576 | |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 2577 | // Pinmux connections |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 2578 | // All muxed inputs |
| 2579 | assign cio_gpio_gpio_p2d[0] = mio_p2d[MioInGpioGpio0]; |
| 2580 | assign cio_gpio_gpio_p2d[1] = mio_p2d[MioInGpioGpio1]; |
| 2581 | assign cio_gpio_gpio_p2d[2] = mio_p2d[MioInGpioGpio2]; |
| 2582 | assign cio_gpio_gpio_p2d[3] = mio_p2d[MioInGpioGpio3]; |
| 2583 | assign cio_gpio_gpio_p2d[4] = mio_p2d[MioInGpioGpio4]; |
| 2584 | assign cio_gpio_gpio_p2d[5] = mio_p2d[MioInGpioGpio5]; |
| 2585 | assign cio_gpio_gpio_p2d[6] = mio_p2d[MioInGpioGpio6]; |
| 2586 | assign cio_gpio_gpio_p2d[7] = mio_p2d[MioInGpioGpio7]; |
| 2587 | assign cio_gpio_gpio_p2d[8] = mio_p2d[MioInGpioGpio8]; |
| 2588 | assign cio_gpio_gpio_p2d[9] = mio_p2d[MioInGpioGpio9]; |
| 2589 | assign cio_gpio_gpio_p2d[10] = mio_p2d[MioInGpioGpio10]; |
| 2590 | assign cio_gpio_gpio_p2d[11] = mio_p2d[MioInGpioGpio11]; |
| 2591 | assign cio_gpio_gpio_p2d[12] = mio_p2d[MioInGpioGpio12]; |
| 2592 | assign cio_gpio_gpio_p2d[13] = mio_p2d[MioInGpioGpio13]; |
| 2593 | assign cio_gpio_gpio_p2d[14] = mio_p2d[MioInGpioGpio14]; |
| 2594 | assign cio_gpio_gpio_p2d[15] = mio_p2d[MioInGpioGpio15]; |
| 2595 | assign cio_gpio_gpio_p2d[16] = mio_p2d[MioInGpioGpio16]; |
| 2596 | assign cio_gpio_gpio_p2d[17] = mio_p2d[MioInGpioGpio17]; |
| 2597 | assign cio_gpio_gpio_p2d[18] = mio_p2d[MioInGpioGpio18]; |
| 2598 | assign cio_gpio_gpio_p2d[19] = mio_p2d[MioInGpioGpio19]; |
| 2599 | assign cio_gpio_gpio_p2d[20] = mio_p2d[MioInGpioGpio20]; |
| 2600 | assign cio_gpio_gpio_p2d[21] = mio_p2d[MioInGpioGpio21]; |
| 2601 | assign cio_gpio_gpio_p2d[22] = mio_p2d[MioInGpioGpio22]; |
| 2602 | assign cio_gpio_gpio_p2d[23] = mio_p2d[MioInGpioGpio23]; |
| 2603 | assign cio_gpio_gpio_p2d[24] = mio_p2d[MioInGpioGpio24]; |
| 2604 | assign cio_gpio_gpio_p2d[25] = mio_p2d[MioInGpioGpio25]; |
| 2605 | assign cio_gpio_gpio_p2d[26] = mio_p2d[MioInGpioGpio26]; |
| 2606 | assign cio_gpio_gpio_p2d[27] = mio_p2d[MioInGpioGpio27]; |
| 2607 | assign cio_gpio_gpio_p2d[28] = mio_p2d[MioInGpioGpio28]; |
| 2608 | assign cio_gpio_gpio_p2d[29] = mio_p2d[MioInGpioGpio29]; |
| 2609 | assign cio_gpio_gpio_p2d[30] = mio_p2d[MioInGpioGpio30]; |
| 2610 | assign cio_gpio_gpio_p2d[31] = mio_p2d[MioInGpioGpio31]; |
| 2611 | assign cio_i2c0_sda_p2d = mio_p2d[MioInI2c0Sda]; |
| 2612 | assign cio_i2c0_scl_p2d = mio_p2d[MioInI2c0Scl]; |
| 2613 | assign cio_i2c1_sda_p2d = mio_p2d[MioInI2c1Sda]; |
| 2614 | assign cio_i2c1_scl_p2d = mio_p2d[MioInI2c1Scl]; |
| 2615 | assign cio_i2c2_sda_p2d = mio_p2d[MioInI2c2Sda]; |
| 2616 | assign cio_i2c2_scl_p2d = mio_p2d[MioInI2c2Scl]; |
| 2617 | assign cio_spi_host1_sd_p2d[0] = mio_p2d[MioInSpiHost1Sd0]; |
| 2618 | assign cio_spi_host1_sd_p2d[1] = mio_p2d[MioInSpiHost1Sd1]; |
| 2619 | assign cio_spi_host1_sd_p2d[2] = mio_p2d[MioInSpiHost1Sd2]; |
| 2620 | assign cio_spi_host1_sd_p2d[3] = mio_p2d[MioInSpiHost1Sd3]; |
| 2621 | assign cio_uart0_rx_p2d = mio_p2d[MioInUart0Rx]; |
| 2622 | assign cio_uart1_rx_p2d = mio_p2d[MioInUart1Rx]; |
| 2623 | assign cio_uart2_rx_p2d = mio_p2d[MioInUart2Rx]; |
| 2624 | assign cio_uart3_rx_p2d = mio_p2d[MioInUart3Rx]; |
| 2625 | assign cio_flash_ctrl_tck_p2d = mio_p2d[MioInFlashCtrlTck]; |
| 2626 | assign cio_flash_ctrl_tms_p2d = mio_p2d[MioInFlashCtrlTms]; |
| 2627 | assign cio_flash_ctrl_tdi_p2d = mio_p2d[MioInFlashCtrlTdi]; |
| 2628 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[0] = mio_p2d[MioInSensorCtrlAonAstDebugIn0]; |
| 2629 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[1] = mio_p2d[MioInSensorCtrlAonAstDebugIn1]; |
| 2630 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[2] = mio_p2d[MioInSensorCtrlAonAstDebugIn2]; |
| 2631 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[3] = mio_p2d[MioInSensorCtrlAonAstDebugIn3]; |
| 2632 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[4] = mio_p2d[MioInSensorCtrlAonAstDebugIn4]; |
| 2633 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[5] = mio_p2d[MioInSensorCtrlAonAstDebugIn5]; |
| 2634 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[6] = mio_p2d[MioInSensorCtrlAonAstDebugIn6]; |
| 2635 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[7] = mio_p2d[MioInSensorCtrlAonAstDebugIn7]; |
| 2636 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[8] = mio_p2d[MioInSensorCtrlAonAstDebugIn8]; |
| 2637 | assign cio_sensor_ctrl_aon_ast_debug_in_p2d[9] = mio_p2d[MioInSensorCtrlAonAstDebugIn9]; |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 2638 | |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 2639 | // All muxed outputs |
| 2640 | assign mio_d2p[MioOutGpioGpio0] = cio_gpio_gpio_d2p[0]; |
| 2641 | assign mio_d2p[MioOutGpioGpio1] = cio_gpio_gpio_d2p[1]; |
| 2642 | assign mio_d2p[MioOutGpioGpio2] = cio_gpio_gpio_d2p[2]; |
| 2643 | assign mio_d2p[MioOutGpioGpio3] = cio_gpio_gpio_d2p[3]; |
| 2644 | assign mio_d2p[MioOutGpioGpio4] = cio_gpio_gpio_d2p[4]; |
| 2645 | assign mio_d2p[MioOutGpioGpio5] = cio_gpio_gpio_d2p[5]; |
| 2646 | assign mio_d2p[MioOutGpioGpio6] = cio_gpio_gpio_d2p[6]; |
| 2647 | assign mio_d2p[MioOutGpioGpio7] = cio_gpio_gpio_d2p[7]; |
| 2648 | assign mio_d2p[MioOutGpioGpio8] = cio_gpio_gpio_d2p[8]; |
| 2649 | assign mio_d2p[MioOutGpioGpio9] = cio_gpio_gpio_d2p[9]; |
| 2650 | assign mio_d2p[MioOutGpioGpio10] = cio_gpio_gpio_d2p[10]; |
| 2651 | assign mio_d2p[MioOutGpioGpio11] = cio_gpio_gpio_d2p[11]; |
| 2652 | assign mio_d2p[MioOutGpioGpio12] = cio_gpio_gpio_d2p[12]; |
| 2653 | assign mio_d2p[MioOutGpioGpio13] = cio_gpio_gpio_d2p[13]; |
| 2654 | assign mio_d2p[MioOutGpioGpio14] = cio_gpio_gpio_d2p[14]; |
| 2655 | assign mio_d2p[MioOutGpioGpio15] = cio_gpio_gpio_d2p[15]; |
| 2656 | assign mio_d2p[MioOutGpioGpio16] = cio_gpio_gpio_d2p[16]; |
| 2657 | assign mio_d2p[MioOutGpioGpio17] = cio_gpio_gpio_d2p[17]; |
| 2658 | assign mio_d2p[MioOutGpioGpio18] = cio_gpio_gpio_d2p[18]; |
| 2659 | assign mio_d2p[MioOutGpioGpio19] = cio_gpio_gpio_d2p[19]; |
| 2660 | assign mio_d2p[MioOutGpioGpio20] = cio_gpio_gpio_d2p[20]; |
| 2661 | assign mio_d2p[MioOutGpioGpio21] = cio_gpio_gpio_d2p[21]; |
| 2662 | assign mio_d2p[MioOutGpioGpio22] = cio_gpio_gpio_d2p[22]; |
| 2663 | assign mio_d2p[MioOutGpioGpio23] = cio_gpio_gpio_d2p[23]; |
| 2664 | assign mio_d2p[MioOutGpioGpio24] = cio_gpio_gpio_d2p[24]; |
| 2665 | assign mio_d2p[MioOutGpioGpio25] = cio_gpio_gpio_d2p[25]; |
| 2666 | assign mio_d2p[MioOutGpioGpio26] = cio_gpio_gpio_d2p[26]; |
| 2667 | assign mio_d2p[MioOutGpioGpio27] = cio_gpio_gpio_d2p[27]; |
| 2668 | assign mio_d2p[MioOutGpioGpio28] = cio_gpio_gpio_d2p[28]; |
| 2669 | assign mio_d2p[MioOutGpioGpio29] = cio_gpio_gpio_d2p[29]; |
| 2670 | assign mio_d2p[MioOutGpioGpio30] = cio_gpio_gpio_d2p[30]; |
| 2671 | assign mio_d2p[MioOutGpioGpio31] = cio_gpio_gpio_d2p[31]; |
| 2672 | assign mio_d2p[MioOutI2c0Sda] = cio_i2c0_sda_d2p; |
| 2673 | assign mio_d2p[MioOutI2c0Scl] = cio_i2c0_scl_d2p; |
| 2674 | assign mio_d2p[MioOutI2c1Sda] = cio_i2c1_sda_d2p; |
| 2675 | assign mio_d2p[MioOutI2c1Scl] = cio_i2c1_scl_d2p; |
| 2676 | assign mio_d2p[MioOutI2c2Sda] = cio_i2c2_sda_d2p; |
| 2677 | assign mio_d2p[MioOutI2c2Scl] = cio_i2c2_scl_d2p; |
| 2678 | assign mio_d2p[MioOutSpiHost1Sd0] = cio_spi_host1_sd_d2p[0]; |
| 2679 | assign mio_d2p[MioOutSpiHost1Sd1] = cio_spi_host1_sd_d2p[1]; |
| 2680 | assign mio_d2p[MioOutSpiHost1Sd2] = cio_spi_host1_sd_d2p[2]; |
| 2681 | assign mio_d2p[MioOutSpiHost1Sd3] = cio_spi_host1_sd_d2p[3]; |
| 2682 | assign mio_d2p[MioOutUart0Tx] = cio_uart0_tx_d2p; |
| 2683 | assign mio_d2p[MioOutUart1Tx] = cio_uart1_tx_d2p; |
| 2684 | assign mio_d2p[MioOutUart2Tx] = cio_uart2_tx_d2p; |
| 2685 | assign mio_d2p[MioOutUart3Tx] = cio_uart3_tx_d2p; |
| 2686 | assign mio_d2p[MioOutPattgenPda0Tx] = cio_pattgen_pda0_tx_d2p; |
| 2687 | assign mio_d2p[MioOutPattgenPcl0Tx] = cio_pattgen_pcl0_tx_d2p; |
| 2688 | assign mio_d2p[MioOutPattgenPda1Tx] = cio_pattgen_pda1_tx_d2p; |
| 2689 | assign mio_d2p[MioOutPattgenPcl1Tx] = cio_pattgen_pcl1_tx_d2p; |
| 2690 | assign mio_d2p[MioOutSpiHost1Sck] = cio_spi_host1_sck_d2p; |
| 2691 | assign mio_d2p[MioOutSpiHost1Csb] = cio_spi_host1_csb_d2p; |
| 2692 | assign mio_d2p[MioOutFlashCtrlTdo] = cio_flash_ctrl_tdo_d2p; |
| 2693 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut0] = cio_sensor_ctrl_aon_ast_debug_out_d2p[0]; |
| 2694 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut1] = cio_sensor_ctrl_aon_ast_debug_out_d2p[1]; |
| 2695 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut2] = cio_sensor_ctrl_aon_ast_debug_out_d2p[2]; |
| 2696 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut3] = cio_sensor_ctrl_aon_ast_debug_out_d2p[3]; |
| 2697 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut4] = cio_sensor_ctrl_aon_ast_debug_out_d2p[4]; |
| 2698 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut5] = cio_sensor_ctrl_aon_ast_debug_out_d2p[5]; |
| 2699 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut6] = cio_sensor_ctrl_aon_ast_debug_out_d2p[6]; |
| 2700 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut7] = cio_sensor_ctrl_aon_ast_debug_out_d2p[7]; |
| 2701 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut8] = cio_sensor_ctrl_aon_ast_debug_out_d2p[8]; |
| 2702 | assign mio_d2p[MioOutSensorCtrlAonAstDebugOut9] = cio_sensor_ctrl_aon_ast_debug_out_d2p[9]; |
Michael Schaffner | 920e4cc | 2020-04-28 22:58:12 -0700 | [diff] [blame] | 2703 | |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 2704 | // All muxed output enables |
| 2705 | assign mio_en_d2p[MioOutGpioGpio0] = cio_gpio_gpio_en_d2p[0]; |
| 2706 | assign mio_en_d2p[MioOutGpioGpio1] = cio_gpio_gpio_en_d2p[1]; |
| 2707 | assign mio_en_d2p[MioOutGpioGpio2] = cio_gpio_gpio_en_d2p[2]; |
| 2708 | assign mio_en_d2p[MioOutGpioGpio3] = cio_gpio_gpio_en_d2p[3]; |
| 2709 | assign mio_en_d2p[MioOutGpioGpio4] = cio_gpio_gpio_en_d2p[4]; |
| 2710 | assign mio_en_d2p[MioOutGpioGpio5] = cio_gpio_gpio_en_d2p[5]; |
| 2711 | assign mio_en_d2p[MioOutGpioGpio6] = cio_gpio_gpio_en_d2p[6]; |
| 2712 | assign mio_en_d2p[MioOutGpioGpio7] = cio_gpio_gpio_en_d2p[7]; |
| 2713 | assign mio_en_d2p[MioOutGpioGpio8] = cio_gpio_gpio_en_d2p[8]; |
| 2714 | assign mio_en_d2p[MioOutGpioGpio9] = cio_gpio_gpio_en_d2p[9]; |
| 2715 | assign mio_en_d2p[MioOutGpioGpio10] = cio_gpio_gpio_en_d2p[10]; |
| 2716 | assign mio_en_d2p[MioOutGpioGpio11] = cio_gpio_gpio_en_d2p[11]; |
| 2717 | assign mio_en_d2p[MioOutGpioGpio12] = cio_gpio_gpio_en_d2p[12]; |
| 2718 | assign mio_en_d2p[MioOutGpioGpio13] = cio_gpio_gpio_en_d2p[13]; |
| 2719 | assign mio_en_d2p[MioOutGpioGpio14] = cio_gpio_gpio_en_d2p[14]; |
| 2720 | assign mio_en_d2p[MioOutGpioGpio15] = cio_gpio_gpio_en_d2p[15]; |
| 2721 | assign mio_en_d2p[MioOutGpioGpio16] = cio_gpio_gpio_en_d2p[16]; |
| 2722 | assign mio_en_d2p[MioOutGpioGpio17] = cio_gpio_gpio_en_d2p[17]; |
| 2723 | assign mio_en_d2p[MioOutGpioGpio18] = cio_gpio_gpio_en_d2p[18]; |
| 2724 | assign mio_en_d2p[MioOutGpioGpio19] = cio_gpio_gpio_en_d2p[19]; |
| 2725 | assign mio_en_d2p[MioOutGpioGpio20] = cio_gpio_gpio_en_d2p[20]; |
| 2726 | assign mio_en_d2p[MioOutGpioGpio21] = cio_gpio_gpio_en_d2p[21]; |
| 2727 | assign mio_en_d2p[MioOutGpioGpio22] = cio_gpio_gpio_en_d2p[22]; |
| 2728 | assign mio_en_d2p[MioOutGpioGpio23] = cio_gpio_gpio_en_d2p[23]; |
| 2729 | assign mio_en_d2p[MioOutGpioGpio24] = cio_gpio_gpio_en_d2p[24]; |
| 2730 | assign mio_en_d2p[MioOutGpioGpio25] = cio_gpio_gpio_en_d2p[25]; |
| 2731 | assign mio_en_d2p[MioOutGpioGpio26] = cio_gpio_gpio_en_d2p[26]; |
| 2732 | assign mio_en_d2p[MioOutGpioGpio27] = cio_gpio_gpio_en_d2p[27]; |
| 2733 | assign mio_en_d2p[MioOutGpioGpio28] = cio_gpio_gpio_en_d2p[28]; |
| 2734 | assign mio_en_d2p[MioOutGpioGpio29] = cio_gpio_gpio_en_d2p[29]; |
| 2735 | assign mio_en_d2p[MioOutGpioGpio30] = cio_gpio_gpio_en_d2p[30]; |
| 2736 | assign mio_en_d2p[MioOutGpioGpio31] = cio_gpio_gpio_en_d2p[31]; |
| 2737 | assign mio_en_d2p[MioOutI2c0Sda] = cio_i2c0_sda_en_d2p; |
| 2738 | assign mio_en_d2p[MioOutI2c0Scl] = cio_i2c0_scl_en_d2p; |
| 2739 | assign mio_en_d2p[MioOutI2c1Sda] = cio_i2c1_sda_en_d2p; |
| 2740 | assign mio_en_d2p[MioOutI2c1Scl] = cio_i2c1_scl_en_d2p; |
| 2741 | assign mio_en_d2p[MioOutI2c2Sda] = cio_i2c2_sda_en_d2p; |
| 2742 | assign mio_en_d2p[MioOutI2c2Scl] = cio_i2c2_scl_en_d2p; |
| 2743 | assign mio_en_d2p[MioOutSpiHost1Sd0] = cio_spi_host1_sd_en_d2p[0]; |
| 2744 | assign mio_en_d2p[MioOutSpiHost1Sd1] = cio_spi_host1_sd_en_d2p[1]; |
| 2745 | assign mio_en_d2p[MioOutSpiHost1Sd2] = cio_spi_host1_sd_en_d2p[2]; |
| 2746 | assign mio_en_d2p[MioOutSpiHost1Sd3] = cio_spi_host1_sd_en_d2p[3]; |
| 2747 | assign mio_en_d2p[MioOutUart0Tx] = cio_uart0_tx_en_d2p; |
| 2748 | assign mio_en_d2p[MioOutUart1Tx] = cio_uart1_tx_en_d2p; |
| 2749 | assign mio_en_d2p[MioOutUart2Tx] = cio_uart2_tx_en_d2p; |
| 2750 | assign mio_en_d2p[MioOutUart3Tx] = cio_uart3_tx_en_d2p; |
| 2751 | assign mio_en_d2p[MioOutPattgenPda0Tx] = cio_pattgen_pda0_tx_en_d2p; |
| 2752 | assign mio_en_d2p[MioOutPattgenPcl0Tx] = cio_pattgen_pcl0_tx_en_d2p; |
| 2753 | assign mio_en_d2p[MioOutPattgenPda1Tx] = cio_pattgen_pda1_tx_en_d2p; |
| 2754 | assign mio_en_d2p[MioOutPattgenPcl1Tx] = cio_pattgen_pcl1_tx_en_d2p; |
| 2755 | assign mio_en_d2p[MioOutSpiHost1Sck] = cio_spi_host1_sck_en_d2p; |
| 2756 | assign mio_en_d2p[MioOutSpiHost1Csb] = cio_spi_host1_csb_en_d2p; |
| 2757 | assign mio_en_d2p[MioOutFlashCtrlTdo] = cio_flash_ctrl_tdo_en_d2p; |
| 2758 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut0] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[0]; |
| 2759 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut1] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[1]; |
| 2760 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut2] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[2]; |
| 2761 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut3] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[3]; |
| 2762 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut4] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[4]; |
| 2763 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut5] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[5]; |
| 2764 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut6] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[6]; |
| 2765 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut7] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[7]; |
| 2766 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut8] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[8]; |
| 2767 | assign mio_en_d2p[MioOutSensorCtrlAonAstDebugOut9] = cio_sensor_ctrl_aon_ast_debug_out_en_d2p[9]; |
Michael Schaffner | 920e4cc | 2020-04-28 22:58:12 -0700 | [diff] [blame] | 2768 | |
Michael Schaffner | 74c4ff2 | 2021-03-30 15:43:46 -0700 | [diff] [blame^] | 2769 | // All dedicated inputs |
| 2770 | logic [20:0] unused_dio_p2d; |
| 2771 | assign cio_spi_host0_sd_p2d[0] = dio_p2d[DioSpiHost0Sd0]; |
| 2772 | assign cio_spi_host0_sd_p2d[1] = dio_p2d[DioSpiHost0Sd1]; |
| 2773 | assign cio_spi_host0_sd_p2d[2] = dio_p2d[DioSpiHost0Sd2]; |
| 2774 | assign cio_spi_host0_sd_p2d[3] = dio_p2d[DioSpiHost0Sd3]; |
| 2775 | assign cio_spi_device_sd_p2d[0] = dio_p2d[DioSpiDeviceSd0]; |
| 2776 | assign cio_spi_device_sd_p2d[1] = dio_p2d[DioSpiDeviceSd1]; |
| 2777 | assign cio_spi_device_sd_p2d[2] = dio_p2d[DioSpiDeviceSd2]; |
| 2778 | assign cio_spi_device_sd_p2d[3] = dio_p2d[DioSpiDeviceSd3]; |
| 2779 | assign cio_usbdev_d_p2d = dio_p2d[DioUsbdevD]; |
| 2780 | assign cio_usbdev_dp_p2d = dio_p2d[DioUsbdevDp]; |
| 2781 | assign cio_usbdev_dn_p2d = dio_p2d[DioUsbdevDn]; |
| 2782 | assign cio_spi_device_sck_p2d = dio_p2d[DioSpiDeviceSck]; |
| 2783 | assign cio_spi_device_csb_p2d = dio_p2d[DioSpiDeviceCsb]; |
| 2784 | assign cio_usbdev_sense_p2d = dio_p2d[DioUsbdevSense]; |
| 2785 | assign unused_dio_p2d[0] = dio_p2d[DioSpiHost0Sck]; |
| 2786 | assign unused_dio_p2d[1] = dio_p2d[DioSpiHost0Csb]; |
| 2787 | assign unused_dio_p2d[2] = dio_p2d[DioUsbdevSe0]; |
| 2788 | assign unused_dio_p2d[3] = dio_p2d[DioUsbdevDpPullup]; |
| 2789 | assign unused_dio_p2d[4] = dio_p2d[DioUsbdevDnPullup]; |
| 2790 | assign unused_dio_p2d[5] = dio_p2d[DioUsbdevTxModeSe]; |
| 2791 | assign unused_dio_p2d[6] = dio_p2d[DioUsbdevSuspend]; |
| 2792 | |
| 2793 | // All dedicated outputs |
| 2794 | assign dio_d2p[DioSpiHost0Sd0] = cio_spi_host0_sd_d2p[0]; |
| 2795 | assign dio_d2p[DioSpiHost0Sd1] = cio_spi_host0_sd_d2p[1]; |
| 2796 | assign dio_d2p[DioSpiHost0Sd2] = cio_spi_host0_sd_d2p[2]; |
| 2797 | assign dio_d2p[DioSpiHost0Sd3] = cio_spi_host0_sd_d2p[3]; |
| 2798 | assign dio_d2p[DioSpiDeviceSd0] = cio_spi_device_sd_d2p[0]; |
| 2799 | assign dio_d2p[DioSpiDeviceSd1] = cio_spi_device_sd_d2p[1]; |
| 2800 | assign dio_d2p[DioSpiDeviceSd2] = cio_spi_device_sd_d2p[2]; |
| 2801 | assign dio_d2p[DioSpiDeviceSd3] = cio_spi_device_sd_d2p[3]; |
| 2802 | assign dio_d2p[DioUsbdevD] = cio_usbdev_d_d2p; |
| 2803 | assign dio_d2p[DioUsbdevDp] = cio_usbdev_dp_d2p; |
| 2804 | assign dio_d2p[DioUsbdevDn] = cio_usbdev_dn_d2p; |
| 2805 | assign dio_d2p[DioSpiDeviceSck] = 1'b0; |
| 2806 | assign dio_d2p[DioSpiDeviceCsb] = 1'b0; |
| 2807 | assign dio_d2p[DioUsbdevSense] = 1'b0; |
| 2808 | assign dio_d2p[DioSpiHost0Sck] = cio_spi_host0_sck_d2p; |
| 2809 | assign dio_d2p[DioSpiHost0Csb] = cio_spi_host0_csb_d2p; |
| 2810 | assign dio_d2p[DioUsbdevSe0] = cio_usbdev_se0_d2p; |
| 2811 | assign dio_d2p[DioUsbdevDpPullup] = cio_usbdev_dp_pullup_d2p; |
| 2812 | assign dio_d2p[DioUsbdevDnPullup] = cio_usbdev_dn_pullup_d2p; |
| 2813 | assign dio_d2p[DioUsbdevTxModeSe] = cio_usbdev_tx_mode_se_d2p; |
| 2814 | assign dio_d2p[DioUsbdevSuspend] = cio_usbdev_suspend_d2p; |
| 2815 | |
| 2816 | // All dedicated output enables |
| 2817 | assign dio_en_d2p[DioSpiHost0Sd0] = cio_spi_host0_sd_en_d2p[0]; |
| 2818 | assign dio_en_d2p[DioSpiHost0Sd1] = cio_spi_host0_sd_en_d2p[1]; |
| 2819 | assign dio_en_d2p[DioSpiHost0Sd2] = cio_spi_host0_sd_en_d2p[2]; |
| 2820 | assign dio_en_d2p[DioSpiHost0Sd3] = cio_spi_host0_sd_en_d2p[3]; |
| 2821 | assign dio_en_d2p[DioSpiDeviceSd0] = cio_spi_device_sd_en_d2p[0]; |
| 2822 | assign dio_en_d2p[DioSpiDeviceSd1] = cio_spi_device_sd_en_d2p[1]; |
| 2823 | assign dio_en_d2p[DioSpiDeviceSd2] = cio_spi_device_sd_en_d2p[2]; |
| 2824 | assign dio_en_d2p[DioSpiDeviceSd3] = cio_spi_device_sd_en_d2p[3]; |
| 2825 | assign dio_en_d2p[DioUsbdevD] = cio_usbdev_d_en_d2p; |
| 2826 | assign dio_en_d2p[DioUsbdevDp] = cio_usbdev_dp_en_d2p; |
| 2827 | assign dio_en_d2p[DioUsbdevDn] = cio_usbdev_dn_en_d2p; |
| 2828 | assign dio_en_d2p[DioSpiDeviceSck] = 1'b0; |
| 2829 | assign dio_en_d2p[DioSpiDeviceCsb] = 1'b0; |
| 2830 | assign dio_en_d2p[DioUsbdevSense] = 1'b0; |
| 2831 | assign dio_en_d2p[DioSpiHost0Sck] = cio_spi_host0_sck_en_d2p; |
| 2832 | assign dio_en_d2p[DioSpiHost0Csb] = cio_spi_host0_csb_en_d2p; |
| 2833 | assign dio_en_d2p[DioUsbdevSe0] = cio_usbdev_se0_en_d2p; |
| 2834 | assign dio_en_d2p[DioUsbdevDpPullup] = cio_usbdev_dp_pullup_en_d2p; |
| 2835 | assign dio_en_d2p[DioUsbdevDnPullup] = cio_usbdev_dn_pullup_en_d2p; |
| 2836 | assign dio_en_d2p[DioUsbdevTxModeSe] = cio_usbdev_tx_mode_se_en_d2p; |
| 2837 | assign dio_en_d2p[DioUsbdevSuspend] = cio_usbdev_suspend_en_d2p; |
| 2838 | |
Eunchan Kim | 769065e | 2019-10-29 17:29:26 -0700 | [diff] [blame] | 2839 | |
Nils Graf | 78607aa | 2019-09-16 15:47:23 -0700 | [diff] [blame] | 2840 | // make sure scanmode_i is never X (including during reset) |
Eunchan Kim | 5511bbe | 2020-08-07 14:04:20 -0700 | [diff] [blame] | 2841 | `ASSERT_KNOWN(scanmodeKnown, scanmode_i, clk_main_i, 0) |
Nils Graf | 78607aa | 2019-09-16 15:47:23 -0700 | [diff] [blame] | 2842 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 2843 | endmodule |