VHDL Code snippets – Source, testbench and waveforms
Code Snippets

	Skip to content

	
		

			
				

	

	
		Several VHDL code examples are listed below. Each example includes the source code and simulation waveform. Also, at the footer of each example you can find a link to download both the model source and testbench files.

Note: The categories marked with an (includes exercises) have proposed exercises for you to practice. Check them out!


Sources List
Binary to seven-segment decoder
Debouncer (for push-buttons)
Generic Demultiplexer / Decoder
Generic down-counter
Generic register with load
Generic up-down counter (includes exercises)
Parameterized PWM controller (includes exercises)
Parallel to serial converter
Serial to parallel converter (includes exercises)

IMPORTANT NOTE:
All the examples in this site are according Altera recommended coding style. Altera recommends using asynchronous reset at the Flip Flop level.
Xilinx recommends using synchronous reset at the FF level.
			
			
						

	

				

			
		
	

	
