On the FPGA modular miner they claim 1 Mhz is practically equal to 1MH/s. I read about a licensed Altera code with much less logic and probably more efficiency.
someone can explain me if they have the same usage? or the code is more dense than that of altera?
http://www.cast-inc.com/ip-cores/encryption/sha-256/sha-256-xilinx.htmand this is an IP core sold by an enterprise.
The licensed code you're looking at has less logic because it's not unrolled. Every hash operation probably takes 128 cycles (or maybe 64) because it reuses the same logic. Unrolled bitcoin engines complete 1 hash per cycle (and have a latency of 124 or perhaps 248 cycles).
It's very slow, by our standards, as a result.
The reason they made it so slow is what I gave you above: 1MH/s of mining is approximately equal to 1Gbit/sec of general hashing. Since no one but bitcoin miners wants >100gbit/sec of SHA-256 in a chip (or even >10gbit/sec, most likely), no one but bitcoin miners would bother creating a design which is able to reach those speeds.
You could put many such engines on a chip, but they'd end up taking more space than an unrolled engine with the same performance, because unrolling eliminates overhead and eliminates idle logic between attempts.