Skip to content

Commit

Permalink
Include lib name on hdl directive warnings (0.3.9)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Marques <jorge.marques@analog.com>
  • Loading branch information
gastmaier committed Feb 15, 2024
1 parent f822d53 commit 88ef69e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion adi_doctools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .directive import setup as directive_setup
from .role import setup as role_setup

__version__ = "0.3.8"
__version__ = "0.3.9"


def get_navigation_tree(app, context, pagename):
Expand Down
16 changes: 8 additions & 8 deletions adi_doctools/directive/hdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def pretty_dep(self, string):
return ''
return string.replace("'MODELPARAM_VALUE.", '').replace("'", '')

def tables(self, subnode, content, component):
def tables(self, subnode, content, component, lib_name):
description = self.get_descriptions(content)

if component is None:
Expand Down Expand Up @@ -123,7 +123,7 @@ def tables(self, subnode, content, component):

for tag in description:
if tag not in bs and tag not in pr:
logger.warning(f"Signal {tag} defined in the directive does not exist in the IP-XACT (component.xml)!")
logger.warning(f"Signal {tag} defined in the hdl-interfaces directive does not exist in the IP-XACT ({lib_name}/component.xml)!")

return subnode

Expand All @@ -140,9 +140,9 @@ def run(self):

manage_hdl_component_late(env, lib_name)
if lib_name in env.component:
self.tables(node, self.content, env.component[lib_name])
self.tables(node, self.content, env.component[lib_name], lib_name)
else:
self.tables(node, self.content, None)
self.tables(node, self.content, None, lib_name)

return [node]

Expand Down Expand Up @@ -266,7 +266,7 @@ def dot_fix(self, string):
else:
return string

def tables(self, content, parameter):
def tables(self, content, parameter, lib_name):
description = self.get_descriptions(content)

if parameter is None:
Expand Down Expand Up @@ -310,7 +310,7 @@ def tables(self, content, parameter):

for tag in description:
if tag not in parameter:
logger.warning(f"{tag} defined in the directive does not exist in the IP-XACT (component.xml)!")
logger.warning(f"{tag} defined in the hdl-parameters directive does not exist in the IP-XACT ({lib_name}/component.xml)!")

return table

Expand All @@ -327,9 +327,9 @@ def run(self):
manage_hdl_component_late(env, lib_name)
subnode = nodes.section(ids=["hdl-parameters"])
if lib_name in env.component:
subnode += self.tables(self.content, env.component[lib_name]['parameters'])
subnode += self.tables(self.content, env.component[lib_name]['parameters'], lib_name)
else:
subnode += self.tables(self.content, None)
subnode += self.tables(self.content, None, lib_name)

node += subnode

Expand Down

0 comments on commit 88ef69e

Please sign in to comment.