2017-11-08 08:03:21 +01:00
|
|
|
#!/usr/bin/env python3
|
2020-04-16 10:31:33 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
#
|
|
|
|
|
# Copyright (C) 2017-2020 The Project X-Ray Authors.
|
|
|
|
|
#
|
|
|
|
|
# Use of this source code is governed by a ISC-style
|
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
|
# https://opensource.org/licenses/ISC
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: ISC
|
2017-11-08 08:03:21 +01:00
|
|
|
|
2018-10-18 04:03:16 +02:00
|
|
|
from prjxray.segmaker import Segmaker
|
2017-11-08 08:03:21 +01:00
|
|
|
|
2018-10-22 21:04:55 +02:00
|
|
|
segmk = Segmaker("design.bits")
|
2017-11-08 08:03:21 +01:00
|
|
|
|
|
|
|
|
print("Loading tags from design.txt.")
|
|
|
|
|
with open("design.txt", "r") as f:
|
|
|
|
|
for line in f:
|
|
|
|
|
line, active = line.split()
|
|
|
|
|
tile, pip = line.split("/")
|
|
|
|
|
_, pip = pip.split(".")
|
|
|
|
|
|
|
|
|
|
print(tile, pip, active)
|
|
|
|
|
segmk.addtag(tile, pip, int(active))
|
|
|
|
|
|
|
|
|
|
segmk.compile()
|
|
|
|
|
segmk.write()
|