ecp5: Add DQS groupings to database
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
92a4a48f47
commit
5cfc7674c1
@ -103,7 +103,7 @@ NPNR_PACKED_STRUCT(struct PIOInfoPOD {
|
|||||||
int32_t bel_index;
|
int32_t bel_index;
|
||||||
RelPtr<char> function_name;
|
RelPtr<char> function_name;
|
||||||
int16_t bank;
|
int16_t bank;
|
||||||
int16_t padding;
|
int16_t dqsgroup;
|
||||||
});
|
});
|
||||||
|
|
||||||
NPNR_PACKED_STRUCT(struct PackagePinPOD {
|
NPNR_PACKED_STRUCT(struct PackagePinPOD {
|
||||||
|
@ -119,9 +119,20 @@ def process_pio_db(ddrg, device):
|
|||||||
pinfunc = metaitem["function"]
|
pinfunc = metaitem["function"]
|
||||||
else:
|
else:
|
||||||
pinfunc = None
|
pinfunc = None
|
||||||
|
dqs = -1
|
||||||
|
if "dqs" in metaitem:
|
||||||
|
tdqs = metaitem["dqs"]
|
||||||
|
if tdqs[0] == "L":
|
||||||
|
dqs = 0
|
||||||
|
elif tdqs[0] == "R":
|
||||||
|
dqs = 2048
|
||||||
|
suffix_size = 0
|
||||||
|
while tdqs[-(suffix_size+1)].isdigit():
|
||||||
|
suffix_size += 1
|
||||||
|
dqs |= int(tdqs[-suffix_size:])
|
||||||
bel_idx = get_bel_index(ddrg, loc, pio)
|
bel_idx = get_bel_index(ddrg, loc, pio)
|
||||||
if bel_idx is not None:
|
if bel_idx is not None:
|
||||||
pindata.append((loc, bel_idx, bank, pinfunc))
|
pindata.append((loc, bel_idx, bank, pinfunc, dqs))
|
||||||
|
|
||||||
global_data = {}
|
global_data = {}
|
||||||
quadrants = ["UL", "UR", "LL", "LR"]
|
quadrants = ["UL", "UR", "LL", "LR"]
|
||||||
@ -360,7 +371,7 @@ def write_database(dev_name, chip, ddrg, endianness):
|
|||||||
|
|
||||||
bba.l("pio_info", "PIOInfoPOD")
|
bba.l("pio_info", "PIOInfoPOD")
|
||||||
for pin in pindata:
|
for pin in pindata:
|
||||||
loc, bel_idx, bank, func = pin
|
loc, bel_idx, bank, func, dqs = pin
|
||||||
write_loc(loc, "abs_loc")
|
write_loc(loc, "abs_loc")
|
||||||
bba.u32(bel_idx, "bel_index")
|
bba.u32(bel_idx, "bel_index")
|
||||||
if func is not None:
|
if func is not None:
|
||||||
@ -368,7 +379,7 @@ def write_database(dev_name, chip, ddrg, endianness):
|
|||||||
else:
|
else:
|
||||||
bba.r(None, "function_name")
|
bba.r(None, "function_name")
|
||||||
bba.u16(bank, "bank")
|
bba.u16(bank, "bank")
|
||||||
bba.u16(0, "padding")
|
bba.u16(dqs, "dqsgroup")
|
||||||
|
|
||||||
bba.l("tiletype_names", "RelPtr<char>")
|
bba.l("tiletype_names", "RelPtr<char>")
|
||||||
for tt, idx in sorted(tiletype_names.items(), key=lambda x: x[1]):
|
for tt, idx in sorted(tiletype_names.items(), key=lambda x: x[1]):
|
||||||
|
Loading…
Reference in New Issue
Block a user