--- Quote Start ---
Modelsim compiles the code into a library file. You eithher compile the source code yourself or someone (like altera) will provide them for you.
You cannot compile a file without compiling it into a library. the default library is work.
--- Quote End ---
Yes, that is what I know. Could you please help me this question:
Simulation tools use these compiled library files for what? Or say like this, what information does simulation tool get from these precompiled library files?
When we do simulation, we have HDL design files for our designs, why simulation tools needs other information for simulation ? (I am not sure whether behaviour simulation needs compiled library files).
My understanding is in most cases, we don't have the HDL files for IP cores in our project (e.g. IP cores provided from Altera). They are actually in location of Quartus directory which is just invisible.
But simulation tool need these files otherwise it can not simulate. So simulation tool use these relevant precomipled library files to do simulation.