mirror of
https://github.com/openXC7/prjxray.git
synced 2026-08-22 14:06:54 +02:00
fuzzers: 007: run make format
Signed-off-by: Karol Gugala <[email protected]>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def fix_line(line, site, filetype):
|
def fix_line(line, site, filetype):
|
||||||
line = line.split()
|
line = line.split()
|
||||||
newline = list()
|
newline = list()
|
||||||
@@ -16,13 +17,13 @@ def fix_line(line, site, filetype):
|
|||||||
all_entries = 0
|
all_entries = 0
|
||||||
loc = 2
|
loc = 2
|
||||||
for site in range(0, sites_count):
|
for site in range(0, sites_count):
|
||||||
bels_count = int(line[loc + 1])
|
bels_count = int(line[loc + 1])
|
||||||
loc += 2
|
loc += 2
|
||||||
for bel in range(0, bels_count):
|
for bel in range(0, bels_count):
|
||||||
entries_count = int(line[loc + 1])
|
entries_count = int(line[loc + 1])
|
||||||
loc += 2
|
loc += 2
|
||||||
all_entries += entries_count
|
all_entries += entries_count
|
||||||
for entry in range(0, entries_count):
|
for entry in range(0, entries_count):
|
||||||
if filetype == 'timings':
|
if filetype == 'timings':
|
||||||
for delay_word in range(0, 6):
|
for delay_word in range(0, 6):
|
||||||
entries.append(line[loc])
|
entries.append(line[loc])
|
||||||
@@ -44,13 +45,19 @@ def fix_line(line, site, filetype):
|
|||||||
newline.extend(entries)
|
newline.extend(entries)
|
||||||
return " ".join(newline) + "\n"
|
return " ".join(newline) + "\n"
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('--txtin', type=str, help='Input text file')
|
parser.add_argument('--txtin', type=str, help='Input text file')
|
||||||
parser.add_argument('--txtout', type=str, help='Output text file')
|
parser.add_argument('--txtout', type=str, help='Output text file')
|
||||||
parser.add_argument('--site', type=str, help='Site to which the entries should be squashed')
|
parser.add_argument(
|
||||||
parser.add_argument('--slice', type=str, help='Slice for which the entries shall be fixed')
|
'--site',
|
||||||
parser.add_argument('--type', type=str, choices=['timings', 'pins', 'properties'])
|
type=str,
|
||||||
|
help='Site to which the entries should be squashed')
|
||||||
|
parser.add_argument(
|
||||||
|
'--slice', type=str, help='Slice for which the entries shall be fixed')
|
||||||
|
parser.add_argument(
|
||||||
|
'--type', type=str, choices=['timings', 'pins', 'properties'])
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
lines = list()
|
lines = list()
|
||||||
@@ -65,5 +72,6 @@ def main():
|
|||||||
for line in lines:
|
for line in lines:
|
||||||
fp.write(line)
|
fp.write(line)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -281,7 +281,8 @@ def read_raw_timings(fin, properties, pins, site_pins, pin_alias_map):
|
|||||||
|
|
||||||
# if we couldn't find input, check if the clock is the
|
# if we couldn't find input, check if the clock is the
|
||||||
# only input. This applies only to combinational paths
|
# only input. This applies only to combinational paths
|
||||||
if (sequential is None) and (bel_input is None) and (bel_clock is not None):
|
if (sequential is None) and (bel_input is None) and (
|
||||||
|
bel_clock is not None):
|
||||||
if bel_clock_orig_pin in site_pins[slice][site_name.lower()] and \
|
if bel_clock_orig_pin in site_pins[slice][site_name.lower()] and \
|
||||||
site_pins[slice][site_name.lower(
|
site_pins[slice][site_name.lower(
|
||||||
)][bel_clock_orig_pin]['direction'] == 'IN':
|
)][bel_clock_orig_pin]['direction'] == 'IN':
|
||||||
@@ -334,7 +335,6 @@ def read_raw_timings(fin, properties, pins, site_pins, pin_alias_map):
|
|||||||
orig_pin.lower(),
|
orig_pin.lower(),
|
||||||
speed_model_clean)
|
speed_model_clean)
|
||||||
|
|
||||||
|
|
||||||
# if we still don't have input, give up
|
# if we still don't have input, give up
|
||||||
if bel_input is None:
|
if bel_input is None:
|
||||||
delay_loc += 6
|
delay_loc += 6
|
||||||
|
|||||||
Reference in New Issue
Block a user