Skip to content

Commit

Permalink
FIXUP Patch Ibex
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Kurth <[email protected]>
  • Loading branch information
andreaskurth committed Dec 20, 2024
1 parent bcfd24b commit 214646c
Show file tree
Hide file tree
Showing 14 changed files with 985 additions and 226 deletions.
25 changes: 24 additions & 1 deletion hw/ip/rv_core_ibex/data/rv_core_ibex.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,34 @@

{ struct: "ram_1p_cfg",
type: "uni",
name: "ram_cfg",
name: "ram_cfg_icache_tag",
act: "rcv",
package: "prim_ram_1p_pkg",
},

{ struct: "ram_1p_cfg_rsp",
type: "uni",
name: "ram_cfg_rsp_icache_tag",
width: "ibex_pkg::IC_NUM_WAYS",
act: "req",
package: "prim_ram_1p_pkg",
},

{ struct: "ram_1p_cfg",
type: "uni",
name: "ram_cfg_icache_data",
act: "rcv",
package: "prim_ram_1p_pkg",
},

{ struct: "ram_1p_cfg_rsp",
type: "uni",
name: "ram_cfg_rsp_icache_data",
width: "ibex_pkg::IC_NUM_WAYS",
act: "req",
package: "prim_ram_1p_pkg",
},

