Merge pull request #1117 from litghost/add_hclk_aliases

Add HCLK_[LR]_BOT_UTURN aliases.
This commit is contained in:
Tomasz Michalak 2019-10-24 08:09:57 +02:00 committed by GitHub
commit 08e0cd701d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -418,6 +418,31 @@ def propagate_IOI_Y9(database, tiles_by_grid):
database[tile]['bits']['CLB_IO_CLK']['offset'] = 18
def alias_HCLKs(database):
""" Generate HCLK aliases for HCLK_[LR] subsets.
There are some HCLK_[LR] tiles that are missing some routing due to
obstructions, e.g. PCIE hardblock. These tiles do not have southbound
clock routing, but are otherwise the same as HCLK_[LR] tiles.
Simply alias their segbits.
"""
for tile in database:
if database[tile]['type'] == "HCLK_L_BOT_UTURN":
database[tile]['bits']['CLB_IO_CLK']['alias'] = {
"sites": {},
"start_offset": 0,
"type": "HCLK_L"
}
elif database[tile]['type'] == "HCLK_R_BOT_UTURN":
database[tile]['bits']['CLB_IO_CLK']['alias'] = {
"sites": {},
"start_offset": 0,
"type": "HCLK_R"
}
def run(json_in_fn, json_out_fn, verbose=False):
# Load input files
database = json.load(open(json_in_fn, "r"))
@ -429,6 +454,7 @@ def run(json_in_fn, json_out_fn, verbose=False):
propagate_IOB_SING(database, tiles_by_grid)
propagate_IOI_SING(database, tiles_by_grid)
propagate_IOI_Y9(database, tiles_by_grid)
alias_HCLKs(database)
# Save
xjson.pprint(open(json_out_fn, "w"), database)