Naming restrictions of RFNoC blocks generated using rfnocmodtool
Closed this issue · 1 comments
Hello,
is there a particular reason why only alphanumerical symbols are allowed in the names of NoC blocks? In particular, is there any issue having underscores or hyphens in the name? rfnocmodtool would reject such names, although "factory" NoC blocks often have underscores in their names.
if not re.match('^([a-zA-Z]+[0-9a-zA-Z]*)$', self._info['blockname']):
raise ModToolException('Invalid block name.')
This is by design. The reason why we do this is that, under the hood, we use underscores to designate block identifiers, as you have noticed. This means, for example, that under the hood we refer to the "RFNoC: Radio" on channel 0 as 0/Radio_0 and so on. Given this, some naming that has underscores in it will lead to code mismatches and conflicts that could only be solved by code refactoring. This is the reason why we just added this constraint as a requirement.
By modifying the line that you are pointing out you can take out the requirement, clearly being aware of the risks.
Closing as this represents no issue of the SW. Please refer to the mailing list for if a broader discussion is required.