diff --git a/fuzzers/036-iob-ologic/generate.py b/fuzzers/036-iob-ologic/generate.py index d9445a5c..bda4cf5b 100644 --- a/fuzzers/036-iob-ologic/generate.py +++ b/fuzzers/036-iob-ologic/generate.py @@ -37,6 +37,8 @@ def main(): handle_data_width(segmk, d) + segmk.add_site_tag(site, 'OSERDESE.IN_USE', d['use_oserdese2']) + if d['use_oserdese2']: segmk.add_site_tag(site, 'OQUSED', 1) if 'SRTYPE' in d: @@ -60,9 +62,11 @@ def main(): segmk.add_site_tag(site, 'Z' + opt, 1 ^ d[opt]) for opt in ['CLK', 'CLKDIV']: - k = 'IS_{}_INVERTED'.format(opt) - segmk.add_site_tag(site, k, d[k]) - segmk.add_site_tag(site, 'ZINV_{}'.format(opt), 1 ^ d[k]) + if d['{}_USED'.format(opt)]: + k = 'IS_{}_INVERTED'.format(opt) + segmk.add_site_tag(site, k, d[k]) + segmk.add_site_tag( + site, 'ZINV_{}'.format(opt), 1 ^ d[k]) for idx in range(4): k = 'IS_T{}_INVERTED'.format(idx + 1) diff --git a/fuzzers/036-iob-ologic/generate.tcl b/fuzzers/036-iob-ologic/generate.tcl index 85caab36..9cd70195 100644 --- a/fuzzers/036-iob-ologic/generate.tcl +++ b/fuzzers/036-iob-ologic/generate.tcl @@ -86,6 +86,7 @@ proc run {} { set_property CONFIG_VOLTAGE 3.3 [current_design] set_property BITSTREAM.GENERAL.PERFRAMECRC YES [current_design] set_property IS_ENABLED 0 [get_drc_checks {REQP-79}] + set_property IS_ENABLED 0 [get_drc_checks {REQP-144}] write_checkpoint -force design_pre_place.dcp diff --git a/fuzzers/036-iob-ologic/top.py b/fuzzers/036-iob-ologic/top.py index 2407fcf9..b55e5054 100644 --- a/fuzzers/036-iob-ologic/top.py +++ b/fuzzers/036-iob-ologic/top.py @@ -103,6 +103,16 @@ def use_oserdese2(p, luts, connects): p['IS_CLK_INVERTED'] = random.randint(0, 1) p['IS_CLKDIV_INVERTED'] = random.randint(0, 1) + clk_connections = '' + p['CLK_USED'] = random.randint(0, 1) + p['CLKDIV_USED'] = random.randint(0, 1) + if p['CLK_USED']: + clk_connections += ''' + .CLK({}),'''.format(luts.get_next_output_net()) + if p['CLKDIV_USED']: + clk_connections += ''' + .CLKDIV({}),'''.format(luts.get_next_output_net()) + print( ''' (* KEEP, DONT_TOUCH, LOC = "{ologic_loc}" *) @@ -134,8 +144,7 @@ def use_oserdese2(p, luts, connects): .OQ({owire}), {TFB} {TQ} - .CLK({clknet}), - .CLKDIV({clkdivnet}), + {clk_connections} .D1({d1net}), .D2({d2net}), .D3({d3net}), @@ -152,8 +161,7 @@ def use_oserdese2(p, luts, connects): .T4({t4net}), .TCE({tcenet}) );'''.format( - clknet=luts.get_next_output_net(), - clkdivnet=luts.get_next_output_net(), + clk_connections=clk_connections, rstnet=luts.get_next_output_net(), d1net=luts.get_next_output_net(), d2net=luts.get_next_output_net(),