To answer this question we need to remember a little of the cell cycle and the cell division process. When cell division starts (Prophase) the DNA condensates and forms chromosomes, at this point DNA, has to be already duplicated because when acquires a condensed form it can't be replicated or transcribed. Therefore replication occurs before, this is during the S phase (synthesis) of the cell cycle, previous to any phase of mitosis and meiosis.