SystemRDL/systemrdl-compiler

Iterator that provides MemNodes?

kele14x opened this issue · 2 comments

Hi, is there any iterator that provides nodes for all immediate memory (MemNode) of component? Seems that there are function like signals(), fields(), registers(), but not memory.

I stopped adding those specialized methods because it is just as easy to use the generic children() iterator to do the following:

for child in node.children():
    if not isinstance(child, MemNode):
        continue
    # after this, child is always MemNode

Hi @amykyta3,

Thanks for your answer! I will try this way.