Skip to content

Commit

Permalink
process_arguments: top module is main by default (this PR will break …
Browse files Browse the repository at this point in the history
…many examples. Use --top-module flag)
  • Loading branch information
Obijuan committed Feb 19, 2024
1 parent 449624e commit 2010bbe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apio/managers/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ def process_arguments(
for item in [ARCH, TYPE, SIZE, PACK, IDCODE]:
update_config_fpga_item(config, item, resources)

# -- Debug: Print current configuration
print_configuration(config)

# -- We already have a final configuration
# -- Check that this configuration is ok
# -- At least it should have fpga, type, size and pack
Expand All @@ -201,6 +198,14 @@ def process_arguments(
perror_insuficient_arguments()
raise ValueError(f"Missing FPGA {item.upper()}")

# -- Process the top-module
# -- If it has not set by arguments, give it the default value: main
if config[TOP_MODULE] is None:
config[TOP_MODULE] = "main"

# -- Debug: Print current configuration
print_configuration(config)

# -- Build Scons flag list
flags = serialize_scons_flags(
{
Expand Down

0 comments on commit 2010bbe

Please sign in to comment.