|
17 | 17 | from FABulous.fabric_definition.Gen_IO import Gen_IO
|
18 | 18 | from FABulous.fabric_definition.SuperTile import SuperTile
|
19 | 19 | from FABulous.fabric_definition.Tile import Tile
|
20 |
| -from FABulous.fabric_generator.gen_fabric.fabric_automation import addBelsToPrim |
| 20 | +from FABulous.fabric_generator.gen_fabric.fabric_automation import ( |
| 21 | + addBelsToPrim, |
| 22 | + generateCustomTileConfig, |
| 23 | + generateSwitchmatrixList, |
| 24 | +) |
21 | 25 | from FABulous.fabric_generator.parser.parse_hdl import parseBelFile
|
22 | 26 | from FABulous.fabric_generator.parser.parse_switchmatrix import (
|
23 | 27 | parseList,
|
@@ -225,11 +229,6 @@ def parseTilesCSV(fileName: Path) -> tuple[list[Tile], list[tuple[str, str]]]:
|
225 | 229 | configBit = 0
|
226 | 230 |
|
227 | 231 | if "GENERATE" in temp:
|
228 |
| - # import here to avoid circular import |
229 |
| - from FABulous.fabric_generator.gen_fabric.fabric_automation import ( |
230 |
| - generateSwitchmatrixList, |
231 |
| - ) |
232 |
| - |
233 | 232 | logger.info(f"Generating switch matrix list for tile {tileName}")
|
234 | 233 | genMatrixList = True
|
235 | 234 | if len(temp) <= 2:
|
@@ -530,13 +529,8 @@ def parseFabricCSV(fileName: str) -> Fabric:
|
530 | 529 | continue
|
531 | 530 | if i[0].startswith("Tile"):
|
532 | 531 | if "GENERATE" in i:
|
533 |
| - # import here to avoid circular import |
534 |
| - from FABulous.fabric_generator.gen_fabric.fabric_automation import ( |
535 |
| - generate_custom_tile_config, |
536 |
| - ) |
537 |
| - |
538 | 532 | # we generate the tile right before we parse everything
|
539 |
| - i[1] = str(generate_custom_tile_config(filePath.joinpath(i[1]))) |
| 533 | + i[1] = str(generateCustomTileConfig(filePath.joinpath(i[1]))) |
540 | 534 |
|
541 | 535 | new_tiles, new_commonWirePair = parseTilesCSV(filePath.joinpath(i[1]))
|
542 | 536 | tileTypes += [new_tile.name for new_tile in new_tiles]
|
|
0 commit comments