liteeth_gen: Add optional --name parameter to configure generated verilog name.

This commit is contained in:
Florent Kermarrec 2024-03-18 13:46:37 +01:00
parent 2c67d13456
commit 0914fb5e51
1 changed files with 2 additions and 1 deletions

View File

@ -597,6 +597,7 @@ def main():
builder_args(parser) builder_args(parser)
parser.set_defaults(output_dir="build") parser.set_defaults(output_dir="build")
parser.add_argument("config", help="YAML config file") parser.add_argument("config", help="YAML config file")
parser.add_argument("--name", default="liteeth_core", help="Standalone core/module name")
args = parser.parse_args() args = parser.parse_args()
core_config = yaml.load(open(args.config).read(), Loader=yaml.Loader) core_config = yaml.load(open(args.config).read(), Loader=yaml.Loader)
@ -639,7 +640,7 @@ def main():
builder_arguments["csr_csv"] = os.path.join(builder_arguments["output_dir"], "csr.csv") builder_arguments["csr_csv"] = os.path.join(builder_arguments["output_dir"], "csr.csv")
builder = Builder(soc, **builder_arguments) builder = Builder(soc, **builder_arguments)
builder.build(build_name="liteeth_core") builder.build(build_name=args.name)
if __name__ == "__main__": if __name__ == "__main__":
main() main()