VHDL implementation of SAP-1 (for Altera's DE-1)