|
| 1 | +// Copyright 2024 ETH Zurich and University of Bologna. |
| 2 | +// Solderpad Hardware License, Version 0.51, see LICENSE for details. |
| 3 | +// SPDX-License-Identifier: SHL-0.51 |
| 4 | + |
| 5 | +{ |
| 6 | + name: "cluster_icache_ctrl", |
| 7 | + clock_primary: "clk_i", |
| 8 | + reset_primary: "rst_ni", |
| 9 | + bus_interfaces: [ |
| 10 | + { protocol: "reg_iface", |
| 11 | + direction: "device" |
| 12 | + } |
| 13 | + ], |
| 14 | + |
| 15 | + param_list: [ |
| 16 | + { name: "NumCores", |
| 17 | + desc: "Number of cores", |
| 18 | + default: "8" |
| 19 | + }, |
| 20 | + { name: "NumAvailableCounters", |
| 21 | + desc: "Number of available counters", |
| 22 | + default: "44" // NumL1Events + NumCores * NumL0Events |
| 23 | + }, |
| 24 | + ], |
| 25 | + |
| 26 | + regwidth: "32", |
| 27 | + registers: [ |
| 28 | + { name: "enable", |
| 29 | + desc: "", |
| 30 | + swaccess: "rw", |
| 31 | + hwaccess: "hro", |
| 32 | + fields: [ |
| 33 | + { bits: "0", |
| 34 | + name: "enable", |
| 35 | + desc: "", |
| 36 | + resval: 0x1 |
| 37 | + } |
| 38 | + ] |
| 39 | + }, |
| 40 | + { name: "flush", |
| 41 | + desc: "Flush all levels of the cache", |
| 42 | + swaccess: "rw", |
| 43 | + hwaccess: "hrw", |
| 44 | + hwqe: "true", |
| 45 | + hwext: "true", |
| 46 | + fields: [ |
| 47 | + { bits: "0", |
| 48 | + name: "flush", |
| 49 | + desc: "", |
| 50 | + resval: 0x0 |
| 51 | + } |
| 52 | + ] |
| 53 | + }, |
| 54 | + { name: "flush_l1_only", |
| 55 | + desc: "not yet functional", |
| 56 | + swaccess: "rw", |
| 57 | + hwaccess: "hrw", |
| 58 | + hwext: "true", |
| 59 | + hwqe: "true", |
| 60 | + fields: [ |
| 61 | + { bits: "0", |
| 62 | + name: "flush", |
| 63 | + desc: "", |
| 64 | + resval: 0x0 |
| 65 | + } |
| 66 | + ] |
| 67 | + }, |
| 68 | + { name: "sel_flush_icache", |
| 69 | + desc: "flush specified L0 banks (and currently the complete L1)", |
| 70 | + swaccess: "rw", |
| 71 | + hwaccess: "hrw", |
| 72 | + hwext: "true", |
| 73 | + hwqe: "true", |
| 74 | + fields: [ |
| 75 | + { bits: "NumCores-1:0", |
| 76 | + name: "flush", |
| 77 | + desc: "", |
| 78 | + resval: 0x0000_0000 |
| 79 | + } |
| 80 | + ] |
| 81 | + }, |
| 82 | + { name: "clear_counters", |
| 83 | + desc: "Clear all performance counters", |
| 84 | + swaccess: "rw", |
| 85 | + hwaccess: "hrw", |
| 86 | + hwqe: "true", |
| 87 | + hwext: "true", |
| 88 | + fields: [ |
| 89 | + { bits: "0", |
| 90 | + name: "clear", |
| 91 | + desc: "", |
| 92 | + resval: 0x0 |
| 93 | + } |
| 94 | + ] |
| 95 | + }, |
| 96 | + { name: "enable_counters", |
| 97 | + desc: "Enable performance counters", |
| 98 | + swaccess: "rw", |
| 99 | + hwaccess: "hro", |
| 100 | + fields: [ |
| 101 | + { bits: "0", |
| 102 | + name: "enable", |
| 103 | + desc: "", |
| 104 | + resval: 0x1 |
| 105 | + } |
| 106 | + ] |
| 107 | + }, |
| 108 | + { skipto: "0x1C" }, |
| 109 | + { name: "enable_prefetch", |
| 110 | + desc: "Enable prefetching", |
| 111 | + swaccess: "rw", |
| 112 | + hwaccess: "hro", |
| 113 | + fields: [ |
| 114 | + { bits: "0", |
| 115 | + name: "enable", |
| 116 | + desc: "", |
| 117 | + resval: 0x1 |
| 118 | + } |
| 119 | + ] |
| 120 | + }, |
| 121 | + { multireg: { |
| 122 | + name: "counters", |
| 123 | + desc: "Performance counters", |
| 124 | + count: "NumAvailableCounters", |
| 125 | + cname: "id", |
| 126 | + swaccess: "rw0c", |
| 127 | + hwaccess: "hrw", |
| 128 | + fields: [ |
| 129 | + { bits: "31:0", |
| 130 | + name: "counter", |
| 131 | + desc: "", |
| 132 | + resval: 0x0000_0000 |
| 133 | + } |
| 134 | + ] |
| 135 | + } |
| 136 | + }, |
| 137 | + ], |
| 138 | +} |
0 commit comments