You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Pyosys to write a custom synthesis pass and I need to access the Verilog block names to implement different variations of the custom synthesis pass.
The block name information is parsed but it seems to be ignored after parsing. Is this information accessible in any way? If not would it be possible to support this by including the block name as an additional process attribute and also annotate the objects inside the named process block with this attribute? This will be very helpful to identify the objects in a specified block use custom synthesis passes to process them accordingly.
-- Running command `read_verilog name_test.v' --
1. Executing Verilog-2005 frontend: name_test.v
Parsing Verilog input from `name_test.v' to AST representation.
name_test.v:9: ERROR: Begin label (block_ff) and end label (block_ff1) don't match.
When the block name is correctly modified to 'block_ff' in both locations the parsing is successful. But the only attribute that is visible is the 'src' attribute that stores the line numbers associated with the process block. The block name seems to be ignored.
# IPython log
# -----------
In [2]: mod = design.top_module()
In [3]: mod.processes
Out[3]: {IdString "$proc$name_test.v:7$1": Process "$proc$name_test.v:7$1"}
In [4]: proc = [i for i in mod.processes.values()][0]
In [5]: proc.name
Out[5]: IdString "$proc$name_test.v:7$1"
In [6]: proc.attributes
Out[6]: {IdString "\src": Const "011011100110000101101101011001010101111101110100011001010111001101110100001011100111011000111010001
1011100101110001100100010110100111001001011100011000100111000"}
In [7]: proc.get_src_attribute()
Out[7]: 'name_test.v:7.2-9.18'
This discussion was converted from issue #2603 on August 13, 2021 09:56.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I am using Pyosys to write a custom synthesis pass and I need to access the Verilog block names to implement different variations of the custom synthesis pass.
The block name information is parsed but it seems to be ignored after parsing. Is this information accessible in any way? If not would it be possible to support this by including the block name as an additional process attribute and also annotate the objects inside the named process block with this attribute? This will be very helpful to identify the objects in a specified block use custom synthesis passes to process them accordingly.
Thank you.
=================================================================================
Notes/examples:
Beta Was this translation helpful? Give feedback.
All reactions