예제 #1
0
 def __init__(self, clk_freq, rate, speedgrade=None, fine_refresh_mode=None):
     self.clk_freq      = clk_freq
     self.rate          = rate
     self.speedgrade    = speedgrade
     self.geom_settings = GeomSettings(
         bankbits = log2_int(self.nbanks),
         rowbits  = log2_int(self.nrows),
         colbits  = log2_int(self.ncols),
     )
     assert not (self.memtype != "DDR4" and fine_refresh_mode != None)
     assert fine_refresh_mode in [None, "1x", "2x", "4x"]
     if (fine_refresh_mode is None) and (self.memtype == "DDR4"):
         fine_refresh_mode = "1x"
     self.timing_settings = TimingSettings(
         tRP   = self.ck_ns_to_cycles(self.get("tRP")),
         tRCD  = self.ck_ns_to_cycles(self.get("tRCD")),
         tWR   = self.ck_ns_to_cycles(self.get("tWR")),
         tREFI = self.ck_ns_to_cycles(self.get("tREFI", fine_refresh_mode), margin=False),
         tRFC  = self.ck_ns_to_cycles(self.get("tRFC", fine_refresh_mode)),
         tWTR  = self.ck_ns_to_cycles(self.get("tWTR")),
         tFAW  = None if self.get("tFAW") is None else self.ck_ns_to_cycles(self.get("tFAW")),
         tCCD  = None if self.get("tCCD") is None else self.ck_ns_to_cycles(self.get("tCCD")),
         tRRD  = None if self.get("tRRD") is None else self.ck_ns_to_cycles(self.get("tRRD")),
         tRC   = None if self.get("tRAS") is None else self.ck_ns_to_cycles(self.get("tRP") + self.get("tRAS")),
         tRAS  = None if self.get("tRAS") is None else self.ck_ns_to_cycles(self.get("tRAS")),
         tZQCS = None if self.get("tZQCS") is None else self.ck_ns_to_cycles(self.get("tZQCS"))
     )
     self.timing_settings.fine_refresh_mode = fine_refresh_mode
예제 #2
0
 def __init__(self, clk_freq, rate, speedgrade=None):
     self.clk_freq = clk_freq
     self.rate = rate
     self.speedgrade = speedgrade
     self.geom_settings = GeomSettings(
         bankbits=log2_int(self.nbanks),
         rowbits=log2_int(self.nrows),
         colbits=log2_int(self.ncols),
     )
     self.timing_settings = TimingSettings(
         tRP=self.ns_to_cycles(self.get("tRP")),
         tRCD=self.ns_to_cycles(self.get("tRCD")),
         tWR=self.ns_to_cycles(self.get("tWR")),
         tREFI=self.ns_to_cycles(self.get("tREFI"), False),
         tRFC=self.ns_to_cycles(self.get("tRFC")),
         tWTR=self.ck_ns_to_cycles(*self.get("tWTR")),
         tFAW=None if self.get("tFAW") is None else self.ck_ns_to_cycles(
             *self.get("tFAW")),
         tCCD=None if self.get("tCCD") is None else self.ck_ns_to_cycles(
             *self.get("tCCD")),
         tRRD=None if self.get("tRRD") is None else self.ns_to_cycles_trrd(
             self.get("tRRD")),
         tRC=None if self.get("tRC") is None else self.ns_to_cycles(
             self.get("tRC")),
         tRAS=None if self.get("tRAS") is None else self.ns_to_cycles(
             self.get("tRAS")))
예제 #3
0
 def __init__(self, clk_freq, rate):
     self.clk_freq = clk_freq
     self.rate = rate
     self.geom_settings = GeomSettings(
         bankbits=log2_int(self.nbanks),
         rowbits=log2_int(self.nrows),
         colbits=log2_int(self.ncols),
     )
     self.timing_settings = TimingSettings(
         tRP=self.ns(self.tRP),
         tRCD=self.ns(self.tRCD),
         tWR=self.ns(self.tWR),
         tWTR=self.tWTR,
         tREFI=self.ns(self.tREFI, False),
         tRFC=self.ns(self.tRFC)
     )