A computer readable medium storing a test clock domain adjustment code, wherein the test clock domain adjustment code is utilized for adjusting test clock domains of a layout of an integrated circuit, the integrated circuit comprises a plurality of scan cells, the plurality of scan cells comprise at least a plurality of first scan cells and a plurality of second scan cells, the plurality of first scan cells are arranged to be on a first scan chain and are tested by a first test clock, the plurality of second scan cells are arranged to be on a second scan chain and are tested by a second test clock different from the first test clock, and the layout of the integrated circuit comprises a plurality of regions, and when the test clock domain adjustment code is executed by a processor, the test clock domain adjustment code executes the following steps:
- for a first region of the integrated circuit, determining whether the first region requires a test clock domain adjustment or not according to a number of first scan cells and a number of the second scan cells of the first region;
- and
- when it is determined that the first region requires the test clock domain adjustment, and the number of first scan cells is greater than the number of second scan cells of the first region, rearranging at least one first scan cell of the first region on the second scan chain, and the first scan cell is then tested by the second test clock.