Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libs/libvqm/vqm_parser.l
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
%%
^[ \t]*\/\/[^\n\r]*(\n|\r\n) /* skip one-line comments */
^[ \t]*\(\*[^\n\r]*\*\) /* skip synthesis attributes and directives */
[ \t]+ /* skip white spaces */
[ \t\n\r]+ /* skip white spaces */
! /* skip the logical operator ! applied on the input ports of the lut - this results in lut mask not being valid anoymore */
(\n|\r\n) /* skip empty lines */
module return TOKEN_MODULE;
Expand All @@ -58,6 +58,11 @@ assign return TOKEN_ASSIGN;
strncpy(yylval.string, yytext, yyleng+1);
return TOKEN_REGULARID;
}
~[a-zA-Z_][a-zA-Z_0-9$]* {
yylval.string = (char *)malloc(yyleng);
strncpy(yylval.string, yytext+1, yyleng);
return TOKEN_REGULARID;
}
[-]?[1-9][0-9]*|0+ {
yylval.value = atoi(yytext);
return TOKEN_INTCONSTANT;
Expand Down
17 changes: 13 additions & 4 deletions vtr_flow/scripts/download_titan.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def parse_args():
)

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


def create_titan_blif_subdirs(titan_benchmarks_extract_dir, args):
for benchmark_subdir in ["titan_new", "titan23", "other_benchmarks"]:
for benchmark_subdir in get_benchmark_subdirs(args):
titan_benchmark_subdir = os.path.join(titan_benchmarks_extract_dir, benchmark_subdir)
if os.path.exists(titan_benchmark_subdir):
shutil.rmtree(titan_benchmark_subdir)
Expand Down Expand Up @@ -286,7 +286,7 @@ def determine_sdc_name(dirpath):

def extract_callback(members, args):
for tarinfo in members:
for benchmark_subdir in ["titan_new", "titan23", "other_benchmarks"]:
for benchmark_subdir in get_benchmark_subdirs(args):

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

def get_benchmark_subdirs(args):
"""
Decide which benchmark subdirectories to use depending on version
"""
if compare_versions(args.titan_version, "2.1.0") >= 1:
# version is 2.1.0 or higher
return ["titanium", "titan23", "other_benchmarks"]
else:
return ["titan_new", "titan23", "other_benchmarks"]

def compare_versions(version1, version2):
"""
Expand Down
Loading