Files
prjxray/fuzzers/013-clb-ncy0/generate.py

35 lines
780 B
Python
Raw Permalink Normal View History

2017-12-01 16:56:21 -08:00
#!/usr/bin/env python3
# -*- 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-12-01 16:56:21 -08:00
from prjxray.segmaker import Segmaker
2017-12-01 16:56:21 -08:00
2018-10-22 12:04:55 -07:00
segmk = Segmaker("design.bits")
2017-12-01 16:56:21 -08:00
print("Loading tags")
'''
module,loc,bel,n
clb_NCY0_MX,SLICE_X12Y100,A6LUT,3
clb_NCY0_O5,SLICE_X16Y100,C6LUT,0
clb_NCY0_O5,SLICE_X17Y100,A6LUT,2
'''
f = open('params.csv', 'r')
f.readline()
for l in f:
2018-01-09 14:45:26 -08:00
module, loc, bel, n = l.split(',')
2017-12-01 16:56:21 -08:00
n = int(n)
# A, B, etc
which = bel[0]
# One bit, set on O5
2018-10-17 20:11:20 -07:00
segmk.add_site_tag(loc, "CARRY4.%cCY0" % which, module == 'clb_NCY0_O5')
2017-12-01 16:56:21 -08:00
segmk.compile()
segmk.write()