From 80c7d29412c479472e7f4219975092cc06fbe863 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Mon, 9 May 2022 01:50:20 -0400 Subject: [PATCH] A minor correction the gen_gpio_defaults.py script to ensure that (#95) it will recognize all block cell types in the gate level netlist after having been run previously. The former code was only looking for numeric digits in the cell name, but the cell name suffix is hex, not integer, and so the script needs to add a check for the letters A-F or a-f in the cell name suffix. This is not an immediate issue because the two default values used are "0403" and "1803" and happen not to have any alphabetic hex digits. But if it were deemed necessary to change a default, then this script should not break. --- scripts/gen_gpio_defaults.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gen_gpio_defaults.py b/scripts/gen_gpio_defaults.py index 9befac24..9eaeb487 100755 --- a/scripts/gen_gpio_defaults.py +++ b/scripts/gen_gpio_defaults.py @@ -362,8 +362,8 @@ if __name__ == '__main__': # Do the same to the top gate-level verilog - inst1rex = re.compile('[ \t]*(gpio_defaults_block_?[0-9]*)[ \t]+.?gpio_defaults_block_([0-9]+).([0-9]+)') - inst2rex = re.compile('[ \t]*(gpio_defaults_block_?[0-9]*)[ \t]+gpio_defaults_block_([0-9]+)') + inst1rex = re.compile('[ \t]*(gpio_defaults_block_?[0-1]?[0-9A-Fa-f]*)[ \t]+.?gpio_defaults_block_([0-9]+).([0-9]+)') + inst2rex = re.compile('[ \t]*(gpio_defaults_block_?[0-1]?[0-9A-Fa-f]*)[ \t]+gpio_defaults_block_([0-9]+)') if testmode: print('Test only: Caravel top gate-level verilog:')