The multi-value option on the Espresso logic-minimization software can be used to solve the "input-encoding" problem, where you have say some m-bit ROM and some number of outputs n > m, and you want to find out assigning which bit vectors in the ROM to what output vectors will result in the smallest decode logic.
The documentation isn't particularly helpful:
the closest relevant example I can find is Example 2:
"This example shows a description of a multiple-valued function with 5 binary variables and 3 multiple-valued variables (8 variables total) where the multiple-valued variables have sizes of 4 27 and 10 (note that the last multiple-valued variable is the "output" and also encodes the ON -set, DC -set and OFF -set information)."
.mv 8 5 4 27 10 .ilb in1 in2 in3 in4 in5 .label var=5 part1 part2 part3 part4 .label var=6 a b c d e f g h i j k l m n o p q r s t u v w x y z a1 .label var=7 out1 out2 out3 out4 out5 out6 out7 out8 out9 out10 0-010|1000|100000000000000000000000000|0010000000 10-10|1000|010000000000000000000000000|1000000000 0-111|1000|001000000000000000000000000|0001000000 0-10-|1000|000100000000000000000000000|0001000000 00000|1000|000010000000000000000000000|1000000000 00010|1000|000001000000000000000000000|0010000000 01001|1000|000000100000000000000000000|0000000010 0101-|1000|000000010000000000000000000|0000000000 0-0-0|1000|000000001000000000000000000|1000000000 10000|1000|000000000100000000000000000|0000000000 11100|1000|000000000010000000000000000|0010000000 10-10|1000|000000000001000000000000000|0000000000 11111|1000|000000000000100000000000000|0010000000 . . . 11111|0001|000000000000000000000000001|000000000
For myself I basically just want to find out how to have X bits of external input and Y bits of ROM and optimize the encoding in ROM such that the decode logic is minimized, but I'm struggling to figure out this input file syntax..