Name SQUARE; Partno XX; Date ; Revision ; Designer ; Company ; Assembly ; Location ; Device G16V8; /*****************************************/ /* Example of a lookup table to */ /* produce the square of a 4-bit number */ /*****************************************/ /** Inputs **/ Pin [2..5] = [I0..2] ; /* Input bus line 4 bits */ /** Outputs **/ Pin [12..19] = [ot9..7] ; /* Output bus line 8 bits */ /** Declarations and Intermediate Variable Definitions */ Field input = [I3..0]; Field output = [ot..0]; /** Logic Equations **/ Table input=>output { 'd'00 => 'd'000; 'd'01 => 'd'001; 'd'02 => 'd'004; $REPEAT A = [3..15] 'd'{A} => 'd'{A*A}; $REPEND }