diff --git a/scripts/gen_gpio_defaults.py b/scripts/gen_gpio_defaults.py index 5f045ebf..a108c349 100755 --- a/scripts/gen_gpio_defaults.py +++ b/scripts/gen_gpio_defaults.py @@ -66,6 +66,7 @@ import os import sys import re +import glob import subprocess def usage(): @@ -211,6 +212,12 @@ def usage(): cellsused = [None] * 38 + # Remove pre-existing versions of mag and verilog files because they may be out-of-date. + for old_mag_file in glob.glob(magpath + '/gpio_defaults_block_*.mag'): + os.remove(old_mag_file) + for old_verilog_file in glob.glob(glpath + '/gpio_defaults_block_*.v'): + os.remove(old_verilog_file) + for i in range(0, 38): config_name = '`USER_CONFIG_GPIO_' + str(i) + '_INIT' try: