WA7USED = 0

from prjxray.segmaker import Segmaker

segmk = Segmaker("design.bits")

print("Loading tags")
'''
module,loc,c31,b31,a31
my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0
my_NDI1MUX_NI_NMC31,SLICE_X12Y101,1,1,1
my_NDI1MUX_NI_NMC31,SLICE_X12Y102,1,1,1
'''
f = open('params.csv', 'r')
f.readline()
for l in f:
    l = l.strip()
    module, loc, c31, b31, a31 = l.split(',')
    c31 = int(c31)
    b31 = int(b31)
    a31 = int(a31)
    segmk.add_site_tag(loc, "ADI1MUX.AI", 1 ^ a31)
    segmk.add_site_tag(loc, "BDI1MUX.BI", 1 ^ b31)
    segmk.add_site_tag(loc, "CDI1MUX.CI", 1 ^ c31)

segmk.compile()
segmk.write()

WA7USED = 0

from prjxray.segmaker import Segmaker

segmk = Segmaker("design.bits")

print("Loading tags")
'''
module,loc,c31,b31,a31
my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0
my_NDI1MUX_NI_NMC31,SLICE_X12Y101,1,1,1
my_NDI1MUX_NI_NMC31,SLICE_X12Y102,1,1,1
'''
f = open('params.csv', 'r')
f.readline()
for l in f:
    l = l.strip()
    module, loc, c31, b31, a31 = l.split(',')
    c31 = int(c31)
    b31 = int(b31)
    a31 = int(a31)
    segmk.add_site_tag(loc, "ALUT.DI1MUX.AI", 1 ^ a31)
    segmk.add_site_tag(loc, "BLUT.DI1MUX.BI", 1 ^ b31)
    segmk.add_site_tag(loc, "CLUT.DI1MUX.CI", 1 ^ c31)

segmk.compile()
segmk.write()

Rename DI1MUX to be underneith the *LUT.
Rename DI1MUX to be underneith the *LUT.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

  WA7USED = 0
  
  from prjxray.segmaker import Segmaker
  
  segmk = Segmaker("design.bits")
  
  print("Loading tags")
  '''
  module,loc,c31,b31,a31
  my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0
  my_NDI1MUX_NI_NMC31,SLICE_X12Y101,1,1,1
  my_NDI1MUX_NI_NMC31,SLICE_X12Y102,1,1,1
  '''
  f = open('params.csv', 'r')
  f.readline()
  for l in f:
      l = l.strip()
      module, loc, c31, b31, a31 = l.split(',')
      c31 = int(c31)
      b31 = int(b31)
      a31 = int(a31)
-     segmk.add_site_tag(loc, "ADI1MUX.AI", 1 ^ a31)
+     segmk.add_site_tag(loc, "ALUT.DI1MUX.AI", 1 ^ a31)
-     segmk.add_site_tag(loc, "BDI1MUX.BI", 1 ^ b31)
+     segmk.add_site_tag(loc, "BLUT.DI1MUX.BI", 1 ^ b31)
-     segmk.add_site_tag(loc, "CDI1MUX.CI", 1 ^ c31)
+     segmk.add_site_tag(loc, "CLUT.DI1MUX.CI", 1 ^ c31)
  
  segmk.compile()
  segmk.write()
  
Rename DI1MUX to be underneith the *LUT.
## Code Before:
WA7USED = 0

from prjxray.segmaker import Segmaker

segmk = Segmaker("design.bits")

print("Loading tags")
'''
module,loc,c31,b31,a31
my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0
my_NDI1MUX_NI_NMC31,SLICE_X12Y101,1,1,1
my_NDI1MUX_NI_NMC31,SLICE_X12Y102,1,1,1
'''
f = open('params.csv', 'r')
f.readline()
for l in f:
    l = l.strip()
    module, loc, c31, b31, a31 = l.split(',')
    c31 = int(c31)
    b31 = int(b31)
    a31 = int(a31)
    segmk.add_site_tag(loc, "ADI1MUX.AI", 1 ^ a31)
    segmk.add_site_tag(loc, "BDI1MUX.BI", 1 ^ b31)
    segmk.add_site_tag(loc, "CDI1MUX.CI", 1 ^ c31)

segmk.compile()
segmk.write()

## Instruction:
Rename DI1MUX to be underneith the *LUT.
## Code After:
WA7USED = 0

from prjxray.segmaker import Segmaker

segmk = Segmaker("design.bits")

print("Loading tags")
'''
module,loc,c31,b31,a31
my_NDI1MUX_NI_NMC31,SLICE_X12Y100,1,1,0
my_NDI1MUX_NI_NMC31,SLICE_X12Y101,1,1,1
my_NDI1MUX_NI_NMC31,SLICE_X12Y102,1,1,1
'''
f = open('params.csv', 'r')
f.readline()
for l in f:
    l = l.strip()
    module, loc, c31, b31, a31 = l.split(',')
    c31 = int(c31)
    b31 = int(b31)
    a31 = int(a31)
    segmk.add_site_tag(loc, "ALUT.DI1MUX.AI", 1 ^ a31)
    segmk.add_site_tag(loc, "BLUT.DI1MUX.BI", 1 ^ b31)
    segmk.add_site_tag(loc, "CLUT.DI1MUX.CI", 1 ^ c31)

segmk.compile()
segmk.write()
