Make format.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2019-02-19 08:09:34 -08:00
parent 72ffe32e33
commit 8ff137435b
2 changed files with 19 additions and 15 deletions

View File

@ -17,7 +17,6 @@ def gen_sites(lr):
if gridinfo.tile_type[-1] != lr:
continue
sites = []
for site_name, site_type in gridinfo.sites.items():
if site_type in ['SLICEL', 'SLICEM']:
@ -30,14 +29,17 @@ def gen_sites(lr):
yield sorted(sites)
def yield_bits(bits, nvals):
for i in range(nvals):
mask = (1 << i)
yield int(bool(bits & mask))
NUM_IMUX_INPUTS = 2 * 6 * 4
NUM_TILES = 20
def emit_luts(choices, spec_idx, lr):
for idx, sites in enumerate(itertools.islice(gen_sites(lr), 0, NUM_TILES)):
@ -51,7 +53,8 @@ def emit_luts(choices, spec_idx, lr):
for site in sites:
for lut in range(4):
print('''
print(
'''
(* KEEP, DONT_TOUCH, LOC = "{site}" *)
LUT6 {site}_lut{lut} (
.I0({I0}),

View File

@ -244,6 +244,7 @@ def gen_fuzz_choices(nvals):
return choices
def gen_fuzz_states(nvals):
'''
Generates an optimal encoding to solve single bits as quickly as possible