Add IN_TERM fuzzing.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2019-07-26 14:21:40 -07:00
parent 73b3342adb
commit f723091e50
3 changed files with 42 additions and 2 deletions

View File

@ -85,6 +85,13 @@ def main():
site, '_'.join(STEPDOWN_IOSTANDARDS) + '.STEPDOWN',
iostandard in STEPDOWN_IOSTANDARDS)
if 'IN_TERM' in d:
segmaker.add_site_group_zero(
segmk, site, 'IN_TERM.', [
'NONE', 'UNTUNED_SPLIT_40', 'UNTUNED_SPLIT_50',
'UNTUNED_SPLIT_60'
], 'NONE', d['IN_TERM'])
if d['type'] is None:
segmk.add_site_tag(site, 'INOUT', 0)
segmk.add_site_tag(site, '{}.IN_USE'.format(iostandard), 0)

View File

@ -44,6 +44,7 @@ proc loc_pins {} {
set drive [lindex $line 4]
set slew [lindex $line 5]
set pulltype [lindex $line 6]
set in_term [lindex $line 7]
# Have: site
# Want: pin for site
@ -69,6 +70,10 @@ proc loc_pins {} {
lappend props SLEW $slew
}
if {$in_term != "None"} {
lappend props IN_TERM $in_term
}
puts $props
set_property -dict "$props" $port

View File

@ -62,6 +62,19 @@ def run():
"SSTL135": ["DIFF_SSTL135"],
}
IN_TERM_ALLOWED = [
'SSTL15',
'SSTL15_R',
'SSTL18',
'SSTL18_R',
'SSTL135',
'SSTL135_R',
'HSTL_I'
'HSTL_I_18'
'HSTL_II',
'HSTL_II_18',
]
iostandard = random.choice(iostandards)
if iostandard in ['LVTTL', 'LVCMOS18']:
@ -149,6 +162,15 @@ def run():
p['SLEW'] = None
p['IBUF_LOW_PWR'] = random.randint(0, 1)
if iostandard in IN_TERM_ALLOWED:
p['IN_TERM'] = random.choice(
(
'NONE',
'UNTUNED_SPLIT_40',
'UNTUNED_SPLIT_50',
'UNTUNED_SPLIT_60',
))
i_idx += 1
elif p['type'] == 'IBUFDS':
p['pad_wire'] = 'di[{}]'.format(i_idx)
@ -228,9 +250,15 @@ def run():
if p['type'] is not None:
tile_params.append(
(
tile, site, p['pad_wire'], iostandard_site, p['DRIVE'],
tile,
site,
p['pad_wire'],
iostandard_site,
p['DRIVE'],
verilog.unquote(p['SLEW']) if p['SLEW'] else None,
verilog.unquote(p['PULLTYPE'])))
verilog.unquote(p['PULLTYPE']),
p['IN_TERM'] if 'IN_TERM' in p else None,
))
params['tiles'].append(p)
write_params(tile_params)