Jahnavibh commited on
Commit
1e4b23a
·
1 Parent(s): 6f20722

Copy exact Vela configuration and run_vela function from SR app to fix compilation issues

Browse files
Files changed (2) hide show
  1. app.py +120 -124
  2. u55_eval_with_TA_config_400_and_200_MHz.ini +565 -0
app.py CHANGED
@@ -41,22 +41,7 @@ print(f"Vela-optimized model also available: {VELA_MODEL_FILE}")
41
  # Force rebuild with modern design
42
  print(f"Repository: {MODEL_REPO}")
43
 
44
- # Create Vela config file
45
- config_content = """[System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.05_GBs]
46
- core_clock=400e6
47
- axi0_port=Sram
48
- axi0_max_outstanding=32
49
- sram_clock_scale=1.0
50
- axi1_port=OffChipFlash
51
- Sram=3.2GB
52
- OnChipFlash=0.05GB
53
- OffChipFlash=1GB
54
- Cmd_Buf_Alignment=4
55
- Cmd_Buf_Size=65536
56
- """
57
-
58
- with open(DEFAULT_CONFIG, 'w') as f:
59
- f.write(config_content)
60
 
61
  def extract_summary_from_log(log_text):
62
  summary_keys = [
@@ -79,27 +64,24 @@ def extract_summary_from_log(log_text):
79
  summary.append((key, value))
80
  return summary
81
 
82
- def run_vela_analysis(model_path):
83
- """Run Vela compiler on the model and extract performance metrics"""
84
  accel = "ethos-u55-128"
85
  optimise = "Size"
86
  mem_mode = "Sram_Only"
87
  sys_config = "Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.05_GBs"
88
  tmpdir = tempfile.mkdtemp()
89
-
90
  try:
91
  # Use the original uploaded model filename
92
- original_model_name = os.path.basename(model_path)
93
- temp_model_path = os.path.join(tmpdir, original_model_name)
94
- shutil.copy(model_path, temp_model_path)
95
-
96
- # Copy config file
97
  config_path = os.path.join(tmpdir, DEFAULT_CONFIG)
98
  shutil.copy(DEFAULT_CONFIG, config_path)
99
-
100
  output_dir = os.path.join(tmpdir, "vela_out")
101
  os.makedirs(output_dir, exist_ok=True)
102
-
103
  cmd = [
104
  "vela",
105
  f"--accelerator-config={accel}",
@@ -107,15 +89,15 @@ def run_vela_analysis(model_path):
107
  f"--config={config_path}",
108
  f"--memory-mode={mem_mode}",
109
  f"--system-config={sys_config}",
110
- temp_model_path,
111
  "--verbose-cycle-estimate",
112
  "--verbose-performance",
113
  f"--output-dir={output_dir}"
114
  ]
115
-
116
  result = subprocess.run(cmd, capture_output=True, text=True, check=True)
117
  vela_stdout = result.stdout
118
-
119
  # Check for unsupported model patterns in logs
120
  unsupported_patterns = [
121
  "Warning: Unsupported TensorFlow Lite semantics",
@@ -123,104 +105,101 @@ def run_vela_analysis(model_path):
123
  "Neural network macs 0 MACs/batch"
124
  ]
125
  if any(pat in vela_stdout for pat in unsupported_patterns):
126
- return {}, "This model has unsupported layers and needs investigation based on layers."
127
-
128
- # Add model filename to output
129
- model_filename = os.path.basename(model_path)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  if model_filename:
131
  vela_stdout = vela_stdout.replace(
132
  "Network summary for",
133
  f"Network summary for {model_filename} ("
134
  )
135
-
136
- # Extract summary metrics
137
  summary_items = extract_summary_from_log(vela_stdout)
 
138
  summary_dict = dict(summary_items) if summary_items else {}
139
-
140
- # Look for compiled model
141
- compiled_model_path = None
142
- per_layer_csv = None
143
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  for fname in os.listdir(output_dir):
145
- if fname.endswith("_vela.tflite"):
146
  final_path = os.path.join("/tmp", fname)
147
  shutil.copy(os.path.join(output_dir, fname), final_path)
148
- compiled_model_path = final_path
149
- elif fname.endswith("per-layer.csv"):
150
- csv_path = os.path.join("/tmp", fname)
151
- shutil.copy(os.path.join(output_dir, fname), csv_path)
152
- per_layer_csv = csv_path
153
-
154
- return summary_dict, None, compiled_model_path, per_layer_csv
155
-
156
- except subprocess.CalledProcessError as e:
157
- return {}, f"Vela compilation failed: {e.stderr}", None, None
158
- except Exception as e:
159
- return {}, f"Error running Vela: {str(e)}", None, None
 
 
 
 
 
160
  finally:
161
- shutil.rmtree(tmpdir, ignore_errors=True)
162
 
163
- def generate_vela_html(summary_dict, error_msg=None):
164
- """Generate HTML for Vela performance results"""
165
- if error_msg:
166
- return f"""
167
- <div style='background:#fff3f3;border-radius:14px;padding:24px 18px 18px 18px;
168
- max-width:430px;min-width:320px;width:100%;margin:auto;color:#d32f2f;font-family:sans-serif;
169
- font-size:1.1em;text-align:center;font-weight:600;'>
170
- Vela analysis failed: {error_msg}<br>
171
- Showing default values.
172
- </div>
173
- """
174
-
175
- # Helper function to clean operator values
176
- def clean_ops(val):
177
- return val.lstrip("= ").strip() if isinstance(val, str) else val
178
-
179
- # Get values from Vela analysis or use defaults
180
- accel_config = summary_dict.get('Accelerator configuration', 'Ethos_U55_128')
181
- accel_clock = summary_dict.get('Accelerator clock', '400 MHz')
182
- sram_used = summary_dict.get('Total SRAM used', '353.50 KiB')
183
- flash_used = summary_dict.get('Total On-chip Flash used', '3614.39 KiB')
184
- cpu_ops = clean_ops(summary_dict.get('CPU operators', '0 (0.0%)'))
185
- npu_ops = clean_ops(summary_dict.get('NPU operators', '95 (100.0%)'))
186
- inference_time = summary_dict.get('Inference time', '15.14 ms')
187
-
188
- return f"""
189
- <div style='background:#1e1e2f;border-radius:18px;padding:18px 18px 12px 18px;
190
- max-width:430px;min-width:320px;width:100%;margin:auto;color:#eee;font-family:sans-serif;'>
191
- <h3 style='margin-top:0;margin-bottom:12px;font-size:1.35em;color:#00b0ff;text-align:left;'>Estimated Results on SR110</h3>
192
- <div style='display:flex;flex-wrap:wrap;gap:10px;justify-content:center;'>
193
- <!-- Card 1: Accelerator -->
194
- <div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>
195
- <div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>🚀 Accelerator</div>
196
- <div style='margin-bottom:2px;'><span style='color:#ccc;'>Configuration:</span> <span style='color:#fff;font-weight:500'>{accel_config}</span></div>
197
- <div><span style='color:#ccc;'>Accelerator clock:</span> <span style='color:#fff;font-weight:500'>{accel_clock}</span></div>
198
- </div>
199
- <!-- Card 2: Memory Usage -->
200
- <div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>
201
- <div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>💾 Memory Usage</div>
202
- <div style='margin-bottom:2px;'><span style='color:#ccc;'>Total SRAM:</span> <span style='color:#fff;font-weight:500'>{sram_used}</span></div>
203
- <div><span style='color:#ccc;'>Total On-chip Flash:</span> <span style='color:#fff;font-weight:500'>{flash_used}</span></div>
204
- </div>
205
- <!-- Card 3: Operator Distribution -->
206
- <div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>
207
- <div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>📈 Operator Distribution</div>
208
- <div style='margin-bottom:2px;'><span style='color:#ccc;'>CPU Operators:</span> <span style='color:#fff;font-weight:500'>{cpu_ops}</span></div>
209
- <div><span style='color:#ccc;'>NPU Operators:</span> <span style='color:#fff;font-weight:500'>{npu_ops}</span></div>
210
- </div>
211
- <!-- Card 4: Performance -->
212
- <div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>
213
- <div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>⚡ Performance</div>
214
- <div><span style='color:#ccc;'>Inference time:</span> <span style='color:#fff;font-weight:500'>{inference_time}</span></div>
215
- </div>
216
- </div>
217
- </div>
218
- """
219
 
220
  # Run Vela analysis on startup and cache results
221
  print("Running Vela analysis on MobileNetV2 model...")
222
- vela_results, vela_error, compiled_model, per_layer_csv = run_vela_analysis(model_path)
223
- vela_html = generate_vela_html(vela_results, vela_error)
 
 
224
 
225
  def preprocess_image(image):
226
  """
@@ -324,24 +303,41 @@ def load_example_image(example_path):
324
  def compile_uploaded_model(model_file):
325
  """Compile uploaded model with Vela and return results"""
326
  if model_file is None:
327
- error_html = generate_vela_html({}, "No model file uploaded.")
 
 
 
 
 
 
328
  return (
329
  error_html,
330
  gr.update(visible=False, value=None),
331
  gr.update(visible=False, value=None)
332
  )
333
 
334
- # Run Vela analysis on uploaded model
335
- vela_results, vela_error, compiled_model_path, per_layer_csv = run_vela_analysis(model_file)
336
-
337
- # Generate results HTML
338
- results_html = generate_vela_html(vela_results, vela_error)
339
-
340
- return (
341
- results_html,
342
- gr.update(visible=compiled_model_path is not None, value=compiled_model_path),
343
- gr.update(visible=per_layer_csv is not None, value=per_layer_csv)
344
- )
 
 
 
 
 
 
 
 
 
 
 
345
 
346
  # Create Gradio interface
347
  with gr.Blocks(
 
41
  # Force rebuild with modern design
42
  print(f"Repository: {MODEL_REPO}")
43
 
44
+ # Vela config file is now copied from SR app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  def extract_summary_from_log(log_text):
47
  summary_keys = [
 
64
  summary.append((key, value))
65
  return summary
66
 
67
+ def run_vela(model_file):
 
68
  accel = "ethos-u55-128"
69
  optimise = "Size"
70
  mem_mode = "Sram_Only"
71
  sys_config = "Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.05_GBs"
72
  tmpdir = tempfile.mkdtemp()
 
73
  try:
74
  # Use the original uploaded model filename
75
+ original_model_name = os.path.basename(model_file)
76
+ model_path = os.path.join(tmpdir, original_model_name)
77
+ shutil.copy(model_file, model_path)
78
+
 
79
  config_path = os.path.join(tmpdir, DEFAULT_CONFIG)
80
  shutil.copy(DEFAULT_CONFIG, config_path)
81
+
82
  output_dir = os.path.join(tmpdir, "vela_out")
83
  os.makedirs(output_dir, exist_ok=True)
84
+
85
  cmd = [
86
  "vela",
87
  f"--accelerator-config={accel}",
 
89
  f"--config={config_path}",
90
  f"--memory-mode={mem_mode}",
91
  f"--system-config={sys_config}",
92
+ model_path,
93
  "--verbose-cycle-estimate",
94
  "--verbose-performance",
95
  f"--output-dir={output_dir}"
96
  ]
97
+
98
  result = subprocess.run(cmd, capture_output=True, text=True, check=True)
99
  vela_stdout = result.stdout
100
+
101
  # Check for unsupported model patterns in logs
102
  unsupported_patterns = [
103
  "Warning: Unsupported TensorFlow Lite semantics",
 
105
  "Neural network macs 0 MACs/batch"
106
  ]
107
  if any(pat in vela_stdout for pat in unsupported_patterns):
108
+ summary_html = (
109
+ "<div style='background:#fff3f3;border-radius:14px;padding:24px 18px 18px 18px;"
110
+ "max-width:430px;min-width:320px;width:100%;margin:auto;color:#d32f2f;font-family:sans-serif;"
111
+ "font-size:1.1em;text-align:left;font-weight:600;'>"
112
+ "This model has unsupported layers and needs investigation based on layers.<br>"
113
+ "Please use Vela compiler on your Host Machine for further analysis."
114
+ "</div>"
115
+ )
116
+ # Try to provide per-layer.csv if available for download
117
+ per_layer_csv = None
118
+ for log_fname in os.listdir(output_dir):
119
+ if log_fname.endswith("per-layer.csv"):
120
+ per_layer_csv = os.path.join("/tmp", log_fname)
121
+ shutil.copy(os.path.join(output_dir, log_fname), per_layer_csv)
122
+ break
123
+ return summary_html, None, per_layer_csv
124
+
125
+ model_filename = os.path.basename(model_file)
126
  if model_filename:
127
  vela_stdout = vela_stdout.replace(
128
  "Network summary for",
129
  f"Network summary for {model_filename} ("
130
  )
131
+
 
132
  summary_items = extract_summary_from_log(vela_stdout)
133
+ # Convert summary_items to dict for easy access
134
  summary_dict = dict(summary_items) if summary_items else {}
135
+
136
+ # Build 4 cards for results
137
+ def clean_ops(val):
138
+ # Remove '=' and leading/trailing spaces
139
+ return val.lstrip("= ").strip() if isinstance(val, str) else val
140
+
141
+ summary_html = (
142
+ "<div style='background:#1e1e2f;border-radius:18px;padding:18px 18px 12px 18px;"
143
+ "max-width:430px;min-width:320px;width:100%;margin:auto;color:#eee;font-family:sans-serif;'>"
144
+ "<h3 style='margin-top:0;margin-bottom:12px;font-size:1.35em;color:#00b0ff;text-align:left;'>Estimated Results on SR110</h3>"
145
+ "<div style='display:flex;flex-wrap:wrap;gap:10px;justify-content:center;'>"
146
+ # Card 1: Accelerator
147
+ "<div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
148
+ "<div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>🚀 Accelerator</div>"
149
+ f"<div style='margin-bottom:2px;'><span style='color:#ccc;'>Configuration:</span> <span style='color:#fff;font-weight:500'>{summary_dict.get('Accelerator configuration','-')}</span></div>"
150
+ f"<div><span style='color:#ccc;'>Accelerator clock:</span> <span style='color:#fff;font-weight:500'>{summary_dict.get('Accelerator clock','-')}</span></div>"
151
+ "</div>"
152
+ # Card 2: Memory Usage
153
+ "<div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
154
+ "<div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>💾 Memory Usage</div>"
155
+ f"<div style='margin-bottom:2px;'><span style='color:#ccc;'>Total SRAM:</span> <span style='color:#fff;font-weight:500'>{summary_dict.get('Total SRAM used','-')}</span></div>"
156
+ f"<div><span style='color:#ccc;'>Total On-chip Flash:</span> <span style='color:#fff;font-weight:500'>{summary_dict.get('Total On-chip Flash used','-')}</span></div>"
157
+ "</div>"
158
+ # Card 3: Operator Distribution
159
+ "<div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
160
+ "<div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>📈 Operator Distribution</div>"
161
+ f"<div style='margin-bottom:2px;'><span style='color:#ccc;'>CPU Operators:</span> <span style='color:#fff;font-weight:500'>{clean_ops(summary_dict.get('CPU operators','-'))}</span></div>"
162
+ f"<div><span style='color:#ccc;'>NPU Operators:</span> <span style='color:#fff;font-weight:500'>{clean_ops(summary_dict.get('NPU operators','-'))}</span></div>"
163
+ "</div>"
164
+ # Card 4: Performance
165
+ "<div style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
166
+ "<div style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>⚡ Performance</div>"
167
+ f"<div><span style='color:#ccc;'>Inference time:</span> <span style='color:#fff;font-weight:500'>{summary_dict.get('Inference time','-')}</span></div>"
168
+ "</div>"
169
+ "</div></div>"
170
+ ) if summary_items else "<div style='color:red'>Summary info not found in log.</div>"
171
+
172
  for fname in os.listdir(output_dir):
173
+ if fname.endswith("vela.tflite"):
174
  final_path = os.path.join("/tmp", fname)
175
  shutil.copy(os.path.join(output_dir, fname), final_path)
176
+ # Find per-layer.csv file for logs
177
+ per_layer_csv = None
178
+ for log_fname in os.listdir(output_dir):
179
+ if log_fname.endswith("per-layer.csv"):
180
+ per_layer_csv = os.path.join("/tmp", log_fname)
181
+ shutil.copy(os.path.join(output_dir, log_fname), per_layer_csv)
182
+ break
183
+ return summary_html, final_path, per_layer_csv
184
+
185
+ # If no tflite, still try to return per-layer.csv if present
186
+ per_layer_csv = None
187
+ for log_fname in os.listdir(output_dir):
188
+ if log_fname.endswith("per-layer.csv"):
189
+ per_layer_csv = os.path.join("/tmp", log_fname)
190
+ shutil.copy(os.path.join(output_dir, log_fname), per_layer_csv)
191
+ break
192
+ return summary_html, None, per_layer_csv
193
  finally:
194
+ shutil.rmtree(tmpdir)
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
197
  # Run Vela analysis on startup and cache results
198
  print("Running Vela analysis on MobileNetV2 model...")
199
+ try:
200
+ vela_html, compiled_model, per_layer_csv = run_vela(model_path)
201
+ except Exception as e:
202
+ vela_html = f"<div style='color:red'>Vela analysis failed: {str(e)}</div>"
203
 
204
  def preprocess_image(image):
205
  """
 
303
  def compile_uploaded_model(model_file):
304
  """Compile uploaded model with Vela and return results"""
305
  if model_file is None:
306
+ error_html = (
307
+ "<div style='background:#fff3f3;border-radius:14px;padding:24px 18px 18px 18px;"
308
+ "max-width:430px;min-width:320px;width:100%;margin:auto;color:#d32f2f;font-family:sans-serif;"
309
+ "font-size:1.1em;text-align:center;font-weight:600;'>"
310
+ "No model file uploaded."
311
+ "</div>"
312
+ )
313
  return (
314
  error_html,
315
  gr.update(visible=False, value=None),
316
  gr.update(visible=False, value=None)
317
  )
318
 
319
+ try:
320
+ # Run Vela analysis on uploaded model
321
+ results_html, compiled_model_path, per_layer_csv = run_vela(model_file)
322
+
323
+ return (
324
+ results_html,
325
+ gr.update(visible=compiled_model_path is not None, value=compiled_model_path),
326
+ gr.update(visible=per_layer_csv is not None, value=per_layer_csv)
327
+ )
328
+ except Exception as e:
329
+ error_html = (
330
+ "<div style='background:#fff3f3;border-radius:14px;padding:24px 18px 18px 18px;"
331
+ "max-width:430px;min-width:320px;width:100%;margin:auto;color:#d32f2f;font-family:sans-serif;"
332
+ "font-size:1.1em;text-align:center;font-weight:600;'>"
333
+ f"Vela compilation failed: {str(e)}"
334
+ "</div>"
335
+ )
336
+ return (
337
+ error_html,
338
+ gr.update(visible=False, value=None),
339
+ gr.update(visible=False, value=None)
340
+ )
341
 
342
  # Create Gradio interface
343
  with gr.Blocks(
u55_eval_with_TA_config_400_and_200_MHz.ini ADDED
@@ -0,0 +1,565 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ; Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved.
2
+ ;
3
+ ; SPDX-License-Identifier: Apache-2.0
4
+ ;
5
+ ; Licensed under the Apache License, Version 2.0 (the License); you may
6
+ ; not use this file except in compliance with the License.
7
+ ; You may obtain a copy of the License at
8
+ ;
9
+ ; www.apache.org/licenses/LICENSE-2.0
10
+ ;
11
+ ; Unless required by applicable law or agreed to in writing, software
12
+ ; distributed under the License is distributed on an AS IS BASIS, WITHOUT
13
+ ; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ; See the License for the specific language governing permissions and
15
+ ; limitations under the License.
16
+
17
+ ; -----------------------------------------------------------------------------
18
+ ; Vela configuration file
19
+
20
+ ; -----------------------------------------------------------------------------
21
+ ; System Configuration
22
+
23
+
24
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (3.2 GB/s)
25
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_3.2_GBs]
26
+ core_clock=400e6
27
+ axi0_port=Sram
28
+ axi1_port=OffChipFlash
29
+ Sram_clock_scale=1.0
30
+ Sram_burst_length=32
31
+ Sram_read_latency=8
32
+ Sram_write_latency=8
33
+ OffChipFlash_clock_scale=1.0
34
+ OffChipFlash_burst_length=128
35
+ OffChipFlash_read_latency=12
36
+ OffChipFlash_write_latency=12
37
+
38
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
39
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
40
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
41
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
42
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
43
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
44
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
45
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
46
+
47
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
48
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
49
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
50
+ ;set(TA1_RLATENCY "12" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
51
+ ;set(TA1_WLATENCY "12" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
52
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
53
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
54
+ ;set(TA1_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
55
+
56
+
57
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (1.6 GB/s)
58
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_1.6_GBs]
59
+ core_clock=400e6
60
+ axi0_port=Sram
61
+ axi1_port=OffChipFlash
62
+ Sram_clock_scale=1.0
63
+ Sram_burst_length=32
64
+ Sram_read_latency=8
65
+ Sram_write_latency=8
66
+ OffChipFlash_clock_scale=0.5
67
+ OffChipFlash_burst_length=128
68
+ OffChipFlash_read_latency=15
69
+ OffChipFlash_write_latency=15
70
+
71
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
72
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
73
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
74
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
75
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
76
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
77
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
78
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
79
+
80
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
81
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
82
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
83
+ ;set(TA1_RLATENCY "15" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
84
+ ;set(TA1_WLATENCY "15" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
85
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
86
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
87
+ ;set(TA1_BWCAP "2000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
88
+
89
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (0.8 GB/s)
90
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.8_GBs]
91
+ core_clock=400e6
92
+ axi0_port=Sram
93
+ axi1_port=OffChipFlash
94
+ Sram_clock_scale=1.0
95
+ Sram_burst_length=32
96
+ Sram_read_latency=8
97
+ Sram_write_latency=8
98
+ OffChipFlash_clock_scale=0.25
99
+ OffChipFlash_burst_length=128
100
+ OffChipFlash_read_latency=18
101
+ OffChipFlash_write_latency=18
102
+
103
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
104
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
105
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
106
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
107
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
108
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
109
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
110
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
111
+
112
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
113
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
114
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
115
+ ;set(TA1_RLATENCY "18" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
116
+ ;set(TA1_WLATENCY "18" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
117
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
118
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
119
+ ;set(TA1_BWCAP "1000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
120
+
121
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (0.4 GB/s)
122
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.4_GBs]
123
+ core_clock=400e6
124
+ axi0_port=Sram
125
+ axi1_port=OffChipFlash
126
+ Sram_clock_scale=1.0
127
+ Sram_burst_length=32
128
+ Sram_read_latency=8
129
+ Sram_write_latency=8
130
+ OffChipFlash_clock_scale=0.125
131
+ OffChipFlash_burst_length=128
132
+ OffChipFlash_read_latency=24
133
+ OffChipFlash_write_latency=24
134
+
135
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
136
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
137
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
138
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
139
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
140
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
141
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
142
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
143
+
144
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
145
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
146
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
147
+ ;set(TA1_RLATENCY "24" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
148
+ ;set(TA1_WLATENCY "24" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
149
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
150
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
151
+ ;set(TA1_BWCAP "500" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
152
+
153
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (0.2 GB/s)
154
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.2_GBs]
155
+ core_clock=400e6
156
+ axi0_port=Sram
157
+ axi1_port=OffChipFlash
158
+ Sram_clock_scale=1.0
159
+ Sram_burst_length=32
160
+ Sram_read_latency=8
161
+ Sram_write_latency=8
162
+ OffChipFlash_clock_scale=0.0625
163
+ OffChipFlash_burst_length=128
164
+ OffChipFlash_read_latency=36
165
+ OffChipFlash_write_latency=36
166
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
167
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
168
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
169
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
170
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
171
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
172
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
173
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
174
+
175
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
176
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
177
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
178
+ ;set(TA1_RLATENCY "36" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
179
+ ;set(TA1_WLATENCY "36" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
180
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
181
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
182
+ ;set(TA1_BWCAP "250" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
183
+
184
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (0.1 GB/s)
185
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.1_GBs]
186
+ core_clock=400e6
187
+ axi0_port=Sram
188
+ axi1_port=OffChipFlash
189
+ Sram_clock_scale=1.0
190
+ Sram_burst_length=32
191
+ Sram_read_latency=8
192
+ Sram_write_latency=8
193
+ OffChipFlash_clock_scale=0.0312
194
+ OffChipFlash_burst_length=128
195
+ OffChipFlash_read_latency=60
196
+ OffChipFlash_write_latency=60
197
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
198
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
199
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
200
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
201
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
202
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
203
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
204
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
205
+
206
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
207
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
208
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
209
+ ;set(TA1_RLATENCY "60" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
210
+ ;set(TA1_WLATENCY "60" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
211
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
212
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
213
+ ;set(TA1_BWCAP "125" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
214
+
215
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (0.05 GB/s)
216
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.05_GBs]
217
+ core_clock=400e6
218
+ axi0_port=Sram
219
+ axi1_port=OffChipFlash
220
+ Sram_clock_scale=1.0
221
+ Sram_burst_length=32
222
+ Sram_read_latency=8
223
+ Sram_write_latency=8
224
+ OffChipFlash_clock_scale=0.0156
225
+ OffChipFlash_burst_length=128
226
+ OffChipFlash_read_latency=108
227
+ OffChipFlash_write_latency=108
228
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
229
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
230
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
231
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
232
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
233
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
234
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
235
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
236
+
237
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
238
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
239
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
240
+ ;set(TA1_RLATENCY "108" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
241
+ ;set(TA1_WLATENCY "108" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
242
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
243
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
244
+ ;set(TA1_BWCAP "62" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
245
+
246
+ ;Ethos-U55 : 400 MHz, SRAM (3.2 GB/s) and Flash (0.025 GB/s)
247
+ [System_Config.Ethos_U55_400MHz_SRAM_3.2_GBs_Flash_0.025_GBs]
248
+ core_clock=400e6
249
+ axi0_port=Sram
250
+ axi1_port=OffChipFlash
251
+ Sram_clock_scale=1.0
252
+ Sram_burst_length=32
253
+ Sram_read_latency=8
254
+ Sram_write_latency=8
255
+ OffChipFlash_clock_scale=0.0078
256
+ OffChipFlash_burst_length=128
257
+ OffChipFlash_read_latency=204
258
+ OffChipFlash_write_latency=204
259
+
260
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
261
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
262
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
263
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
264
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
265
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
266
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
267
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
268
+
269
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
270
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
271
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
272
+ ;set(TA1_RLATENCY "204" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
273
+ ;set(TA1_WLATENCY "204" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
274
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
275
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
276
+ ;set(TA1_BWCAP "31" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
277
+
278
+
279
+
280
+
281
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (1.6 GB/s)
282
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_1.6_GBs]
283
+ core_clock=200e6
284
+ axi0_port=Sram
285
+ axi1_port=OffChipFlash
286
+ Sram_clock_scale=1.0
287
+ Sram_burst_length=32
288
+ Sram_read_latency=8
289
+ Sram_write_latency=8
290
+ OffChipFlash_clock_scale=1.0
291
+ OffChipFlash_burst_length=128
292
+ OffChipFlash_read_latency=12
293
+ OffChipFlash_write_latency=12
294
+
295
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
296
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
297
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
298
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
299
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
300
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
301
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
302
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
303
+
304
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
305
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
306
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
307
+ ;set(TA1_RLATENCY "12" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
308
+ ;set(TA1_WLATENCY "12" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
309
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
310
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
311
+ ;set(TA1_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
312
+
313
+
314
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (0.8 GB/s)
315
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_0.8_GBs]
316
+ core_clock=200e6
317
+ axi0_port=Sram
318
+ axi1_port=OffChipFlash
319
+ Sram_clock_scale=1.0
320
+ Sram_burst_length=32
321
+ Sram_read_latency=8
322
+ Sram_write_latency=8
323
+ OffChipFlash_clock_scale=0.5
324
+ OffChipFlash_burst_length=128
325
+ OffChipFlash_read_latency=15
326
+ OffChipFlash_write_latency=15
327
+
328
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
329
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
330
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
331
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
332
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
333
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
334
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
335
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
336
+
337
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
338
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
339
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
340
+ ;set(TA1_RLATENCY "15" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
341
+ ;set(TA1_WLATENCY "15" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
342
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
343
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
344
+ ;set(TA1_BWCAP "2000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
345
+
346
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (0.4 GB/s)
347
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_0.4_GBs]
348
+ core_clock=200e6
349
+ axi0_port=Sram
350
+ axi1_port=OffChipFlash
351
+ Sram_clock_scale=1.0
352
+ Sram_burst_length=32
353
+ Sram_read_latency=8
354
+ Sram_write_latency=8
355
+ OffChipFlash_clock_scale=0.25
356
+ OffChipFlash_burst_length=128
357
+ OffChipFlash_read_latency=18
358
+ OffChipFlash_write_latency=18
359
+
360
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
361
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
362
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
363
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
364
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
365
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
366
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
367
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
368
+
369
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
370
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
371
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
372
+ ;set(TA1_RLATENCY "18" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
373
+ ;set(TA1_WLATENCY "18" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
374
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
375
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
376
+ ;set(TA1_BWCAP "1000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
377
+
378
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (0.2 GB/s)
379
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_0.2_GBs]
380
+ core_clock=200e6
381
+ axi0_port=Sram
382
+ axi1_port=OffChipFlash
383
+ Sram_clock_scale=1.0
384
+ Sram_burst_length=32
385
+ Sram_read_latency=8
386
+ Sram_write_latency=8
387
+ OffChipFlash_clock_scale=0.125
388
+ OffChipFlash_burst_length=128
389
+ OffChipFlash_read_latency=24
390
+ OffChipFlash_write_latency=24
391
+
392
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
393
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
394
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
395
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
396
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
397
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
398
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
399
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
400
+
401
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
402
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
403
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
404
+ ;set(TA1_RLATENCY "24" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
405
+ ;set(TA1_WLATENCY "24" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
406
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
407
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
408
+ ;set(TA1_BWCAP "500" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
409
+
410
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (0.1 GB/s)
411
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_0.1_GBs]
412
+ core_clock=200e6
413
+ axi0_port=Sram
414
+ axi1_port=OffChipFlash
415
+ Sram_clock_scale=1.0
416
+ Sram_burst_length=32
417
+ Sram_read_latency=8
418
+ Sram_write_latency=8
419
+ OffChipFlash_clock_scale=0.0625
420
+ OffChipFlash_burst_length=128
421
+ OffChipFlash_read_latency=36
422
+ OffChipFlash_write_latency=36
423
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
424
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
425
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
426
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
427
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
428
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
429
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
430
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
431
+
432
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
433
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
434
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
435
+ ;set(TA1_RLATENCY "36" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
436
+ ;set(TA1_WLATENCY "36" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
437
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
438
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
439
+ ;set(TA1_BWCAP "250" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
440
+
441
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (0.05 GB/s)
442
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_0.05_GBs]
443
+ core_clock=200e6
444
+ axi0_port=Sram
445
+ axi1_port=OffChipFlash
446
+ Sram_clock_scale=1.0
447
+ Sram_burst_length=32
448
+ Sram_read_latency=8
449
+ Sram_write_latency=8
450
+ OffChipFlash_clock_scale=0.0312
451
+ OffChipFlash_burst_length=128
452
+ OffChipFlash_read_latency=60
453
+ OffChipFlash_write_latency=60
454
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
455
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
456
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
457
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
458
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
459
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
460
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
461
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
462
+
463
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
464
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
465
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
466
+ ;set(TA1_RLATENCY "60" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
467
+ ;set(TA1_WLATENCY "60" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
468
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
469
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
470
+ ;set(TA1_BWCAP "125" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
471
+
472
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (0.025 GB/s)
473
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_0.025_GBs]
474
+ core_clock=200e6
475
+ axi0_port=Sram
476
+ axi1_port=OffChipFlash
477
+ Sram_clock_scale=1.0
478
+ Sram_burst_length=32
479
+ Sram_read_latency=8
480
+ Sram_write_latency=8
481
+ OffChipFlash_clock_scale=0.0156
482
+ OffChipFlash_burst_length=128
483
+ OffChipFlash_read_latency=108
484
+ OffChipFlash_write_latency=108
485
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
486
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
487
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
488
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
489
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
490
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
491
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
492
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
493
+
494
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
495
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
496
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
497
+ ;set(TA1_RLATENCY "108" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
498
+ ;set(TA1_WLATENCY "108" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
499
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
500
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
501
+ ;set(TA1_BWCAP "62" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
502
+
503
+ ;Ethos-U55 : 200 MHz, SRAM (1.6 GB/s) and Flash (0.0125 GB/s)
504
+ [System_Config.Ethos_U55_200MHz_SRAM_1.6_GBs_Flash_0.0125_GBs]
505
+ core_clock=200e6
506
+ axi0_port=Sram
507
+ axi1_port=OffChipFlash
508
+ Sram_clock_scale=1.0
509
+ Sram_burst_length=32
510
+ Sram_read_latency=8
511
+ Sram_write_latency=8
512
+ OffChipFlash_clock_scale=0.0078
513
+ OffChipFlash_burst_length=128
514
+ OffChipFlash_read_latency=204
515
+ OffChipFlash_write_latency=204
516
+
517
+ ;set(TA0_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
518
+ ;set(TA0_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
519
+ ;set(TA0_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
520
+ ;set(TA0_RLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
521
+ ;set(TA0_WLATENCY "8" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
522
+ ;set(TA0_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
523
+ ;set(TA0_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
524
+ ;set(TA0_BWCAP "4000" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
525
+
526
+ ;set(TA1_MAXR "4" CACHE STRING "6-bit field. Max no. of pending reads. 0=infinite")
527
+ ;set(TA1_MAXW "4" CACHE STRING "6-bit field. Max no. of pending writes. 0=infinite")
528
+ ;set(TA1_MAXRW "0" CACHE STRING "6-bit field. Max no. of pending reads+writes. 0=infinite")
529
+ ;set(TA1_RLATENCY "204" CACHE STRING "12-bit field. Minimum latency (clock cycles) from AVALID to RVALID.")
530
+ ;set(TA1_WLATENCY "204" CACHE STRING "12-bit field. Minimum latency (clock cycles) from WVALID&WLAST to BVALID.")
531
+ ;set(TA1_PULSE_ON "3999" CACHE STRING "No. of cycles addresses let through (0-65535).")
532
+ ;set(TA1_PULSE_OFF "1" CACHE STRING "No. of cycles addresses blocked (0-65535).")
533
+ ;set(TA1_BWCAP "31" CACHE STRING "16-bit field. Max no. of 64-bit words transfered per pulse cycle 0=infinite")
534
+
535
+
536
+
537
+ ; -----------------------------------------------------------------------------
538
+ ; Memory Mode
539
+
540
+ ; SRAM Only: only one AXI port is used and the SRAM is used for all storage
541
+ [Memory_Mode.Sram_Only]
542
+ const_mem_area=Axi0
543
+ arena_mem_area=Axi0
544
+ cache_mem_area=Axi0
545
+
546
+ ; Shared SRAM: the SRAM is shared between the Ethos-U and the Cortex-M software
547
+ ; The non-SRAM memory is assumed to be read-only
548
+ [Memory_Mode.Shared_Sram]
549
+ const_mem_area=Axi1
550
+ arena_mem_area=Axi0
551
+ cache_mem_area=Axi0
552
+
553
+ ; Dedicated SRAM: the SRAM (384KB) is only for use by the Ethos-U
554
+ ; The non-SRAM memory is assumed to be read-writeable
555
+ [Memory_Mode.Dedicated_Sram]
556
+ const_mem_area=Axi1
557
+ arena_mem_area=Axi1
558
+ cache_mem_area=Axi0
559
+ arena_cache_size=393216
560
+
561
+ ; Dedicated SRAM 512KB: the SRAM (512KB) is only for use by the Ethos-U
562
+ ; The non-SRAM memory is assumed to be read-writeable
563
+ [Memory_Mode.Dedicated_Sram_512KB]
564
+ inherit=Memory_Mode.Dedicated_Sram
565
+ arena_cache_size=524288