31 #include "params/FastModelGIC.hh"
32 #include "params/SCFastModelGIC.hh"
41 for (
auto &
init: inits)
42 if (!
init.get_port_base().size())
50 targets(
"targets", countUnbound(inits))
55 for (
auto &
init: inits) {
56 if (!
init.get_port_base().size()) {
67 panic(
"Call to terminated interface!");
76 set_parameter(
"gic.enabled",
params.enabled);
77 set_parameter(
"gic.has-gicv3",
params.has_gicv3);
78 set_parameter(
"gic.has-gicv4.1",
params.has_gicv4_1);
79 set_parameter(
"gic.vPEID-bits",
params.vPEID_bits);
80 set_parameter(
"gic.print-memory-map",
params.print_mmap);
81 set_parameter(
"gic.monolithic",
params.monolithic);
82 set_parameter(
"gic.direct-lpi-support",
params.direct_lpi_support);
83 set_parameter(
"gic.CPU-affinities",
params.cpu_affinities);
84 set_parameter(
"gic.non-ARE-core-count",
params.non_ARE_core_count);
85 set_parameter(
"gic.reg-base",
params.reg_base);
86 set_parameter(
"gic.reg-base-per-redistributor",
87 params.reg_base_per_redistributor);
88 set_parameter(
"gic.GICD-alias",
params.gicd_alias);
89 set_parameter(
"gic.has-two-security-states",
90 params.has_two_security_states);
91 set_parameter(
"gic.DS-fixed-to-zero",
params.DS_fixed_to_zero);
92 set_parameter(
"gic.IIDR",
params.IIDR);
93 set_parameter(
"gic.gicv2-only",
params.gicv2_only);
94 set_parameter(
"gic.STATUSR-implemented",
params.STATUSR_implemented);
95 set_parameter(
"gic.priority-bits",
96 params.priority_bits_implemented);
97 set_parameter(
"gic.GICD_ITARGETSR-RAZWI",
params.itargets_razwi);
98 set_parameter(
"gic.ICFGR-SGI-mask",
params.icfgr_sgi_mask);
99 set_parameter(
"gic.ICFGR-PPI-mask",
params.icfgr_ppi_mask);
100 set_parameter(
"gic.ICFGR-SPI-mask",
params.icfgr_spi_mask);
101 set_parameter(
"gic.ICFGR-SGI-reset",
params.icfgr_sgi_reset);
102 set_parameter(
"gic.ICFGR-PPI-reset",
params.icfgr_ppi_reset);
103 set_parameter(
"gic.ICFGR-SPI-reset",
params.icfgr_spi_reset);
104 set_parameter(
"gic.ICFGR-rsvd-bit",
params.icfgr_ppi_rsvd_bit);
105 set_parameter(
"gic.IGROUP-SGI-mask",
params.igroup_sgi_mask);
106 set_parameter(
"gic.IGROUP-PPI-mask",
params.igroup_ppi_mask);
107 set_parameter(
"gic.IGROUP-SGI-reset",
params.igroup_sgi_reset);
108 set_parameter(
"gic.IGROUP-PPI-reset",
params.igroup_ppi_reset);
109 set_parameter(
"gic.PPI-implemented-mask",
params.ppi_implemented_mask);
110 set_parameter(
"gic.SPI-count",
params.spi_count);
111 set_parameter(
"gic.lockable-SPI-count",
params.lockable_spi_count);
112 set_parameter(
"gic.IRI-ID-bits",
params.iri_id_bits);
113 set_parameter(
"gic.delay-redistributor-accesses",
114 params.delay_redistributor_accesses);
115 set_parameter(
"gic.GICD_PIDR",
params.gicd_pidr);
116 set_parameter(
"gic.GICR_PIDR",
params.gicr_pidr);
117 set_parameter(
"gic.ITS-count",
params.its_count);
118 set_parameter(
"gic.ITS0-base",
params.its0_base);
119 set_parameter(
"gic.ITS1-base",
params.its1_base);
120 set_parameter(
"gic.ITS2-base",
params.its2_base);
121 set_parameter(
"gic.ITS3-base",
params.its3_base);
122 set_parameter(
"gic.GITS_PIDR",
params.gits_pidr);
123 set_parameter(
"gic.GITS_BASER0-type",
params.gits_baser0_type);
124 set_parameter(
"gic.GITS_BASER1-type",
params.gits_baser1_type);
125 set_parameter(
"gic.GITS_BASER2-type",
params.gits_baser2_type);
126 set_parameter(
"gic.GITS_BASER3-type",
params.gits_baser3_type);
127 set_parameter(
"gic.GITS_BASER4-type",
params.gits_baser4_type);
128 set_parameter(
"gic.GITS_BASER5-type",
params.gits_baser5_type);
129 set_parameter(
"gic.GITS_BASER6-type",
params.gits_baser6_type);
130 set_parameter(
"gic.GITS_BASER7-type",
params.gits_baser7_type);
131 set_parameter(
"gic.GITS_BASER0-entry-bytes",
132 params.gits_baser0_entry_bytes);
133 set_parameter(
"gic.GITS_BASER1-entry-bytes",
134 params.gits_baser1_entry_bytes);
135 set_parameter(
"gic.GITS_BASER2-entry-bytes",
136 params.gits_baser2_entry_bytes);
137 set_parameter(
"gic.GITS_BASER3-entry-bytes",
138 params.gits_baser3_entry_bytes);
139 set_parameter(
"gic.GITS_BASER4-entry-bytes",
140 params.gits_baser4_entry_bytes);
141 set_parameter(
"gic.GITS_BASER5-entry-bytes",
142 params.gits_baser5_entry_bytes);
143 set_parameter(
"gic.GITS_BASER6-entry-bytes",
144 params.gits_baser6_entry_bytes);
145 set_parameter(
"gic.GITS_BASER7-entry-bytes",
146 params.gits_baser7_entry_bytes);
147 set_parameter(
"gic.GITS_BASER0-indirect-RAZ",
148 params.gits_baser0_indirect_raz);
149 set_parameter(
"gic.GITS_BASER1-indirect-RAZ",
150 params.gits_baser1_indirect_raz);
151 set_parameter(
"gic.GITS_BASER2-indirect-RAZ",
152 params.gits_baser2_indirect_raz);
153 set_parameter(
"gic.GITS_BASER3-indirect-RAZ",
154 params.gits_baser3_indirect_raz);
155 set_parameter(
"gic.GITS_BASER4-indirect-RAZ",
156 params.gits_baser4_indirect_raz);
157 set_parameter(
"gic.GITS_BASER5-indirect-RAZ",
158 params.gits_baser5_indirect_raz);
159 set_parameter(
"gic.GITS_BASER6-indirect-RAZ",
160 params.gits_baser6_indirect_raz);
161 set_parameter(
"gic.GITS_BASER7-indirect-RAZ",
162 params.gits_baser7_indirect_raz);
163 set_parameter(
"gic.ITS-BASER-force-page-alignement",
164 params.its_baser_force_page_alignement);
165 set_parameter(
"gic.processor-numbers",
params.processor_numbers);
166 set_parameter(
"gic.supports-shareability",
params.supports_shareability);
167 set_parameter(
"gic.A3-affinity-supported",
params.a3_affinity_supported);
168 set_parameter(
"gic.sgi-range-selector-support",
params.SGI_RSS_support);
169 set_parameter(
"gic.GICR_PROPBASER-read-only",
170 params.gicr_propbaser_read_only);
171 set_parameter(
"gic.GICR_PROPBASER-reset-value",
172 params.gicr_propbaser_reset);
173 set_parameter(
"gic.ITS-device-bits",
params.its_device_bits);
174 set_parameter(
"gic.ITS-entry-size",
params.its_entry_size);
175 set_parameter(
"gic.ITS-ID-bits",
params.its_id_bits);
176 set_parameter(
"gic.ITS-collection-ID-bits",
params.its_collection_id_bits);
177 set_parameter(
"gic.ITS-cumulative-collection-tables",
178 params.its_cumulative_collection_tables);
179 set_parameter(
"gic.delay-ITS-accesses",
params.delay_ITS_accesses);
180 set_parameter(
"gic.local-SEIs",
params.local_SEIs);
181 set_parameter(
"gic.local-VSEIs",
params.local_VSEIs);
182 set_parameter(
"gic.ITS-use-physical-target-addresses",
183 params.ITS_use_physical_target_addresses);
184 set_parameter(
"gic.ITS-hardware-collection-count",
185 params.ITS_hardware_collection_count);
186 set_parameter(
"gic.ITS-MOVALL-update-collections",
187 params.ITS_MOVALL_update_collections);
188 set_parameter(
"gic.ITS-TRANSLATE64R",
params.ITS_TRANSLATE64R);
189 set_parameter(
"gic.enable_protocol_checking",
190 params.enable_protocol_checking);
191 set_parameter(
"gic.fixed-routed-spis",
params.fixed_routed_spis);
192 set_parameter(
"gic.irouter-default-mask",
params.irouter_default_mask);
193 if (
params.irouter_default_reset !=
"") {
194 set_parameter(
"gic.irouter-default-reset",
195 params.irouter_default_reset);
197 if (
params.irouter_reset_values !=
"")
198 set_parameter(
"gic.irouter-reset-values",
params.irouter_reset_values);
199 set_parameter(
"gic.irouter-mask-values",
params.irouter_mask_values);
200 set_parameter(
"gic.ITS-threaded-command-queue",
201 params.ITS_threaded_command_queue);
202 set_parameter(
"gic.ITS-legacy-iidr-typer-offset",
203 params.ITS_legacy_iidr_typer_offset);
204 set_parameter(
"gic.redistributor-threaded-sync",
205 params.redistributor_threaded_command_queue);
206 set_parameter(
"gic.ignore-generate-sgi-when-no-are",
207 params.ignore_generate_sgi_when_no_are);
208 set_parameter(
"gic.trace-speculative-lpi-property-update",
209 params.trace_speculative_lpi_property_updates);
210 set_parameter(
"gic.virtual-lpi-support",
params.virtual_lpi_support);
211 set_parameter(
"gic.virtual-priority-bits",
params.virtual_priority_bits);
212 set_parameter(
"gic.LPI-cache-type",
params.LPI_cache_type);
213 set_parameter(
"gic.LPI-cache-check-data",
params.LPI_cache_check_data);
214 set_parameter(
"gic.DPG-bits-implemented",
params.DPG_bits_implemented);
215 set_parameter(
"gic.DPG-ARE-only",
params.DPG_ARE_only);
216 set_parameter(
"gic.ARE-fixed-to-one",
params.ARE_fixed_to_one);
217 set_parameter(
"gic.legacy-sgi-enable-rao",
params.legacy_sgi_enable_rao);
218 set_parameter(
"gic.PA_SIZE",
params.pa_size);
219 set_parameter(
"gic.MSI_IIDR",
params.MSI_IIDR);
220 set_parameter(
"gic.MSI_NS-frame0-base",
params.MSI_NS_frame0_base);
221 set_parameter(
"gic.MSI_NS-frame0-max-SPI",
params.MSI_NS_frame0_max_SPI);
222 set_parameter(
"gic.MSI_NS-frame0-min-SPI",
params.MSI_NS_frame0_min_SPI);
223 set_parameter(
"gic.MSI_NS-frame1-base",
params.MSI_NS_frame1_base);
224 set_parameter(
"gic.MSI_NS-frame1-max-SPI",
params.MSI_NS_frame1_max_SPI);
225 set_parameter(
"gic.MSI_NS-frame1-min-SPI",
params.MSI_NS_frame1_min_SPI);
226 set_parameter(
"gic.MSI_NS-frame2-base",
params.MSI_NS_frame2_base);
227 set_parameter(
"gic.MSI_NS-frame2-max-SPI",
params.MSI_NS_frame2_max_SPI);
228 set_parameter(
"gic.MSI_NS-frame2-min-SPI",
params.MSI_NS_frame2_min_SPI);
229 set_parameter(
"gic.MSI_NS-frame3-base",
params.MSI_NS_frame3_base);
230 set_parameter(
"gic.MSI_NS-frame3-max-SPI",
params.MSI_NS_frame3_max_SPI);
231 set_parameter(
"gic.MSI_NS-frame3-min-SPI",
params.MSI_NS_frame3_min_SPI);
232 set_parameter(
"gic.MSI_NS-frame4-base",
params.MSI_NS_frame4_base);
233 set_parameter(
"gic.MSI_NS-frame4-max-SPI",
params.MSI_NS_frame4_max_SPI);
234 set_parameter(
"gic.MSI_NS-frame4-min-SPI",
params.MSI_NS_frame4_min_SPI);
235 set_parameter(
"gic.MSI_NS-frame5-base",
params.MSI_NS_frame5_base);
236 set_parameter(
"gic.MSI_NS-frame5-max-SPI",
params.MSI_NS_frame5_max_SPI);
237 set_parameter(
"gic.MSI_NS-frame5-min-SPI",
params.MSI_NS_frame5_min_SPI);
238 set_parameter(
"gic.MSI_NS-frame6-base",
params.MSI_NS_frame6_base);
239 set_parameter(
"gic.MSI_NS-frame6-max-SPI",
params.MSI_NS_frame6_max_SPI);
240 set_parameter(
"gic.MSI_NS-frame6-min-SPI",
params.MSI_NS_frame6_min_SPI);
241 set_parameter(
"gic.MSI_NS-frame7-base",
params.MSI_NS_frame7_base);
242 set_parameter(
"gic.MSI_NS-frame7-max-SPI",
params.MSI_NS_frame7_max_SPI);
243 set_parameter(
"gic.MSI_NS-frame7-min-SPI",
params.MSI_NS_frame7_min_SPI);
244 set_parameter(
"gic.MSI_PIDR",
params.MSI_PIDR);
245 set_parameter(
"gic.MSI_S-frame0-base",
params.MSI_S_frame0_base);
246 set_parameter(
"gic.MSI_S-frame0-max-SPI",
params.MSI_S_frame0_max_SPI);
247 set_parameter(
"gic.MSI_S-frame0-min-SPI",
params.MSI_S_frame0_min_SPI);
248 set_parameter(
"gic.MSI_S-frame1-base",
params.MSI_S_frame1_base);
249 set_parameter(
"gic.MSI_S-frame1-max-SPI",
params.MSI_S_frame1_max_SPI);
250 set_parameter(
"gic.MSI_S-frame1-min-SPI",
params.MSI_S_frame1_min_SPI);
251 set_parameter(
"gic.MSI_S-frame2-base",
params.MSI_S_frame2_base);
252 set_parameter(
"gic.MSI_S-frame2-max-SPI",
params.MSI_S_frame2_max_SPI);
253 set_parameter(
"gic.MSI_S-frame2-min-SPI",
params.MSI_S_frame2_min_SPI);
254 set_parameter(
"gic.MSI_S-frame3-base",
params.MSI_S_frame3_base);
255 set_parameter(
"gic.MSI_S-frame3-max-SPI",
params.MSI_S_frame3_max_SPI);
256 set_parameter(
"gic.MSI_S-frame3-min-SPI",
params.MSI_S_frame3_min_SPI);
257 set_parameter(
"gic.MSI_S-frame4-base",
params.MSI_S_frame4_base);
258 set_parameter(
"gic.MSI_S-frame4-max-SPI",
params.MSI_S_frame4_max_SPI);
259 set_parameter(
"gic.MSI_S-frame4-min-SPI",
params.MSI_S_frame4_min_SPI);
260 set_parameter(
"gic.MSI_S-frame5-base",
params.MSI_S_frame5_base);
261 set_parameter(
"gic.MSI_S-frame5-max-SPI",
params.MSI_S_frame5_max_SPI);
262 set_parameter(
"gic.MSI_S-frame5-min-SPI",
params.MSI_S_frame5_min_SPI);
263 set_parameter(
"gic.MSI_S-frame6-base",
params.MSI_S_frame6_base);
264 set_parameter(
"gic.MSI_S-frame6-max-SPI",
params.MSI_S_frame6_max_SPI);
265 set_parameter(
"gic.MSI_S-frame6-min-SPI",
params.MSI_S_frame6_min_SPI);
266 set_parameter(
"gic.MSI_S-frame7-base",
params.MSI_S_frame7_base);
267 set_parameter(
"gic.MSI_S-frame7-max-SPI",
params.MSI_S_frame7_max_SPI);
268 set_parameter(
"gic.MSI_S-frame7-min-SPI",
params.MSI_S_frame7_min_SPI);
269 set_parameter(
"gic.outer-cacheability-support",
270 params.outer_cacheability_support);
271 set_parameter(
"gic.wakeup-on-reset",
params.wakeup_on_reset);
272 set_parameter(
"gic.SPI-message-based-support",
params.SPI_MBIS);
273 set_parameter(
"gic.SPI-unimplemented",
params.SPI_unimplemented);
274 set_parameter(
"gic.IROUTER-IRM-RAZ-WI",
params.irm_razwi);
275 set_parameter(
"gic.common-lpi-configuration",
276 params.common_LPI_configuration);
277 set_parameter(
"gic.single-set-support",
params.single_set_support);
278 set_parameter(
"gic.has_mpam",
params.has_mpam);
279 set_parameter(
"gic.mpam_partid_max",
params.mpam_max_partid);
280 set_parameter(
"gic.mpam_pmg_max",
params.mpam_max_pmg);
281 set_parameter(
"gic.output_attributes",
params.output_attributes);
282 set_parameter(
"gic.has_VPENDBASER-dirty-flag-on-load",
283 params.has_DirtyVLPIOnLoad);
284 set_parameter(
"gic.allow-LPIEN-clear",
params.allow_LPIEN_clear);
285 set_parameter(
"gic.GICD-legacy-registers-as-reserved",
286 params.GICD_legacy_reg_reserved);
287 set_parameter(
"gic.extended-spi-count",
params.extended_spi_count);
288 set_parameter(
"gic.extended-ppi-count",
params.extended_ppi_count);
289 set_parameter(
"gic.consolidators",
params.consolidators);
295 scx_evs_GIC::before_end_of_elaboration();
301 ambaM(params.sc_gic->amba_m, params.
name +
".amba_m", -1),
302 ambaS(params.sc_gic->amba_s, params.
name +
".amba_s", -1),
303 redistributors(params.port_redistributor_connection_count),
310 if (if_name ==
"amba_m") {
312 }
else if (if_name ==
"amba_s") {
314 }
else if (if_name ==
"redistributor") {
363 SCFastModelGICParams::create()
369 FastModelGICParams::create()