Skip to content

Commit f4e3e3d

Browse files
Merge pull request #3282 from verilog-to-routing/titan_golden_results_update
Titan golden results update
2 parents 84ec20c + b023841 commit f4e3e3d

File tree

5 files changed

+51
-37
lines changed

5 files changed

+51
-37
lines changed

libs/libvqm/vqm_parser.l

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
%%
4040
^[ \t]*\/\/[^\n\r]*(\n|\r\n) /* skip one-line comments */
4141
^[ \t]*\(\*[^\n\r]*\*\) /* skip synthesis attributes and directives */
42-
[ \t]+ /* skip white spaces */
42+
[ \t\n\r]+ /* skip white spaces */
4343
! /* skip the logical operator ! applied on the input ports of the lut - this results in lut mask not being valid anoymore */
4444
(\n|\r\n) /* skip empty lines */
4545
module return TOKEN_MODULE;
@@ -58,6 +58,11 @@ assign return TOKEN_ASSIGN;
5858
strncpy(yylval.string, yytext, yyleng+1);
5959
return TOKEN_REGULARID;
6060
}
61+
~[a-zA-Z_][a-zA-Z_0-9$]* {
62+
yylval.string = (char *)malloc(yyleng);
63+
strncpy(yylval.string, yytext+1, yyleng);
64+
return TOKEN_REGULARID;
65+
}
6166
[-]?[1-9][0-9]*|0+ {
6267
yylval.value = atoi(yytext);
6368
return TOKEN_INTCONSTANT;

vtr_flow/scripts/download_titan.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def parse_args():
4646
)
4747

4848
parser.add_argument(
49-
"--titan_version", default="2.0.0", help="Titan release version to download"
49+
"--titan_version", default="2.1.0", help="Titan release version to download"
5050
)
5151
parser.add_argument(
5252
"--vtr_flow_dir",
@@ -198,7 +198,7 @@ def extract_to_vtr_flow_dir(args, tar_gz_filename):
198198
for filename in filenames:
199199
src_file_path = os.path.join(dirpath, filename)
200200
dst_file_path = None
201-
for benchmark_subdir in ["titan_new", "titan23", "other_benchmarks"]:
201+
for benchmark_subdir in get_benchmark_subdirs(args):
202202
if compare_versions(args.titan_version, "2") >= 1:
203203
# if it is a 2.0.0 titan release or later use device family in the benchmark directory
204204
device_families = get_device_families(args)
@@ -252,7 +252,7 @@ def extract_to_vtr_flow_dir(args, tar_gz_filename):
252252

253253

254254
def create_titan_blif_subdirs(titan_benchmarks_extract_dir, args):
255-
for benchmark_subdir in ["titan_new", "titan23", "other_benchmarks"]:
255+
for benchmark_subdir in get_benchmark_subdirs(args):
256256
titan_benchmark_subdir = os.path.join(titan_benchmarks_extract_dir, benchmark_subdir)
257257
if os.path.exists(titan_benchmark_subdir):
258258
shutil.rmtree(titan_benchmark_subdir)
@@ -286,7 +286,7 @@ def determine_sdc_name(dirpath):
286286

287287
def extract_callback(members, args):
288288
for tarinfo in members:
289-
for benchmark_subdir in ["titan_new", "titan23", "other_benchmarks"]:
289+
for benchmark_subdir in get_benchmark_subdirs(args):
290290

291291
if compare_versions(args.titan_version, "2") >= 1:
292292
# if it is a 2.0.0 titan release or later use device family in the benchmark directory
@@ -321,6 +321,15 @@ def extract_callback(members, args):
321321
print(tarinfo.name)
322322
yield tarinfo
323323

324+
def get_benchmark_subdirs(args):
325+
"""
326+
Decide which benchmark subdirectories to use depending on version
327+
"""
328+
if compare_versions(args.titan_version, "2.1.0") >= 1:
329+
# version is 2.1.0 or higher
330+
return ["titanium", "titan23", "other_benchmarks"]
331+
else:
332+
return ["titan_new", "titan23", "other_benchmarks"]
324333

325334
def compare_versions(version1, version2):
326335
"""

0 commit comments

Comments
 (0)