Skip to content

Commit

Permalink
Add warning for when no modules are found
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Oct 24, 2018
1 parent ee0575d commit 5358065
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions magma/fromverilog.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ def FromVerilog(source, func, type_map, target_modules=None):
except Exception as e:
logger.warning(f"Could not parse module {node.name} ({e}), "
f"skipping")
if not modules:
logger.warning(f"Did not import any modules from verilog, either could "
f"not parse or could not find any of the target_modules "
f"({target_modules})")
return modules

def FromVerilogFile(file, func, type_map, target_modules=None):
Expand Down

0 comments on commit 5358065

Please sign in to comment.