Allowing the assignment of TDO pin (IO_S3_B3) on the second die for A2 (#18)

* JTAG Pins also exist on 1B Die. Allow the S3 Bank to be assigned to the second Die

* Add attribute pins to class Bank, defining the list of allowed pins

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Generate white list for WA Bank

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Hai Luong 2026-03-18 13:13:11 +01:00 committed by GitHub
parent bc3df10ff3
commit 6572d46414
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 2 deletions

View File

@ -20,11 +20,16 @@ import die
import os
from die import Die, Location, Connection
from dataclasses import dataclass
from typing import List, Dict
from typing import List, Dict, FrozenSet, Optional
from timing import decompress_timing
DATABASE_VERSION = 1.12
# WA bank pin whitelists for CCGM1A2:
# All A0..A8 and B0..B8 are on die 1A except B3, which is assigned to die 1B.
WA_BANK_1A_PINS = {f"A{i}" for i in range(9)} | ({f"B{i}" for i in range(9)} - {"B3"})
WA_BANK_1B_PINS = {"B3"}
@dataclass(eq=True, order=True)
class Pad:
x : int
@ -40,6 +45,16 @@ class Pad:
class Bank:
die : str
bank: str
pins: Optional[FrozenSet[str]] = None # None means all pins; otherwise a set like {"A5","A6","B0"}
def __post_init__(self):
if self.pins is None:
return
if isinstance(self.pins, str):
# Treat a single string as a single pin name, not an iterable of characters
self.pins = frozenset({self.pins})
else:
self.pins = frozenset(self.pins)
@dataclass
class TimingDelay:
@ -166,6 +181,10 @@ class Chip:
for bank in banks:
for p in ["A","B"]:
for num in range(9):
pin_id = f"{p}{num}"
# Skip if this bank only covers specific pins and this isn't one
if bank.pins is not None and pin_id not in bank.pins:
continue
d = self.dies[bank.die]
ddr = d.ddr_i[bank.bank]
loc = d.io_pad_names[bank.bank][p][num]
@ -205,7 +224,7 @@ CCGM1_DEVICES = {
"EB" : [ Bank("1B", "N2") ],
"NA" : [ Bank("1A", "E1"), Bank("1B", "E1") ],
"NB" : [ Bank("1A", "E2") ],
"WA" : [ Bank("1A", "S3") ],
"WA" : [ Bank("1A", "S3", WA_BANK_1A_PINS), Bank("1B", "S3", WA_BANK_1B_PINS) ],
"WB" : [ Bank("1A", "N1"), Bank("1B", "S1") ],
"WC" : [ Bank("1A", "S2") ],
"SA" : [ Bank("1A", "W1") ],