Read: Chapters 7 & 8 of Textbook: Free Range VHDL
7. Using VHDL for Sequential Circuits
Dives into the use of Sequential Circuits for memory storage in VHDL via Flip-Flops for single bit storage
Bit storage occurs when a function can have multiple different possible outcomes but an output value is only specified for some of them.
When the function processes data for which there is no specified output, the previous data is "remembered", thus: data storage
8. Finite State Machine Design Using VHDL
Finite State Machines (FSMs) are a system that can be in exactly one state, from a finite set of states, at any one time.
FSMs can change from one state to another in response to a change in their inputs (changes are called transitions)
Moore vs. Mealy FSM
Moore FSMs' output values depend only on the current state
Mealy FSMs' output values determined by current state and values of inputs
Watched: Video from Ben Eater
Describes D Flip-Flop and Latch
Worked through various GHDL examples:
4-to-1 multiplexer
1-to-4 demultiplexer
4-to-1 multiplexer example (followed from: All About FPGA)
First create mux.vhdl file with multiplexer functionality
Next create the mux_tb.vhdl file which tests the functionality by verifying each case for the inputs
In the terminal, use ghdl (with flags '-s', '-a', '-e', '-r') to check the syntax of the file, analyze the file, to elaborate the unit in the file (and create its executable) and to run it
Next, run 'ghdl -r mux_tb --vcd=mux.vcd' which will create the gtkwave compatible file to view to functionality on a waveform generator
mux_tb is name of the entity, not the file
A multiplexer has multiple inputs with one output, in this case 4 inputs, 2 selection lines, and 1 output
4-to-1 multiplexer diagram
4-to-1 multiplexer truth table
1-to-4 demultiplexer example (followed from: All About FPGA)
First create demux.vhdl file with multiplexer functionality
Next create the demux_tb.vhdl file which tests the functionality by verifying each case for the inputs
In the terminal, use ghdl (with flags '-s', '-a', '-e', '-r') to check the syntax of the file, analyze the file, to elaborate the unit in the file (and create its executable) and to run it
Next, run 'ghdl -r demux_tb --vcd=demux.vcd' which will create the gtkwave compatible file to view to functionality on a waveform generator
note: demux_tb is name of the entity, not the file
A demultiplexer has one input with multiple output, in this case 1 input, 2 selection lines, and 4 outputs
1-to-4 demultiplexer diagram
1-to-4 demultiplexer truth table