Hello,
--- Quote Start ---
However, after combining, Quartus II somehow
truncate the codes through some optimization mechanism and the codes no longer function as how they were, when they were simulated prior to combining.
--- Quote End ---
I wouldn't expect a particular Quartus problem here. Apparenty, the full design behaves different than intended. When I experienced a similar issue, it turned out in most cases, that the compiler (could be Quartus, ModelSim, whatever) exactly did, what I had coded. Unfortunately I intended something different.
What do you mean exactly with Quartus
truncate the code? It could be, that part of the code isn't synthesized at all. This happens usually when either no output depends on the code (= all outputs are effectively unconnected, viewn from the pins) or the output doesn't depend on any input (= is arbitrary or constant, e. g. cause the module has no clock connected or is held constantly in reset). In this case, you surely get a lot of warnings during compilation, that tell more or less exactly what's going to happen.
Apart from such simple cases of bad design assembly, the designs overall structure could actually change a lot by optimisation, cause redundancy is removed as far as possible, also across module boundaries unless you restrict this operation. This won't change functional behaviour but could be an issue in debugging.
For detailed help, more information would be needed.
Regards,
Frank