Update OpenROAD parse_version() and version target
Newer versions of OpenROAD report version number differently.
@@ -60,7 +60,7 @@ def setup_tool(chip, mode='batch'):
chip.set('eda', tool, step, index, 'exe', tool, clobber=clobber)
chip.set('eda', tool, step, index, 'vswitch', '-version', clobber=clobber)
- chip.set('eda', tool, step, index, 'version', 'cf744a3734204ef12378150d429acf32af385ea4', clobber=clobber)
+ chip.set('eda', tool, step, index, 'version', 'v2.0', clobber=clobber)
chip.set('eda', tool, step, index, 'threads', os.cpu_count(), clobber=clobber)
chip.set('eda', tool, step, index, 'option', 'cmdline', option, clobber=clobber)
chip.set('eda', tool, step, index, 'refdir', refdir, clobber=clobber)
@@ -159,8 +159,16 @@ def setup_tool(chip, mode='batch'):
################################
def parse_version(stdout):
- # 1 08de3b46c71e329a10aa4e753dcfeba2ddf54ddd
- return stdout.split()[1]
+ # stdout will be in one of the following forms:
+ # - 1 08de3b46c71e329a10aa4e753dcfeba2ddf54ddd
+ # - 1 v2.0-880-gd1c7001ad
+ # - v2.0-1862-g0d785bd84
+
+ # strip off the "1" prefix if it's there
+ version = stdout.split()[-1]
+
+ # strip off extra details in new version styles
+ return version.split('-')[0]
def pre_process(chip):
step = chip.get('arg', 'step')
