Skip to content

Commit

Permalink
Merge pull request kevinpt#5 from antmicro/master
Browse files Browse the repository at this point in the history
Adding library name, power section and flag for overriding output name
  • Loading branch information
mithro authored Nov 20, 2020
2 parents 97f24de + d07cf48 commit 9bb2dbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions symbolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ def parse_args():
parser = argparse.ArgumentParser(description='HDL symbol generator')
parser.add_argument('-i', '--input', dest='input', action='store', help='HDL source ("-" for STDIN)')
parser.add_argument('-o', '--output', dest='output', action='store', help='Output file')
parser.add_argument('--output-as-filename', dest='output_as_filename', action='store_true', help='The --output flag will be used directly as output filename')
parser.add_argument('-f', '--format', dest='format', action='store', default='svg', help='Output format')
parser.add_argument('-L', '--library', dest='lib_dirs', action='append',
default=['.'], help='Library path')
Expand Down Expand Up @@ -566,10 +567,9 @@ def main():
for comp, extractor in components:
comp.name = comp.name.strip('_')
reformat_array_params(comp)
if source == '<stdin>':
if source == '<stdin>' or args.output_as_filename:
fname = args.output
else:
base = os.path.splitext(os.path.basename(source))[0]
fname = '{}{}.{}'.format(
args.libname + "__" if args.libname is not None or args.libname != "" else "",
comp.name,
Expand Down

0 comments on commit 9bb2dbf

Please sign in to comment.