43 scx_evs_PL330(_name), clockPeriod(params.clock),
44 dma(amba_m, params.
name +
".dma", -1),
45 pioS(amba_s, params.
name +
".pio_s", -1),
46 pioNs(amba_s_ns, params.
name +
".pio_ns", -1),
47 irqAbortReceiver(
"irq_abort_receiver"),
48 resetIn(
"reset_in", 0)
50 set_parameter(
"pl330.fifo_size", params.fifo_size);
51 set_parameter(
"pl330.max_transfer", params.max_transfer);
52 set_parameter(
"pl330.generate_clear", params.generate_clear);
53 set_parameter(
"pl330.activate_delay", params.activate_delay);
54 set_parameter(
"pl330.revision", params.revision);
55 set_parameter(
"pl330.p_max_irqs", params.max_irqs);
56 set_parameter(
"pl330.p_buffer_depth", params.buffer_depth);
57 set_parameter(
"pl330.p_lsq_read_size", params.lsq_read_size);
58 set_parameter(
"pl330.p_lsq_write_size", params.lsq_write_size);
59 set_parameter(
"pl330.p_read_issuing_capability",
60 params.read_issuing_capability);
61 set_parameter(
"pl330.p_write_issuing_capability",
62 params.write_issuing_capability);
63 set_parameter(
"pl330.p_axi_bus_width_param", params.axi_bus_width);
64 set_parameter(
"pl330.p_cache_line_words", params.cache_line_words);
65 set_parameter(
"pl330.p_cache_lines", params.cache_lines);
66 set_parameter(
"pl330.p_max_channels", params.max_channels);
67 set_parameter(
"pl330.p_controller_nsecure", params.controller_nsecure);
68 set_parameter(
"pl330.p_irq_nsecure", params.irq_nsecure);
69 set_parameter(
"pl330.p_periph_nsecure", params.periph_nsecure);
70 set_parameter(
"pl330.p_controller_boots", params.controller_boots);
71 set_parameter(
"pl330.p_reset_pc", params.reset_pc);
72 set_parameter(
"pl330.p_max_periph", params.max_periph);
73 set_parameter(
"pl330.p_perip_request_acceptance_0",
74 params.perip_request_acceptance_0);
75 set_parameter(
"pl330.p_perip_request_acceptance_1",
76 params.perip_request_acceptance_1);
77 set_parameter(
"pl330.p_perip_request_acceptance_2",
78 params.perip_request_acceptance_2);
79 set_parameter(
"pl330.p_perip_request_acceptance_3",
80 params.perip_request_acceptance_3);
81 set_parameter(
"pl330.p_perip_request_acceptance_4",
82 params.perip_request_acceptance_4);
83 set_parameter(
"pl330.p_perip_request_acceptance_5",
84 params.perip_request_acceptance_5);
85 set_parameter(
"pl330.p_perip_request_acceptance_6",
86 params.perip_request_acceptance_6);
87 set_parameter(
"pl330.p_perip_request_acceptance_7",
88 params.perip_request_acceptance_7);
89 set_parameter(
"pl330.p_perip_request_acceptance_8",
90 params.perip_request_acceptance_8);
91 set_parameter(
"pl330.p_perip_request_acceptance_9",
92 params.perip_request_acceptance_9);
93 set_parameter(
"pl330.p_perip_request_acceptance_10",
94 params.perip_request_acceptance_10);
95 set_parameter(
"pl330.p_perip_request_acceptance_11",
96 params.perip_request_acceptance_11);
97 set_parameter(
"pl330.p_perip_request_acceptance_12",
98 params.perip_request_acceptance_12);
99 set_parameter(
"pl330.p_perip_request_acceptance_13",
100 params.perip_request_acceptance_13);
101 set_parameter(
"pl330.p_perip_request_acceptance_14",
102 params.perip_request_acceptance_14);
103 set_parameter(
"pl330.p_perip_request_acceptance_15",
104 params.perip_request_acceptance_15);
105 set_parameter(
"pl330.p_perip_request_acceptance_16",
106 params.perip_request_acceptance_16);
107 set_parameter(
"pl330.p_perip_request_acceptance_17",
108 params.perip_request_acceptance_17);
109 set_parameter(
"pl330.p_perip_request_acceptance_18",
110 params.perip_request_acceptance_18);
111 set_parameter(
"pl330.p_perip_request_acceptance_19",
112 params.perip_request_acceptance_19);
113 set_parameter(
"pl330.p_perip_request_acceptance_20",
114 params.perip_request_acceptance_20);
115 set_parameter(
"pl330.p_perip_request_acceptance_21",
116 params.perip_request_acceptance_21);
117 set_parameter(
"pl330.p_perip_request_acceptance_22",
118 params.perip_request_acceptance_22);
119 set_parameter(
"pl330.p_perip_request_acceptance_23",
120 params.perip_request_acceptance_23);
121 set_parameter(
"pl330.p_perip_request_acceptance_24",
122 params.perip_request_acceptance_24);
123 set_parameter(
"pl330.p_perip_request_acceptance_25",
124 params.perip_request_acceptance_25);
125 set_parameter(
"pl330.p_perip_request_acceptance_26",
126 params.perip_request_acceptance_26);
127 set_parameter(
"pl330.p_perip_request_acceptance_27",
128 params.perip_request_acceptance_27);
129 set_parameter(
"pl330.p_perip_request_acceptance_28",
130 params.perip_request_acceptance_28);
131 set_parameter(
"pl330.p_perip_request_acceptance_29",
132 params.perip_request_acceptance_29);
133 set_parameter(
"pl330.p_perip_request_acceptance_30",
134 params.perip_request_acceptance_30);
135 set_parameter(
"pl330.p_perip_request_acceptance_31",
136 params.perip_request_acceptance_31);
142 allocateIrq(0, params.port_irq_0_connection_count);
143 allocateIrq(1, params.port_irq_1_connection_count);
144 allocateIrq(2, params.port_irq_2_connection_count);
145 allocateIrq(3, params.port_irq_3_connection_count);
146 allocateIrq(4, params.port_irq_4_connection_count);
147 allocateIrq(5, params.port_irq_5_connection_count);
148 allocateIrq(6, params.port_irq_6_connection_count);
149 allocateIrq(7, params.port_irq_7_connection_count);
150 allocateIrq(8, params.port_irq_8_connection_count);
151 allocateIrq(9, params.port_irq_9_connection_count);
152 allocateIrq(10, params.port_irq_10_connection_count);
153 allocateIrq(11, params.port_irq_11_connection_count);
154 allocateIrq(12, params.port_irq_12_connection_count);
155 allocateIrq(13, params.port_irq_13_connection_count);
156 allocateIrq(14, params.port_irq_14_connection_count);
157 allocateIrq(15, params.port_irq_15_connection_count);
158 allocateIrq(16, params.port_irq_16_connection_count);
159 allocateIrq(17, params.port_irq_17_connection_count);
160 allocateIrq(18, params.port_irq_18_connection_count);
161 allocateIrq(19, params.port_irq_19_connection_count);
162 allocateIrq(20, params.port_irq_20_connection_count);
163 allocateIrq(21, params.port_irq_21_connection_count);
164 allocateIrq(22, params.port_irq_22_connection_count);
165 allocateIrq(23, params.port_irq_23_connection_count);
166 allocateIrq(24, params.port_irq_24_connection_count);
167 allocateIrq(25, params.port_irq_25_connection_count);
168 allocateIrq(26, params.port_irq_26_connection_count);
169 allocateIrq(27, params.port_irq_27_connection_count);
170 allocateIrq(28, params.port_irq_28_connection_count);
171 allocateIrq(29, params.port_irq_29_connection_count);
172 allocateIrq(30, params.port_irq_30_connection_count);
173 allocateIrq(31, params.port_irq_31_connection_count);
176 for (
int i = 0;
i < 32;
i++) {
188 for (
auto &pin: port)
189 status ? pin->raise() : pin->lower();
197 for (
int i = 0;
i < params.port_irq_abort_connection_count;
i++) {
207 auto abort_change = [
this](
bool status) {
209 status ? pin->raise() : pin->lower();