|
| 1 | +// Copyright 2025 ETH Zurich and University of Bologna. |
| 2 | +// Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | +// SPDX-License-Identifier: Apache-2.0 |
| 4 | + |
| 5 | +// Cluster configuration for a simple testbench system. |
| 6 | +{ |
| 7 | + cluster: { |
| 8 | + cluster_base_addr: 0x2000_0000, |
| 9 | + cluster_base_offset: 0x4_0000, |
| 10 | + cluster_base_hartid: 0, |
| 11 | + addr_width: 48, |
| 12 | + data_width: 64, |
| 13 | + user_width: 3, // clog2(nr_clusters + 1) |
| 14 | + tcdm: { |
| 15 | + size: 128, |
| 16 | + banks: 32, |
| 17 | + }, |
| 18 | + cluster_periph_size: 60, // kB |
| 19 | + zero_mem_size: 64, // kB |
| 20 | + alias_region_enable: true, |
| 21 | + dma_data_width: 512, |
| 22 | + dma_axi_req_fifo_depth: 3, |
| 23 | + dma_req_fifo_depth: 3, |
| 24 | + narrow_trans: 4, |
| 25 | + wide_trans: 32, |
| 26 | + cluster_base_expose: true, |
| 27 | + alias_region_base: 0x2800_0000, |
| 28 | + dma_user_width: 1, |
| 29 | + enable_debug: true, |
| 30 | + // TODO(fischeti): Check if we need Snitch VM support |
| 31 | + vm_support: false, |
| 32 | + // Memory configuration inputs |
| 33 | + sram_cfg_expose: false, |
| 34 | + sram_cfg_fields: { |
| 35 | + ema: 1, |
| 36 | + emaw: 1, |
| 37 | + emas: 1 |
| 38 | + }, |
| 39 | + // Timing parameters |
| 40 | + timing: { |
| 41 | + lat_comp_fp32: 2, |
| 42 | + lat_comp_fp64: 3, |
| 43 | + lat_comp_fp16: 1, |
| 44 | + lat_comp_fp16_alt: 1, |
| 45 | + lat_comp_fp8: 1, |
| 46 | + lat_comp_fp8_alt: 1, |
| 47 | + lat_noncomp: 1, |
| 48 | + lat_conv: 1, |
| 49 | + lat_sdotp: 3, |
| 50 | + fpu_pipe_config: "BEFORE" |
| 51 | + narrow_xbar_latency: "CUT_ALL_PORTS", |
| 52 | + wide_xbar_latency: "CUT_ALL_PORTS", |
| 53 | + // Isolate the core. |
| 54 | + register_core_req: true, |
| 55 | + register_core_rsp: true, |
| 56 | + register_offload_req: true, |
| 57 | + register_offload_rsp: true |
| 58 | + # register_fpu_req: false, |
| 59 | + # register_ext_narrow: false, |
| 60 | + # register_ext_wide: false |
| 61 | + }, |
| 62 | + hives: [ |
| 63 | + // Hive 0 |
| 64 | + { |
| 65 | + icache: { |
| 66 | + size: 8, // total instruction cache size in kByte |
| 67 | + sets: 2, // number of ways |
| 68 | + cacheline: 256 // word size in bits |
| 69 | + }, |
| 70 | + cores: [ |
| 71 | + { $ref: "#/compute_core_template" }, |
| 72 | + { $ref: "#/compute_core_template" }, |
| 73 | + { $ref: "#/compute_core_template" }, |
| 74 | + { $ref: "#/compute_core_template" }, |
| 75 | + { $ref: "#/compute_core_template" }, |
| 76 | + { $ref: "#/compute_core_template" }, |
| 77 | + { $ref: "#/compute_core_template" }, |
| 78 | + { $ref: "#/compute_core_template" }, |
| 79 | + { $ref: "#/dma_core_template" }, |
| 80 | + ] |
| 81 | + } |
| 82 | + ] |
| 83 | + }, |
| 84 | + external_addr_regions: [ |
| 85 | + { |
| 86 | + name: "l2spm", |
| 87 | + address: 0x3000_0000, |
| 88 | + length: 0x1000_0000 |
| 89 | + cacheable: true |
| 90 | + }, |
| 91 | + { |
| 92 | + name: "dram", |
| 93 | + address: 0x8000_0000, |
| 94 | + length: 0x8000_0000, |
| 95 | + cacheable: true |
| 96 | + }, |
| 97 | + { |
| 98 | + name: "clint", |
| 99 | + address: 0xffff_0000, |
| 100 | + length: 0x0000_1000 |
| 101 | + } |
| 102 | + ] |
| 103 | + // Templates. |
| 104 | + compute_core_template: { |
| 105 | + isa: "rv32imafd", |
| 106 | + xssr: true, |
| 107 | + xfrep: true, |
| 108 | + xdma: false, |
| 109 | + xf16: true, |
| 110 | + xf16alt: true, |
| 111 | + xf8: true, |
| 112 | + xf8alt: true, |
| 113 | + xfdotp: true, |
| 114 | + xfvec: true, |
| 115 | + ssr_nr_credits: 4, |
| 116 | + num_int_outstanding_loads: 1, |
| 117 | + num_int_outstanding_mem: 4, |
| 118 | + num_fp_outstanding_loads: 4, |
| 119 | + num_fp_outstanding_mem: 4, |
| 120 | + num_sequencer_instructions: 16, |
| 121 | + num_dtlb_entries: 1, |
| 122 | + num_itlb_entries: 1, |
| 123 | + // SSSR configuration below |
| 124 | + ssr_intersection: false, |
| 125 | + ssr_intersection_triple: [0, 1, 2], |
| 126 | + ssrs: [ |
| 127 | + {indirection: false}, // Master 0 |
| 128 | + {indirection: false}, // Master 1 |
| 129 | + {}, // Slave |
| 130 | + ], |
| 131 | + // Enable division/square root unit |
| 132 | + // TODO(fischeti): Do we need a division/square root unit? |
| 133 | + // Xdiv_sqrt: true, |
| 134 | + // TODO(fischeti): Do we want SSR indirection support? |
| 135 | + }, |
| 136 | + dma_core_template: { |
| 137 | + isa: "rv32imafd", |
| 138 | + // Xdiv_sqrt: true, |
| 139 | + # isa: "rv32ema", |
| 140 | + xdma: true |
| 141 | + xssr: false |
| 142 | + xfrep: false |
| 143 | + xf16: false, |
| 144 | + xf16alt: false, |
| 145 | + xf8: false, |
| 146 | + xf8alt: false, |
| 147 | + xfdotp: false, |
| 148 | + xfvec: false, |
| 149 | + num_int_outstanding_loads: 1, |
| 150 | + num_int_outstanding_mem: 4, |
| 151 | + num_fp_outstanding_loads: 4, |
| 152 | + num_fp_outstanding_mem: 4, |
| 153 | + num_sequencer_instructions: 16, |
| 154 | + num_dtlb_entries: 1, |
| 155 | + num_itlb_entries: 1, |
| 156 | + } |
| 157 | +} |
0 commit comments