How does the simulator know, what is the setup time and hold times?
Simulation does not know any thing, it will do things in zero time. If you run a gate level simulation then it will give you delays in the simulation.
Basically, a timing anyalyzer like PT is used to see for setup and hold times, not the simulator. As far as my knowledge, The simulator will not have any setup and hold times.
simulator is just used to check whether the code written is giving correct o/p or not.
its no where related to timing issues as it comes after synthesis of our design.. depending upon the mapped gates/reg from the tech lib used.