FSM-Design auf FPGA mit VHDLFSM design on FPGA with VHDL
Digitale Logik und endliche Automaten in VHDL beschrieben, in der Simulation verifiziert und mit Intel Quartus auf echter FPGA-Hardware umgesetzt – der vollständige Entwurfsablauf von der Zustandsbeschreibung bis zur Hardware.Digital logic and finite state machines described in VHDL, verified in simulation and implemented on real FPGA hardware with Intel Quartus – the complete flow from state description to hardware.
Verhalten präzise beschreiben – und in Hardware gießenDescribe behaviour precisely – and cast it in hardware
Endliche Automaten (FSM) sind das Rückgrat jeder Steuerlogik – von der Ampel bis zum Kommunikationsprotokoll. In diesem Laborprojekt habe ich digitale Logik und Automaten in VHDL beschrieben, ihr Verhalten in der Simulation überprüft und die Designs mit Intel Quartus synthetisiert und auf einem FPGA-Entwicklungsboard ausgeführt.Finite state machines (FSMs) are the backbone of every control logic – from traffic lights to communication protocols. In this lab project I described digital logic and state machines in VHDL, verified their behaviour in simulation, and synthesised and ran the designs on an FPGA development board with Intel Quartus.
Was erreicht werden sollteWhat it set out to achieve
- Den kompletten digitalen Entwurfsablauf durchlaufen: Spezifikation → VHDL → Simulation → Synthese → Hardware.Work through the complete digital design flow: specification → VHDL → simulation → synthesis → hardware.
- Zustandsautomaten sauber modellieren (Moore/Mealy, Zustandskodierung).Model state machines cleanly (Moore/Mealy, state encoding).
- Verhalten vor der Hardware in der Simulation absichern.Secure the behaviour in simulation before moving to hardware.
Werkzeuge und KonzepteTools and concepts
- Endliche Automaten (Moore / Mealy) und ZustandskodierungFinite state machines (Moore / Mealy) and state encoding
- Kombinatorische und sequenzielle Logik, taktsynchrones DesignCombinational and sequential logic, synchronous design
- Synthese und Implementierung auf dem FPGASynthesis and implementation on the FPGA
Vom Konzept zur UmsetzungFrom concept to implementation
- Gewünschtes Verhalten als Zustandsdiagramm spezifizieren.Specify the desired behaviour as a state diagram.
- Den Automaten in VHDL beschreiben.Describe the machine in VHDL.
- Zustandsübergänge in der funktionalen Simulation prüfen.Check state transitions in functional simulation.
- Mit Intel Quartus synthetisieren und auf dem FPGA ausführen.Synthesise with Intel Quartus and run on the FPGA.
Ein Automat zum DurchtaktenA state machine to clock through
Ein Moore-Automat erkennt die Bitfolge 1-0-1 (mit Überlappung). Wählen Sie das Eingangsbit, geben Sie Taktflanken – der Zustandswechsel erfolgt wie im FPGA nur mit dem Takt.A Moore machine detects the bit sequence 1-0-1 (overlapping). Choose the input bit and apply clock edges – as on the FPGA, the state only changes on the clock.
EingangsfolgeInput history: –
AusgangOutput y = 0
type state_t is (S0, S1, S2, S3); signal state : state_t := S0; process(clk) begin if rising_edge(clk) then if rst = '1' then state <= S0; else case state is when S0 => if x = '1' then state <= S1; end if; -- … end case; end if; end if; end process; y <= '1' when state = S3 else '0';
Eigene Arbeit und RahmenMy work and the setting
Meine BearbeitungMy work
- VHDL-Beschreibung der Schaltungen und AutomatenVHDL description of the circuits and state machines
- Simulation und Synthese in Intel QuartusSimulation and synthesis in Intel Quartus
- Test auf dem FPGA-BoardTesting on the FPGA board
BereitgestelltProvided
- Aufgabenstellung des ModulsModule assignment
- FPGA-Entwicklungsboard und LaborumgebungFPGA development board and lab environment
Worauf es ankamWhat mattered
- Korrekte Zustandskodierung und saubere Übergänge an den Taktflanken.Correct state encoding and clean transitions at the clock edges.
- Verstehen, warum sich simuliertes Verhalten und synthetisierte Hardware unterscheiden können.Understanding why simulated behaviour and synthesised hardware can differ.
Wie geprüft wurdeHow it was verified
Die Zustandsübergänge wurden zunächst in der funktionalen Simulation geprüft und anschließend auf dem FPGA-Board durch Betätigen der Eingänge und Beobachten der Ausgänge kontrolliert.State transitions were first checked in functional simulation and then verified on the FPGA board by operating the inputs and observing the outputs.
Was vorliegt – und was nichtWhat exists – and what does not
Die Automaten liefen nach Simulation und Synthese auf der FPGA-Hardware. Das Projekt vermittelte den vollständigen Entwurfsablauf, auf dem auch komplexere Steuerungen aufbauen.After simulation and synthesis, the state machines ran on the FPGA hardware. The project covered the complete design flow on which more complex controllers build.
Die Original-Quelldateien sind derzeit nicht veröffentlicht; das GitHub-Repository enthält die Projektdokumentation. Konkrete Messwerte oder Screenshots der Laborergebnisse liegen in den verfügbaren Unterlagen nicht vor und werden deshalb hier nicht gezeigt.The original source files are not published yet; the GitHub repository holds the project documentation. Specific measurements or screenshots of the lab results are not part of the available material and are therefore not shown here.