{ struct: "logic",
type: "uni",
name: "hart_id",
Expand Down
49 changes: 26 additions & 23 deletions hw/ip/rv_core_ibex/doc/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,32 @@ Referring to the [Comportable guideline for peripheral device functionality](htt

## [Inter-Module Signals](https://opentitan.org/book/doc/contributing/hw/comportability/index.html#inter-signal-handling)

| Port Name | Package::Struct | Type | Act | Width | Description |
|:---------------|:---------------------------------|:--------|:------|--------:|:--------------|
| rst_cpu_n | logic | uni | req | 1 | |
| ram_cfg | prim_ram_1p_pkg::ram_1p_cfg | uni | rcv | 1 | |
| hart_id | logic | uni | rcv | 32 | |
| boot_addr | logic | uni | rcv | 32 | |
| irq_software | logic | uni | rcv | 1 | |
| irq_timer | logic | uni | rcv | 1 | |
| irq_external | logic | uni | rcv | 1 | |
| esc_tx | prim_esc_pkg::esc_tx | uni | rcv | 1 | |
| esc_rx | prim_esc_pkg::esc_rx | uni | req | 1 | |
| debug_req | logic | uni | rcv | 1 | |
| crash_dump | rv_core_ibex_pkg::cpu_crash_dump | uni | req | 1 | |
| lc_cpu_en | lc_ctrl_pkg::lc_tx | uni | rcv | 1 | |
| pwrmgr_cpu_en | lc_ctrl_pkg::lc_tx | uni | rcv | 1 | |
| pwrmgr | rv_core_ibex_pkg::cpu_pwrmgr | uni | req | 1 | |
| nmi_wdog | logic | uni | rcv | 1 | |
| edn | edn_pkg::edn | req_rsp | req | 1 | |
| icache_otp_key | otp_ctrl_pkg::sram_otp_key | req_rsp | req | 1 | |
| fpga_info | logic | uni | rcv | 32 | |
| corei_tl_h | tlul_pkg::tl | req_rsp | req | 1 | |
| cored_tl_h | tlul_pkg::tl | req_rsp | req | 1 | |
| cfg_tl_d | tlul_pkg::tl | req_rsp | rsp | 1 | |
| Port Name | Package::Struct | Type | Act | Width | Description |
|:------------------------|:---------------------------------|:--------|:------|--------:|:--------------|
| rst_cpu_n | logic | uni | req | 1 | |
| ram_cfg_icache_tag | prim_ram_1p_pkg::ram_1p_cfg | uni | rcv | 1 | |
| ram_cfg_rsp_icache_tag | prim_ram_1p_pkg::ram_1p_cfg_rsp | uni | req | 1 | |
| ram_cfg_icache_data | prim_ram_1p_pkg::ram_1p_cfg | uni | rcv | 1 | |
| ram_cfg_rsp_icache_data | prim_ram_1p_pkg::ram_1p_cfg_rsp | uni | req | 1 | |
| hart_id | logic | uni | rcv | 32 | |
| boot_addr | logic | uni | rcv | 32 | |
| irq_software | logic | uni | rcv | 1 | |
| irq_timer | logic | uni | rcv | 1 | |
| irq_external | logic | uni | rcv | 1 | |
| esc_tx | prim_esc_pkg::esc_tx | uni | rcv | 1 | |
| esc_rx | prim_esc_pkg::esc_rx | uni | req | 1 | |
| debug_req | logic | uni | rcv | 1 | |
| crash_dump | rv_core_ibex_pkg::cpu_crash_dump | uni | req | 1 | |
| lc_cpu_en | lc_ctrl_pkg::lc_tx | uni | rcv | 1 | |
| pwrmgr_cpu_en | lc_ctrl_pkg::lc_tx | uni | rcv | 1 | |
| pwrmgr | rv_core_ibex_pkg::cpu_pwrmgr | uni | req | 1 | |
| nmi_wdog | logic | uni | rcv | 1 | |
| edn | edn_pkg::edn | req_rsp | req | 1 | |
| icache_otp_key | otp_ctrl_pkg::sram_otp_key | req_rsp | req | 1 | |
| fpga_info | logic | uni | rcv | 32 | |
| corei_tl_h | tlul_pkg::tl | req_rsp | req | 1 | |
| cored_tl_h | tlul_pkg::tl | req_rsp | req | 1 | |
| cfg_tl_d | tlul_pkg::tl | req_rsp | rsp | 1 | |

## Security Alerts

Expand Down
10 changes: 8 additions & 2 deletions hw/ip/rv_core_ibex/rtl/rv_core_ibex.sv
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ module rv_core_ibex
// Reset feedback to rstmgr
output logic rst_cpu_n_o,

input prim_ram_1p_pkg::ram_1p_cfg_t ram_cfg_i,
input prim_ram_1p_pkg::ram_1p_cfg_t ram_cfg_icache_tag_i,
output prim_ram_1p_pkg::ram_1p_cfg_rsp_t [ibex_pkg::IC_NUM_WAYS-1:0] ram_cfg_rsp_icache_tag_o,
input prim_ram_1p_pkg::ram_1p_cfg_t ram_cfg_icache_data_i,
output prim_ram_1p_pkg::ram_1p_cfg_rsp_t [ibex_pkg::IC_NUM_WAYS-1:0] ram_cfg_rsp_icache_data_o,

input logic [31:0] hart_id_i,
input logic [31:0] boot_addr_i,
Expand Down Expand Up @@ -419,7 +422,10 @@ module rv_core_ibex
.test_en_i (prim_mubi_pkg::mubi4_test_true_strict(scanmode_i)),
.scan_rst_ni,

.ram_cfg_i,
.ram_cfg_icache_tag_i,
.ram_cfg_rsp_icache_tag_o,
.ram_cfg_icache_data_i,
.ram_cfg_rsp_icache_data_o,

.hart_id_i,
.boot_addr_i,
Expand Down
113 changes: 110 additions & 3 deletions hw/top_darjeeling/data/autogen/top_darjeeling.gen.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -9064,7 +9064,33 @@
index: -1
}
{
name: ram_cfg
name: ram_cfg_icache_tag
struct: ram_1p_cfg
package: prim_ram_1p_pkg
type: uni
act: rcv
width: 1
inst_name: rv_core_ibex
default: ""
top_signame: ast_ram_1p_cfg
index: -1
}
{
name: ram_cfg_rsp_icache_tag
struct: ram_1p_cfg_rsp
package: prim_ram_1p_pkg
type: uni
act: req
width: 1
inst_name: rv_core_ibex
default: ""
external: true
top_signame: rv_core_ibex_icache_tag_ram_1p_cfg_rsp
conn_type: false
index: -1
}
{
name: ram_cfg_icache_data
struct: ram_1p_cfg
package: prim_ram_1p_pkg
type: uni
Expand All @@ -9075,6 +9101,20 @@
top_signame: ast_ram_1p_cfg
index: -1
}
{
name: ram_cfg_rsp_icache_data
struct: ram_1p_cfg_rsp
package: prim_ram_1p_pkg
type: uni
act: req
width: 1
inst_name: rv_core_ibex
default: ""
external: true
top_signame: rv_core_ibex_icache_data_ram_1p_cfg_rsp
conn_type: false
index: -1
}
{
name: hart_id
struct: logic
Expand Down Expand Up @@ -9452,7 +9492,8 @@
sram_ctrl_main.cfg
sram_ctrl_ret_aon.cfg
sram_ctrl_mbox.cfg
rv_core_ibex.ram_cfg
rv_core_ibex.ram_cfg_icache_tag
rv_core_ibex.ram_cfg_icache_data
]
ast.spi_ram_2p_cfg:
[
Expand Down Expand Up @@ -10102,6 +10143,8 @@
sram_ctrl_mbox.cfg_rsp: sram_ctrl_mbox_ram_1p_cfg_rsp
otbn.ram_cfg_rsp_imem: otbn_imem_ram_1p_cfg_rsp
otbn.ram_cfg_rsp_dmem: otbn_dmem_ram_1p_cfg_rsp
rv_core_ibex.ram_cfg_rsp_icache_tag: rv_core_ibex_icache_tag_ram_1p_cfg_rsp
rv_core_ibex.ram_cfg_rsp_icache_data: rv_core_ibex_icache_data_ram_1p_cfg_rsp
spi_device.ram_cfg_rsp_sys2spi: spi_device_ram_2p_cfg_rsp_sys2spi
spi_device.ram_cfg_rsp_spi2sys: spi_device_ram_2p_cfg_rsp_spi2sys
pwrmgr_aon.boot_status: pwrmgr_boot_status
Expand Down Expand Up @@ -23079,7 +23122,33 @@
index: -1
}
{
name: ram_cfg
name: ram_cfg_icache_tag
struct: ram_1p_cfg
package: prim_ram_1p_pkg
type: uni
act: rcv
width: 1
inst_name: rv_core_ibex
default: ""
top_signame: ast_ram_1p_cfg
index: -1
}
{
name: ram_cfg_rsp_icache_tag
struct: ram_1p_cfg_rsp
package: prim_ram_1p_pkg
type: uni
act: req
width: 1
inst_name: rv_core_ibex
default: ""
external: true
top_signame: rv_core_ibex_icache_tag_ram_1p_cfg_rsp
conn_type: false
index: -1
}
{
name: ram_cfg_icache_data
struct: ram_1p_cfg
package: prim_ram_1p_pkg
type: uni
Expand All @@ -23090,6 +23159,20 @@
top_signame: ast_ram_1p_cfg
index: -1
}
{
name: ram_cfg_rsp_icache_data
struct: ram_1p_cfg_rsp
package: prim_ram_1p_pkg
type: uni
act: req
width: 1
inst_name: rv_core_ibex
default: ""
external: true
top_signame: rv_core_ibex_icache_data_ram_1p_cfg_rsp
conn_type: false
index: -1
}
{
name: hart_id
struct: logic
Expand Down Expand Up @@ -24631,6 +24714,30 @@
index: -1
netname: otbn_dmem_ram_1p_cfg_rsp
}
{
package: prim_ram_1p_pkg
struct: ram_1p_cfg_rsp
signame: rv_core_ibex_icache_tag_ram_1p_cfg_rsp_o
width: 1
type: uni
default: ""
direction: out
conn_type: false
index: -1
netname: rv_core_ibex_icache_tag_ram_1p_cfg_rsp
}
{
package: prim_ram_1p_pkg
struct: ram_1p_cfg_rsp
signame: rv_core_ibex_icache_data_ram_1p_cfg_rsp_o
width: 1
type: uni
default: ""
direction: out
conn_type: false
index: -1
netname: rv_core_ibex_icache_data_ram_1p_cfg_rsp
}
{
package: prim_ram_2p_pkg
struct: ram_2p_cfg
Expand Down
Loading

0 comments on commit 214646c

Please sign in to comment.