litedram/phy/lpddr*: fix use of invalid escape sequence
This fixes multiple instances of: litedram/phy/lpddr4/commands.py:209 litedram-2023.12/litedram/phy/lpddr4/commands.py:209: DeprecationWarning: invalid escape sequence '\d' "BA(\d+)": lambda i: self.dfi.bank[i],
This commit is contained in:
parent
e9adaebf0d
commit
37e1f346e5
|
@ -206,11 +206,11 @@ class Command(Module):
|
||||||
"BL": lambda: 0, # on-the-fly burst length, not using
|
"BL": lambda: 0, # on-the-fly burst length, not using
|
||||||
"AP": lambda: self.dfi.address[10], # auto precharge
|
"AP": lambda: self.dfi.address[10], # auto precharge
|
||||||
"AB": lambda: self.dfi.address[10], # all banks
|
"AB": lambda: self.dfi.address[10], # all banks
|
||||||
"BA(\d+)": lambda i: self.dfi.bank[i],
|
"BA(\\d+)": lambda i: self.dfi.bank[i],
|
||||||
"R(\d+)": lambda i: self.dfi.address[i], # row
|
"R(\\d+)": lambda i: self.dfi.address[i], # row
|
||||||
"C(\d+)": lambda i: self.dfi.address[i], # column
|
"C(\\d+)": lambda i: self.dfi.address[i], # column
|
||||||
"MA(\d+)": lambda i: mr_address[i], # mode register address
|
"MA(\\d+)": lambda i: mr_address[i], # mode register address
|
||||||
"OP(\d+)": lambda i: self.dfi.address[i], # mode register value, or operand for MPC
|
"OP(\\d+)": lambda i: self.dfi.address[i], # mode register value, or operand for MPC
|
||||||
}
|
}
|
||||||
for pattern, value in rules.items():
|
for pattern, value in rules.items():
|
||||||
m = re.match(pattern, bit)
|
m = re.match(pattern, bit)
|
||||||
|
|
|
@ -282,20 +282,20 @@ class Command(Module):
|
||||||
"AB": lambda: self.dfi.address[10], # all banks
|
"AB": lambda: self.dfi.address[10], # all banks
|
||||||
"AP": lambda: self.dfi.address[10], # auto precharge
|
"AP": lambda: self.dfi.address[10], # auto precharge
|
||||||
"RFM": lambda: 0, # TODO: 1=RFM, 0=REF (Refresh Managemenent, only if r/o MR[27][0]=1, else always REF)
|
"RFM": lambda: 0, # TODO: 1=RFM, 0=REF (Refresh Managemenent, only if r/o MR[27][0]=1, else always REF)
|
||||||
"SB(\d+)": lambda i: 0, # sub-bank selection related to RFM
|
"SB(\\d+)": lambda i: 0, # sub-bank selection related to RFM
|
||||||
"WS_WR": lambda: self.wck_sync == WCKSyncType.WR, # Write WCK2CK SYNC
|
"WS_WR": lambda: self.wck_sync == WCKSyncType.WR, # Write WCK2CK SYNC
|
||||||
"WS_RD": lambda: self.wck_sync == WCKSyncType.RD, # Read WCK2CK SYNC
|
"WS_RD": lambda: self.wck_sync == WCKSyncType.RD, # Read WCK2CK SYNC
|
||||||
"WS_FS": lambda: self.wck_sync == WCKSyncType.FS, # FAST SYNC
|
"WS_FS": lambda: self.wck_sync == WCKSyncType.FS, # FAST SYNC
|
||||||
"DC(\d+)": lambda i: 0, # Data Copy, unimplemented
|
"DC(\\d+)": lambda i: 0, # Data Copy, unimplemented
|
||||||
"WRX": lambda: 0, # Write X function, unimplemented
|
"WRX": lambda: 0, # Write X function, unimplemented
|
||||||
"WXSA": lambda: 0, # Write X function, unimplemented
|
"WXSA": lambda: 0, # Write X function, unimplemented
|
||||||
"WXSB": lambda: 0, # Write X function, unimplemented
|
"WXSB": lambda: 0, # Write X function, unimplemented
|
||||||
"BA(\d+)": lambda i: self.dfi.bank[i], # only BA0-2 is used, in BG/B16 modes we always refresh banks (x, x+8)
|
"BA(\\d+)": lambda i: self.dfi.bank[i], # only BA0-2 is used, in BG/B16 modes we always refresh banks (x, x+8)
|
||||||
"R(\d+)": lambda i: self.dfi.address[i], # row
|
"R(\\d+)": lambda i: self.dfi.address[i], # row
|
||||||
# LPDDR5 specs split the regular column address into C[5:0] "column address" and B[3:0] "burst address"
|
# LPDDR5 specs split the regular column address into C[5:0] "column address" and B[3:0] "burst address"
|
||||||
"C(\d+)": lambda i: self.dfi.address[i + 4],
|
"C(\\d+)": lambda i: self.dfi.address[i + 4],
|
||||||
"MA(\d+)": lambda i: mr_address[i], # mode register address
|
"MA(\\d+)": lambda i: mr_address[i], # mode register address
|
||||||
"OP(\d+)": lambda i: op[i], # mode register value, or operand for MPC
|
"OP(\\d+)": lambda i: op[i], # mode register value, or operand for MPC
|
||||||
}
|
}
|
||||||
|
|
||||||
for pattern, value in rules.items():
|
for pattern, value in rules.items():
|
||||||
|
|
Loading…
Reference in New Issue