Skip to content

mcbernie/vigorsynth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VidorSynth Projektstruktur & Anleitung

Dies ist die offizielle Projektstruktur und Anleitung für deinen hybriden Synthesizer mit dem MKR Vidor 4000, basierend auf:

  • FPGA-Design in Amaranth (Python HDL)
  • Synthese via Quartus Prime Lite
  • Mikrocontroller (SAMD21) via PlatformIO/Arduino
  • Kommunikation per VidorMailbox

Projektstruktur

VidorSynth/
├── platformio.ini               # PlatformIO-Projekt für SAMD21
├── src/
│   └── main.cpp               # Arduino-Interface mit FPGA
├── fpga/
│   ├── top.py                 # Haupt-FPGA-Design in Amaranth
│   ├── wave_roms.py           # vordefinierte Wavetables
│   ├── lfo.py                 # LFO-Modul
│   ├── blend_unit.py          # Logik für Operatoren zwischen OSCs
│   ├── vidor4000.pcf         # Pin-Mapping für Quartus
│   ├── requirements.txt       # Python-Abhängigkeiten
│   └── build/                # Generierte Dateien & Bitstream
│       ├── top.v              # Verilog-Ausgabe
│       ├── top.qsf            # Quartus-Konfig
│       └── top.sof            # Bitstream (nach Synthese)

Setup-Schritte

1. Python-Umgebung vorbereiten (Amaranth)

cd fpga
python -m venv .venv
source .venv/bin/activate   # oder .venv\Scripts\activate auf Windows
pip install -r requirements.txt

Inhalt von requirements.txt

amaranth

2. FPGA-Design exportieren (Verilog + Quartus Projekt)

python -m amaranth.cli top.py -t quartus -p vidor4000.pcf -o build/top

Dadurch entstehen:

  • top.v → Verilog-Code
  • top.qsf → Pin-Constraints für Quartus

3. Synthese mit Quartus

  • Quartus Prime Lite öffnen
  • build/top.qpf laden
  • "Start Compilation" ausführen
  • Ergebnis: top.sof (Bitstream)

Optional: Flash mit Arduino IDE (Sketch mit FPGA.loadBitstream(...))


4. PlatformIO-Projekt verwenden (SAMD21 / Arduino C++)

# platformio.ini
[env:mkrvidor4000]
platform = atmelsam
board = mkrvidor4000
framework = arduino
monitor_speed = 115200
lib_deps =
  VidorPeripherals

Beispiel main.cpp:

#include <VidorPeripherals.h>
#include <VidorMailbox.h>

void setup() {
  FPGA.begin();
  VidorMailbox.begin();

  uint32_t val = 0x42;
  VidorMailbox.write(0x10, &val, 1);
}

void loop() {}

Hinweise

  • top.py enthält alle Submodule und Registerstruktur
  • Kommunikation erfolgt über VidorMailbox.write(addr, &val, 1)
  • FPGA und SAMD teilen sich Speicher (Shared Register Bus)

Tipps für weitere Entwicklung

  • docs/ für technische Beschreibung der Register, Wellenformen, Modulationsstruktur
  • testbench/ für FPGA-Test mit z. B. nMigen-Simulatoren
  • examples/ für kombinierte PIO-Tests (MIDI, OSC, Envelope etc.)

About

MKR Vidor 4000 - Test Synth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages