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
Cell parameters representation is not correctly preserved during the whole synthesis + P&R flow resulting them having incorrect values in post P&N verilog file.
This may not be strictly a VPR issue but solving it may require enhancing it.
Expected Behaviour
A parameter of a cell in a design preserves its type and bit width throughout the whole synthesis + P&R flow.
Current Behaviour
Cell parameters expressed as binary numbers (eg. 4'b1010) end up in post P&R verilog netlis as integers (eg. 1010`). This renders any post P&R simulation impossible.
The journey of a parameter value through Yosys synthesis + VPR P&R flow looks like following:
Input Verilog netlist
For example a cell of type LUT may have a 1-bit wide INIT parameter set to 0110100101100001:
LUT #(.INIT(16'b0110100101100001)) my_lut (...);
The parameter is provided as an integer expressed in binary form.
Synthesized EBLIF netlist
Yosys stores EBLIF parameters either as quoted strings or as binary numbers where the number of digits is equal to the desired bit width of a parameter:
VPR preserves the parameter as it is throuought the P&R flow. The only place where it value matters is in the genfasm utility. genfasm binds each bit with its corresponding bit of an assigned multi-bit FASM feature.
VPR writes post P&R verilog netlist where the parameter values are assigned as they are:
LUT #(.INIT(0110100101100001)) my_lut (...);
Here the binary value is written as decimal which is obviously incorrect.
Possible Solution
I'm not entirely sure how this issue should be solved and whether at Yosys or VPR side. But I have a couple of ideas:
Modify EBLIF output in Yosys so that it can write 16'b0110100101100001 instead of 0110100101100001
Not sure though is there any "standard" for the extended BLIF and what it has to say about cell parameter types. This approach would also require modifying VPR (or just genfasm) to understand 16'b-like prefix.
Make VPR assume that all non-string cell parameters in EBLIF are binary integers. Use the knowledge to prepend appropriate prefix during post P&R verilog writeout.
Others ?
Steps to Reproduce
Context
QuickLogic architectures use custom cells for LUTs (not .names) which have INIT parameters mapped to FASM features. I want to make post P&R simulation of VPR-generated netlists possible.
Your Environment
VTR revision used:
Operating System and version:
Compiler version:
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Cell parameters representation is not correctly preserved during the whole synthesis + P&R flow resulting them having incorrect values in post P&N verilog file.
This may not be strictly a VPR issue but solving it may require enhancing it.
Expected Behaviour
A parameter of a cell in a design preserves its type and bit width throughout the whole synthesis + P&R flow.
Current Behaviour
Cell parameters expressed as binary numbers (eg.
4'b1010) end up in post P&R verilog netlis as integers (eg.
1010`). This renders any post P&R simulation impossible.The journey of a parameter value through Yosys synthesis + VPR P&R flow looks like following:
Input Verilog netlist
For example a cell of type
LUT
may have a 1-bit wideINIT
parameter set to0110100101100001
:The parameter is provided as an integer expressed in binary form.
Synthesized EBLIF netlist
Yosys stores EBLIF parameters either as quoted strings or as binary numbers where the number of digits is equal to the desired bit width of a parameter:
VPR preserves the parameter as it is throuought the P&R flow. The only place where it value matters is in the
genfasm
utility.genfasm
binds each bit with its corresponding bit of an assigned multi-bit FASM feature.VPR writes post P&R verilog netlist where the parameter values are assigned as they are:
Here the binary value is written as decimal which is obviously incorrect.
Possible Solution
I'm not entirely sure how this issue should be solved and whether at Yosys or VPR side. But I have a couple of ideas:
Modify EBLIF output in Yosys so that it can write
16'b0110100101100001
instead of0110100101100001
Not sure though is there any "standard" for the extended BLIF and what it has to say about cell parameter types. This approach would also require modifying VPR (or just
genfasm
) to understand16'b
-like prefix.Make VPR assume that all non-string cell parameters in EBLIF are binary integers. Use the knowledge to prepend appropriate prefix during post P&R verilog writeout.
Others ?
Steps to Reproduce
Context
QuickLogic architectures use custom cells for LUTs (not
.names
) which haveINIT
parameters mapped to FASM features. I want to make post P&R simulation of VPR-generated netlists possible.Your Environment
The text was updated successfully, but these errors were encountered: