Commit 5843ef38 by Zachary Snow

better error messaging for missing interfaces

parent 3597f4a6
...@@ -145,7 +145,10 @@ convertDescription interfaces modules (Part attrs extern Module lifetime name po ...@@ -145,7 +145,10 @@ convertDescription interfaces modules (Part attrs extern Module lifetime name po
expandPortBinding _ other = [other] expandPortBinding _ other = [other]
lookupModport :: Maybe Identifier -> Identifier -> Identifier -> Maybe [ModportDecl] lookupModport :: Maybe Identifier -> Identifier -> Identifier -> Maybe [ModportDecl]
lookupModport instanceName interfaceName = (Map.!?) modportMap lookupModport instanceName interfaceName =
if Map.member interfaceName interfaces
then (Map.!?) modportMap
else error $ "could not find interface " ++ show interfaceName
where where
prefix = maybe "" (++ "_") instanceName prefix = maybe "" (++ "_") instanceName
interfaceItems = interfaceItems =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment