I don't know much of MAX7000S but it's possible your design fits into the available logic elements but it requires excessive routing resources. In other words your MAX7000S has not enough wires inside to connect all the required signals.
EPM7128 has 128 macrocells, namely 'only' 128 flip flops. I guess your design is using most of them; the interconnect matrix is probably quite loaded, too.
In order to free some resources; I'd remove the following:
if(minout = "11111111") then
minout<="00000000";
end if;
minout will automatically overflow to 0 after it has reached the all-1 state.
You can also limit secout size to 6 bits, since the upper two are always 0.