Jahnavibh commited on
Commit
1883df1
·
1 Parent(s): 924a45a

Transform WakeWord app with MobileNet UI/UX design and add SR Vela integration

Browse files

- Apply same modern card-based UI as MobileNet demo
- Add real-time SR110 Vela compiler integration
- Include model upload functionality with compile and download features
- Add CSS overrides to preserve SR110 results colors
- Enhance keyword display with visual grid layout
- Maintain original DSCNN functionality with improved interface

app.py CHANGED
@@ -4,9 +4,16 @@ import librosa
4
  import tensorflow as tf
5
  from scipy.fftpack import dct
6
  import os
 
 
 
 
 
 
7
 
8
  # DSCNN model configuration
9
  MODEL_PATH = "ds_cnn_l_quantized.tflite"
 
10
 
11
  # Keywords based on Speech Commands dataset (12 classes)
12
  KEYWORDS = [
@@ -35,6 +42,164 @@ except Exception as e:
35
  print(f"❌ Error loading DSCNN model: {e}")
36
  interpreter = None
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  def extract_mfcc_features(audio_path, target_length=490):
39
  """
40
  Extract MFCC features exactly as specified in the original DSCNN paper.
@@ -167,7 +332,7 @@ def classify_audio(audio_input):
167
  confidence = pred['score'] * 100
168
  label = pred['label']
169
  indicator = "🎯" if i == 0 else " "
170
- results.append(f"{indicator} {i+1}. {label}: {confidence:.1f}%")
171
 
172
  return "\n".join(results)
173
 
@@ -180,28 +345,390 @@ def classify_audio(audio_input):
180
  else:
181
  return f"❌ Error processing audio: {error_msg}\n\nTip: Try recording a clear 1-second word like 'yes' or 'stop'."
182
 
183
- # Create the Gradio interface
184
- demo = gr.Interface(
185
- fn=classify_audio,
186
- inputs=gr.Audio(sources=["microphone", "upload"], type="filepath", label="Record or Upload Audio"),
187
- outputs=gr.Textbox(label="DSCNN Keyword Predictions", lines=8),
188
- title="🎤 DSCNN Wake Word Detection Demo",
189
- description="""
190
- **Advanced wake word detection using Depthwise Separable CNN (DSCNN)**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
- This demo uses a quantized DSCNN model optimized for edge deployment. Upload audio or record directly to test keyword recognition.
 
 
 
 
193
 
194
- **Supported Keywords:** yes, no, up, down, left, right, on, off, stop, go, silence, unknown
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
 
196
- **Model Details:**
197
- - Architecture: Depthwise Separable CNN (DSCNN)
198
- - Quantization: INT8 (504KB model size)
199
- - Accuracy: 94.5% on Google Speech Commands
200
- - Input: MFCC features (1×490)
201
- - Optimized for: ARM Cortex-M, embedded systems
202
- """
203
- )
 
 
 
 
 
 
 
 
 
 
 
 
204
 
205
  # Launch the demo
206
  if __name__ == "__main__":
207
- demo.launch(share=True)
 
4
  import tensorflow as tf
5
  from scipy.fftpack import dct
6
  import os
7
+ import tempfile
8
+ import shutil
9
+ import subprocess
10
+ import re
11
+ import requests
12
+ from io import BytesIO
13
 
14
  # DSCNN model configuration
15
  MODEL_PATH = "ds_cnn_l_quantized.tflite"
16
+ DEFAULT_CONFIG = "u55_eval_with_TA_config_400_and_200_MHz.ini"
17
 
18
  # Keywords based on Speech Commands dataset (12 classes)
19
  KEYWORDS = [
 
42
  print(f"❌ Error loading DSCNN model: {e}")
43
  interpreter = None
44
 
45
+ # Vela config file is copied from SR app
46
+ def extract_summary_from_log(log_text):
47
+ summary_keys = [
48
+ "Accelerator configuration",
49
+ "Accelerator clock",
50
+ "Total SRAM used",
51
+ "Total On-chip Flash used",
52
+ "CPU operators",
53
+ "NPU operators",
54
+ "Batch Inference time"
55
+ ]
56
+ summary = []
57
+ for key in summary_keys:
58
+ match = re.search(rf"{re.escape(key)}\s+(.+)", log_text)
59
+ if match:
60
+ value = match.group(1).strip()
61
+ if key == "Batch Inference time":
62
+ value = value.split(",")[0].strip()
63
+ key = "Inference time"
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}",
88
+ f"--optimise={optimise}",
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",
104
+ "Network Tops/s nan Tops/s",
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 class='sr110-results' 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 class='sr110-results' 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 class='sr110-title' 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 class='sr110-card' style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
148
+ "<div class='sr110-title' style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>🚀 Accelerator</div>"
149
+ f"<div style='margin-bottom:2px;'><span class='sr110-label' style='color:#ccc;'>Configuration:</span> <span class='sr110-value' style='color:#fff;font-weight:500'>{summary_dict.get('Accelerator configuration','-')}</span></div>"
150
+ f"<div><span class='sr110-label' style='color:#ccc;'>Accelerator clock:</span> <span class='sr110-value' style='color:#fff;font-weight:500'>{summary_dict.get('Accelerator clock','-')}</span></div>"
151
+ "</div>"
152
+ # Card 2: Memory Usage
153
+ "<div class='sr110-card' style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
154
+ "<div class='sr110-title' style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>💾 Memory Usage</div>"
155
+ f"<div style='margin-bottom:2px;'><span class='sr110-label' style='color:#ccc;'>Total SRAM:</span> <span class='sr110-value' style='color:#fff;font-weight:500'>{summary_dict.get('Total SRAM used','-')}</span></div>"
156
+ f"<div><span class='sr110-label' style='color:#ccc;'>Total On-chip Flash:</span> <span class='sr110-value' 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 class='sr110-card' style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
160
+ "<div class='sr110-title' style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>📈 Operator Distribution</div>"
161
+ f"<div style='margin-bottom:2px;'><span class='sr110-label' style='color:#ccc;'>CPU Operators:</span> <span class='sr110-value' style='color:#fff;font-weight:500'>{clean_ops(summary_dict.get('CPU operators','-'))}</span></div>"
162
+ f"<div><span class='sr110-label' style='color:#ccc;'>NPU Operators:</span> <span class='sr110-value' style='color:#fff;font-weight:500'>{clean_ops(summary_dict.get('NPU operators','-'))}</span></div>"
163
+ "</div>"
164
+ # Card 4: Performance
165
+ "<div class='sr110-card' style='flex:1 1 170px;min-width:170px;max-width:180px;background:#23233a;border-radius:12px;padding:10px 10px 8px 10px;'>"
166
+ "<div class='sr110-title' style='font-size:1em;font-weight:520;margin-bottom:6px;color:#00b0ff;'>⚡ Performance</div>"
167
+ f"<div><span class='sr110-label' style='color:#ccc;'>Inference time:</span> <span class='sr110-value' 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
+ # Run Vela analysis on startup and cache results
197
+ print("Running Vela analysis on DSCNN model...")
198
+ try:
199
+ vela_html, compiled_model, per_layer_csv = run_vela(MODEL_PATH)
200
+ except Exception as e:
201
+ vela_html = f"<div style='color:red'>Vela analysis failed: {str(e)}</div>"
202
+
203
  def extract_mfcc_features(audio_path, target_length=490):
204
  """
205
  Extract MFCC features exactly as specified in the original DSCNN paper.
 
332
  confidence = pred['score'] * 100
333
  label = pred['label']
334
  indicator = "🎯" if i == 0 else " "
335
+ results.append(f"{indicator} {i+1}. **{label}**: {confidence:.1f}%")
336
 
337
  return "\n".join(results)
338
 
 
345
  else:
346
  return f"❌ Error processing audio: {error_msg}\n\nTip: Try recording a clear 1-second word like 'yes' or 'stop'."
347
 
348
+ def load_example_audio(example_name):
349
+ """Load example audio for demonstration."""
350
+ # This would load pre-recorded examples if available
351
+ return None
352
+
353
+ def compile_uploaded_model(model_file):
354
+ """Compile uploaded model with Vela and return results"""
355
+ if model_file is None:
356
+ error_html = (
357
+ "<div class='sr110-results' style='background:#fff3f3;border-radius:14px;padding:24px 18px 18px 18px;"
358
+ "max-width:430px;min-width:320px;width:100%;margin:auto;color:#d32f2f;font-family:sans-serif;"
359
+ "font-size:1.1em;text-align:center;font-weight:600;'>"
360
+ "No model file uploaded."
361
+ "</div>"
362
+ )
363
+ return (
364
+ error_html,
365
+ gr.update(visible=False, value=None),
366
+ gr.update(visible=False, value=None)
367
+ )
368
+
369
+ try:
370
+ # Run Vela analysis on uploaded model
371
+ results_html, compiled_model_path, per_layer_csv = run_vela(model_file)
372
+
373
+ return (
374
+ results_html,
375
+ gr.update(visible=compiled_model_path is not None, value=compiled_model_path),
376
+ gr.update(visible=per_layer_csv is not None, value=per_layer_csv)
377
+ )
378
+ except Exception as e:
379
+ error_html = (
380
+ "<div class='sr110-results' style='background:#fff3f3;border-radius:14px;padding:24px 18px 18px 18px;"
381
+ "max-width:430px;min-width:320px;width:100%;margin:auto;color:#d32f2f;font-family:sans-serif;"
382
+ "font-size:1.1em;text-align:center;font-weight:600;'>"
383
+ f"Vela compilation failed: {str(e)}"
384
+ "</div>"
385
+ )
386
+ return (
387
+ error_html,
388
+ gr.update(visible=False, value=None),
389
+ gr.update(visible=False, value=None)
390
+ )
391
+
392
+ # Create Gradio interface
393
+ with gr.Blocks(
394
+ theme=gr.themes.Default(),
395
+ title="DSCNN Wake Word Detection",
396
+ css="""
397
+ body {
398
+ background: #fafafa !important;
399
+ }
400
+ .gradio-container {
401
+ max-width: 1200px !important;
402
+ margin-left: auto !important;
403
+ margin-right: auto !important;
404
+ background-color: #fafafa !important;
405
+ font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif !important;
406
+ }
407
+ .gr-row {
408
+ display: flex !important;
409
+ justify-content: center !important;
410
+ align-items: flex-start !important;
411
+ gap: 48px !important;
412
+ }
413
+ .gr-column {
414
+ align-items: flex-start !important;
415
+ justify-content: flex-start !important;
416
+ }
417
+ .fixed-upload-box {
418
+ width: 100% !important;
419
+ max-width: 420px !important;
420
+ margin-bottom: 18px !important;
421
+ }
422
+ .download-btn-custom, .compile-btn-custom {
423
+ width: 100% !important;
424
+ margin-bottom: 18px !important;
425
+ }
426
+ .upload-file-box .w-full, .download-file-box .w-full {
427
+ height: 120px !important;
428
+ background: #232b36 !important;
429
+ border-radius: 8px !important;
430
+ color: #fff !important;
431
+ font-weight: 600 !important;
432
+ font-size: 1.1em !important;
433
+ box-shadow: none !important;
434
+ display: flex !important;
435
+ align-items: center !important;
436
+ justify-content: center !important;
437
+ }
438
+ .upload-file-box .w-full .file-preview {
439
+ margin: 0 auto !important;
440
+ text-align: center !important;
441
+ width: 100%;
442
+ }
443
+ #run-vela-btn, .compile-btn, .compile-btn-custom {
444
+ background-color: #007dc3 !important;
445
+ color: white !important;
446
+ font-size: 1.1em;
447
+ border-radius: 8px;
448
+ margin-top: 12px;
449
+ margin-bottom: 18px;
450
+ text-align: center;
451
+ height: 40px !important;
452
+ }
453
+ .results-summary-box, #results-summary {
454
+ margin-left: 0 !important;
455
+ }
456
+ h1, h3, .gr-markdown h1, .gr-markdown h3 { color: #1976d2 !important; }
457
+ p, .gr-markdown p, .gr-markdown span, .gr-markdown { color: #222 !important; }
458
+ .custom-footer {
459
+ display: block !important;
460
+ margin: 40px auto 0 auto !important;
461
+ max-width: 600px !important;
462
+ width: 100% !important;
463
+ background: #e6f4ff !important;
464
+ border-radius: 10px !important;
465
+ box-shadow: 0 2px 2px #0001 !important;
466
+ padding: 24px 32px 24px 32px !important;
467
+ font-size: 1.13em !important;
468
+ color: #0a2540 !important;
469
+ font-family: sans-serif !important;
470
+ text-align: center !important;
471
+ position: relative !important;
472
+ z-index: 10 !important;
473
+ }
474
+ .custom-footer a {
475
+ color: #0074d9 !important;
476
+ text-decoration: underline !important;
477
+ font-weight: 700 !important;
478
+ }
479
+ .card {
480
+ background: white !important;
481
+ border-radius: 12px !important;
482
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
483
+ border: 1px solid #e5e7eb !important;
484
+ margin-bottom: 1.5rem !important;
485
+ transition: all 0.2s ease-in-out !important;
486
+ overflow: hidden !important;
487
+ }
488
+ .card > * {
489
+ padding: 0 !important;
490
+ margin: 0 !important;
491
+ }
492
+ .card:hover {
493
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
494
+ transform: translateY(-1px) !important;
495
+ }
496
+ .card-header {
497
+ background: linear-gradient(135deg, #1975cf 0%, #1557b0 100%) !important;
498
+ color: white !important;
499
+ padding: 1rem 1.5rem !important;
500
+ border-radius: 12px 12px 0 0 !important;
501
+ font-weight: 600 !important;
502
+ font-size: 1.1rem !important;
503
+ }
504
+ .card-header,
505
+ div.card-header,
506
+ div.card-header span,
507
+ div.card-header * {
508
+ color: white !important;
509
+ }
510
+ .card-content {
511
+ padding: 1.5rem !important;
512
+ color: #4b5563 !important;
513
+ line-height: 1.6 !important;
514
+ background: white !important;
515
+ }
516
+ .stats-grid {
517
+ display: grid !important;
518
+ grid-template-columns: 1fr 1fr !important;
519
+ gap: 1.5rem !important;
520
+ margin-top: 1.5rem !important;
521
+ }
522
+ .stat-item {
523
+ background: #f8fafc !important;
524
+ padding: 1rem !important;
525
+ border-radius: 8px !important;
526
+ border-left: 4px solid #1975cf !important;
527
+ }
528
+ .stat-label {
529
+ font-weight: 600 !important;
530
+ color: #4b5563 !important;
531
+ font-size: 0.9rem !important;
532
+ margin-bottom: 0.5rem !important;
533
+ }
534
+ .stat-value {
535
+ color: #4b5563 !important;
536
+ font-size: 0.85rem !important;
537
+ }
538
+ .btn-example {
539
+ background: #f1f5f9 !important;
540
+ border: 1px solid #cbd5e1 !important;
541
+ color: #4b5563 !important;
542
+ border-radius: 6px !important;
543
+ transition: all 0.2s ease !important;
544
+ margin: 0.35rem !important;
545
+ padding: 0.5rem 1rem !important;
546
+ }
547
+ .btn-example:hover {
548
+ background: #1975cf !important;
549
+ border-color: #1975cf !important;
550
+ color: white !important;
551
+ }
552
+ .btn-primary {
553
+ background: #1975cf !important;
554
+ border-color: #1975cf !important;
555
+ color: white !important;
556
+ }
557
+ .btn-primary:hover {
558
+ background: #1557b0 !important;
559
+ border-color: #1557b0 !important;
560
+ }
561
+ .markdown {
562
+ color: #374151 !important;
563
+ }
564
+ .results-text {
565
+ color: #4b5563 !important;
566
+ font-weight: 500 !important;
567
+ padding: 0 !important;
568
+ margin: 0 !important;
569
+ }
570
+ .results-text p {
571
+ color: #4b5563 !important;
572
+ margin: 0.5rem 0 !important;
573
+ }
574
+ .results-text * {
575
+ color: #4b5563 !important;
576
+ }
577
+ div[data-testid="markdown"] p {
578
+ color: #4b5563 !important;
579
+ }
580
+ .prose {
581
+ color: #4b5563 !important;
582
+ }
583
+ .prose * {
584
+ color: #4b5563 !important;
585
+ }
586
+ .card-header,
587
+ .card-header * {
588
+ color: white !important;
589
+ }
590
+ /* Override grey colors for SR110 Vela results section - MUST be after prose rules */
591
+ .prose .sr110-results,
592
+ .prose .sr110-results *,
593
+ .prose .sr110-results h3,
594
+ .prose .sr110-results div,
595
+ .prose .sr110-results span,
596
+ .sr110-results,
597
+ .sr110-results *,
598
+ .sr110-results h3,
599
+ .sr110-results div,
600
+ .sr110-results span {
601
+ color: inherit !important;
602
+ }
603
+ /* Preserve original colors for dark theme cards with higher specificity */
604
+ .prose .sr110-results .sr110-card,
605
+ .sr110-results .sr110-card {
606
+ background: #23233a !important;
607
+ }
608
+ .prose .sr110-results .sr110-title,
609
+ .sr110-results .sr110-title {
610
+ color: #00b0ff !important;
611
+ }
612
+ .prose .sr110-results .sr110-label,
613
+ .sr110-results .sr110-label {
614
+ color: #ccc !important;
615
+ }
616
+ .prose .sr110-results .sr110-value,
617
+ .sr110-results .sr110-value {
618
+ color: #fff !important;
619
+ }
620
+ """
621
+ ) as demo:
622
 
623
+ gr.HTML("""
624
+ <div class="main-header">
625
+ <h1>🎤 DSCNN Wake Word Detection</h1>
626
+ </div>
627
+ """)
628
 
629
+ with gr.Row():
630
+ with gr.Column(scale=1):
631
+
632
+ input_audio = gr.Audio(
633
+ sources=["microphone", "upload"],
634
+ type="filepath",
635
+ label="Record or Upload Audio",
636
+ value=None
637
+ )
638
+
639
+ classify_btn = gr.Button(
640
+ "Detect Wake Word",
641
+ variant="primary",
642
+ size="lg",
643
+ elem_classes=["btn-primary"]
644
+ )
645
+
646
+ with gr.Group(elem_classes=["card"]):
647
+ gr.HTML('<div class="card-header"><span style="color: white; font-weight: 600;">Supported Keywords</span></div>')
648
+
649
+ with gr.Column(elem_classes=["card-content"]):
650
+ gr.HTML("""
651
+ <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; text-align: center;">
652
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">yes</div>
653
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">no</div>
654
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">up</div>
655
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">down</div>
656
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">left</div>
657
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">right</div>
658
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">on</div>
659
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">off</div>
660
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">stop</div>
661
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">go</div>
662
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">silence</div>
663
+ <div style="padding: 0.5rem; background: #f8fafc; border-radius: 6px; font-weight: 500;">unknown</div>
664
+ </div>
665
+ """)
666
+
667
+ # Add Model Upload Section
668
+ with gr.Group(elem_classes=["card"]):
669
+ gr.HTML('<div class="card-header"><span style="color: white; font-weight: 600;">Upload Your TFLite Model</span></div>')
670
+
671
+ with gr.Column(elem_classes=["card-content"]):
672
+ model_file = gr.File(
673
+ file_types=[".tflite"],
674
+ label="Upload .tflite model for Vela analysis",
675
+ interactive=True
676
+ )
677
+
678
+ compile_btn = gr.Button(
679
+ "Compile Model for SR110",
680
+ variant="primary",
681
+ size="lg",
682
+ elem_classes=["btn-primary"]
683
+ )
684
+
685
+ download_model_btn = gr.DownloadButton(
686
+ label="Download Compiled Model",
687
+ visible=False,
688
+ elem_classes=["btn-primary"]
689
+ )
690
+
691
+ download_logs_btn = gr.DownloadButton(
692
+ label="Download Per Layer Logs",
693
+ visible=False,
694
+ elem_classes=["btn-primary"]
695
+ )
696
+
697
+ with gr.Column(scale=1):
698
+ # Display Vela analysis results (dynamic)
699
+ vela_results_html = gr.HTML(vela_html)
700
+
701
+ with gr.Group(elem_classes=["card"]):
702
+ gr.HTML('<div class="card-header"><span style="color: white; font-weight: 600;">Wake Word Detection Results</span></div>')
703
+
704
+ with gr.Column(elem_classes=["card-content"]):
705
+ output_text = gr.Markdown(
706
+ value="Record or upload audio to see wake word predictions...",
707
+ label="",
708
+ elem_classes=["results-text"]
709
+ )
710
 
711
+ # Set up event handlers
712
+ classify_btn.click(
713
+ fn=classify_audio,
714
+ inputs=input_audio,
715
+ outputs=output_text
716
+ )
717
+
718
+ # Model compile handler
719
+ compile_btn.click(
720
+ fn=compile_uploaded_model,
721
+ inputs=[model_file],
722
+ outputs=[vela_results_html, download_model_btn, download_logs_btn]
723
+ )
724
+
725
+ # Auto-classify when audio is uploaded
726
+ input_audio.change(
727
+ fn=classify_audio,
728
+ inputs=input_audio,
729
+ outputs=output_text
730
+ )
731
 
732
  # Launch the demo
733
  if __name__ == "__main__":
734
+ demo.launch()
requirements.txt CHANGED
@@ -4,4 +4,7 @@ librosa>=0.10.0
4
  soundfile>=0.12.0
5
  numpy>=1.21.0
6
  scipy>=1.9.0
7
- pydantic==2.10.6
 
 
 
 
4
  soundfile>=0.12.0
5
  numpy>=1.21.0
6
  scipy>=1.9.0
7
+ pydantic==2.10.6
8
+ ethos-u-vela
9
+ requests
10
+ pillow
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