Run make format.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2019-07-23 17:21:26 -07:00
parent 879e3c9eb9
commit fa2f61f914
2 changed files with 37 additions and 34 deletions

View File

@ -76,10 +76,10 @@ def create_sites_from_fasm(fasm_file):
sites[key]['type'] = ['IOBUF', 'IOBUF_INTERMDISABLE']
else:
sites[key]['type'] = [
"OBUF",
"OBUFDS_DUAL_BUF",
"OBUFTDS_DUAL_BUF",
]
"OBUF",
"OBUFDS_DUAL_BUF",
"OBUFTDS_DUAL_BUF",
]
return sites
@ -131,9 +131,9 @@ def process_specimen(fasm_file, params_json):
iostandard = iostandard[5:]
assert iostandard in site_from_fasm['IOSTANDARDS'], (
p['IOSTANDARD'],
site_from_fasm['IOSTANDARDS'],
)
p['IOSTANDARD'],
site_from_fasm['IOSTANDARDS'],
)
if p['type'] != 'IBUF':
if verilog.unquote(p['SLEW']) == '':
@ -159,10 +159,13 @@ def process_specimen(fasm_file, params_json):
else:
# Check that drive is at default
assert 'I12' in site_from_fasm['DRIVES'], (
tile, site_key, p['DRIVE'], site_from_fasm['DRIVES'])
tile, site_key, p['DRIVE'],
site_from_fasm['DRIVES'])
else:
assert 'I{}'.format(p['DRIVE']) in site_from_fasm['DRIVES'], (
tile, site_key, p['DRIVE'], site_from_fasm['DRIVES'])
assert 'I{}'.format(
p['DRIVE']) in site_from_fasm['DRIVES'], (
tile, site_key, p['DRIVE'],
site_from_fasm['DRIVES'])
def scan_specimens():
@ -170,8 +173,8 @@ def scan_specimens():
if os.path.basename(root).startswith('specimen_'):
print('Processing', os.path.basename(root))
process_specimen(
fasm_file=os.path.join(root, 'design.fasm'),
params_json=os.path.join(root, 'params.json'))
fasm_file=os.path.join(root, 'design.fasm'),
params_json=os.path.join(root, 'params.json'))
print('No errors found!')

View File

@ -1,29 +1,29 @@
proc write_iobuf_report {filename} {
set fp [open $filename w]
puts $fp "{ \"tiles\": \["
foreach port [get_ports] {
set net [get_nets -of $port]
if { $net == "" } {
continue
foreach port [get_ports] {
set net [get_nets -of $port]
if { $net == "" } {
continue
}
set cell [get_cells -of $net]
set site [get_sites -of $cell]
set tile [get_tiles -of $site]
puts $fp "{"
puts $fp "\"port\": \"$port\","
puts $fp "\"pad_wire\": \"$net\","
puts $fp "\"cell\": \"$cell\","
puts $fp "\"site\": \"$site\","
puts $fp "\"tile\": \"$tile\","
puts $fp "\"type\": \"[get_property REF_NAME $cell]\","
puts $fp "\"IOSTANDARD\": \"\\\"[get_property IOSTANDARD $cell]\\\"\","
puts $fp "\"PULLTYPE\": \"\\\"[get_property PULLTYPE $cell]\\\"\","
puts $fp "\"DRIVE\": \"[get_property DRIVE $cell]\","
puts $fp "\"SLEW\": \"\\\"[get_property SLEW $cell]\\\"\","
puts $fp "},"
}
set cell [get_cells -of $net]
set site [get_sites -of $cell]
set tile [get_tiles -of $site]
puts $fp "{"
puts $fp "\"port\": \"$port\","
puts $fp "\"pad_wire\": \"$net\","
puts $fp "\"cell\": \"$cell\","
puts $fp "\"site\": \"$site\","
puts $fp "\"tile\": \"$tile\","
puts $fp "\"type\": \"[get_property REF_NAME $cell]\","
puts $fp "\"IOSTANDARD\": \"\\\"[get_property IOSTANDARD $cell]\\\"\","
puts $fp "\"PULLTYPE\": \"\\\"[get_property PULLTYPE $cell]\\\"\","
puts $fp "\"DRIVE\": \"[get_property DRIVE $cell]\","
puts $fp "\"SLEW\": \"\\\"[get_property SLEW $cell]\\\"\","
puts $fp "},"
}
puts $fp "\]}"
close $fp
}