Command Line Options Reference
Available Options
Option |
Function |
-t |
Specify top function if there are multiple functions in the same source file |
-asm |
Output SPIR-V assembly code |
-s |
Only run the SPIR-V generation |
-v |
Verbose, output debug information to console |
-dd |
Use a dark theme for the Graphviz diagrams |
To use an option simply pass it as an argument to the program: python3 titan/main.py -asm my_file.py
Source Code
titan.main.run_argparse()
Handles setting up and executing argparse.ArgumentParser
.
Returns:
Type |
Description |
Namespace
|
|
Source code in titan/main.py
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 | def run_argparse() -> argparse.Namespace:
""" Handles setting up and executing `argparse.ArgumentParser`.
Returns:
Parsed arguments
"""
parser = argparse.ArgumentParser(
description = "Compile a subset of Python into SystemVerilog. Visit https://titan-compiler-project.github.io/titan for more info."
)
parser.add_argument("source_file", help="python source file to compile")
parser.add_argument("-t", "--top", help="specify the top function")
parser.add_argument("-asm", help="output the SPIR-V assembly code", action="store_true")
parser.add_argument("-s", help="only run the SPIR-V generation", action="store_true", dest="run_spirv_only")
parser.add_argument("-v", "--verbose", help="output debug messages", action="store_true")
parser.add_argument("-dd", "--dark-dots", help="use dark theme when creating Graphviz dot graphs", action="store_true")
parser.add_argument("-y", "--gen-yosys", help="generate simple yosys script to visualise module", action="store_true")
parser.add_argument("-nc", "--no-comms", help="skip generating relevant comms interface files (output module only)", action="store_true")
return parser.parse_args()
|
Last update:
2024-08-07