parameter DIVIDE_RATIO = 4, // master 'clk' signal is divided by 4 for DDR outgoing 'ck' signal, it is for 90 degree phase shift purpose.
parameter DIVIDE_RATIO = 4, // master 'clk' signal is divided by 4 for DDR outgoing 'ck' signal, it is for 90 degree phase shift purpose.
`else
`else
// why 8 ? because of FPGA development board is using external 50 MHz crystal
// why 8 ? because of FPGA development board is using external 50 MHz crystal
// and the minimum operating frequency for Micron DDR3 memory is 303MHz
// and the minimum operating frequency for Micron DDR3 memory is 303MHz
parameter integer SERDES_RATIO = 8,
parameter integer SERDES_RATIO = 8,
`endif
`endif
`ifdef MICRON_SIM
`ifdef MICRON_SIM
// host clock period in ns
// host clock period in ns
parameter CLK_PERIOD = $itor(MAXIMUM_CK_PERIOD/DIVIDE_RATIO)/$itor(PICO_TO_NANO_CONVERSION_FACTOR), // clock period of 'clk' = 0.825ns , clock period of 'ck' = 3.3s
parameter CLK_PERIOD = $itor(MAXIMUM_CK_PERIOD/DIVIDE_RATIO)/$itor(PICO_TO_NANO_CONVERSION_FACTOR), // clock period of 'clk' = 0.825ns , clock period of 'ck' = 3.3s