Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verilog vs liberty output mismatch #44

Closed
tetra12 opened this issue Dec 12, 2018 · 24 comments
Closed

Verilog vs liberty output mismatch #44

tetra12 opened this issue Dec 12, 2018 · 24 comments

Comments

@tetra12
Copy link

tetra12 commented Dec 12, 2018

Issue: Bug
Severity: High
Description: When I generate a default SRAM from your example for the latest gscl45 with -n option, the output verilog has OEb pin, which is NOT available in the liberty output. This results in a synthesis fail when I synthesize a wrapper for the generated memory. Pls fix this

@mguthaus
Copy link
Collaborator

Thanks, we are aware of this issue and it will be fixed in an upcoming release very soon.

We have separated the data bus into separate din and dout ports so the OEb is no longer necessary but was not removed from the verilog.

@tetra12
Copy link
Author

tetra12 commented Dec 12, 2018

Excellent, thank you! So I'll simply remove this OEb port from my verilog.

Another issue is related. Yosys fails to parse the liberty output in current format:
pin(DOUT0[63:0]){ ... }

My workaround is to remove brackets [63:0] and leave pin (DOUT0) {...}. Please remove this from your scripts as well

@tetra12
Copy link
Author

tetra12 commented Dec 16, 2018

Thank you. Waiting forward working with your next release. Any contributions required ?

@mguthaus
Copy link
Collaborator

mguthaus commented Dec 16, 2018 via email

@tetra12
Copy link
Author

tetra12 commented Dec 16, 2018

@mguthaus Yosys parses the *.lib files if you remove bus widths from pin descriptions :
pin(DOUT0[63:0]){ ... } -> pin(DOUT0){ ... }

I also made a verilog wrapper for your memories to match lib files. I was able to synthesize it with an updated lib file in Yosys.

@mguthaus
Copy link
Collaborator

mguthaus commented Dec 16, 2018 via email

@mguthaus
Copy link
Collaborator

mguthaus commented Dec 16, 2018 via email

@tetra12
Copy link
Author

tetra12 commented Dec 16, 2018

Pls leave your comment here too: https://www.reddit.com/r/yosys/comments/a4ovm6/liberty_syntax_support/

I'm working with Tim now. No problems in qflow with that. I don't have access to commercial tools, so pls check on your own or give me access to your tools for test purposes.

@tetra12
Copy link
Author

tetra12 commented Dec 17, 2018

I confirm that updated *.lib file works seamlessly with opensta. Synthesized, checked.
Please, follow my feedback and remove bus width in the next release.

Here's my wrapper for your SRAM. Feel free to update your verilog output as well

Thank you!

@mguthaus
Copy link
Collaborator

mguthaus commented Dec 17, 2018 via email

@mguthaus
Copy link
Collaborator

mguthaus commented Dec 17, 2018 via email

@tetra12
Copy link
Author

tetra12 commented Dec 17, 2018

I synthesized your SRAM with my verilog wrapper and run the opensta script to obtain timing report. I used OSU035 with a 10ns clock, which yielded in a 9.86ns slack. Do you want to get my scripts ?

@tetra12
Copy link
Author

tetra12 commented Dec 17, 2018

If you think it is the Yosys issue, pls feel free to open a RFC for this in the Yosys repo. If you want to double check my scripts, let me know. I'll share

@mguthaus
Copy link
Collaborator

mguthaus commented Dec 17, 2018 via email

@tetra12
Copy link
Author

tetra12 commented Dec 17, 2018

Pls check here

@tetra12
Copy link
Author

tetra12 commented Dec 18, 2018

Any follow up questions? Should I close this issue ?

@mguthaus
Copy link
Collaborator

mguthaus commented Dec 18, 2018 via email

@tetra12
Copy link
Author

tetra12 commented Jan 4, 2019

Happy New Year! Any news?

@mguthaus
Copy link
Collaborator

mguthaus commented Jan 4, 2019 via email

@mguthaus
Copy link
Collaborator

mguthaus commented Jan 9, 2019 via email

@tetra12
Copy link
Author

tetra12 commented Jan 10, 2019

Sounds great. Let me know if I can contribute in this project. I can do testing, validation, integration and verification, since I use your stuff in my commercial project.

If you have an idea, let me know

@mguthaus
Copy link
Collaborator

mguthaus commented Jan 10, 2019 via email

@tetra12 tetra12 closed this as completed Jan 11, 2019
@mguthaus
Copy link
Collaborator

I finally got to trying this out in Library Compiler and it fails without these bus notations.

Reading '/home/mrg/OpenRAMLibrary/deliverables/freepdk45/2019-02-21/sram_8b_512_1rw_freepdk45/sram_8b_512_1rw_freepdk45_TT_1p0V_25C.lib' ...
Error: Line 96, Cell 'sram_8b_512_1rw_freepdk45', bus 'DIN0', Invalid bus syntax is detected in 'DIN0'. (LBDB-176)
Error: Line 135, Cell 'sram_8b_512_1rw_freepdk45', bus 'DOUT0', Invalid bus syntax is detected in 'DOUT0'. (LBDB-176)
Error: Line 169, Cell 'sram_8b_512_1rw_freepdk45', bus 'ADDR0', Invalid bus syntax is detected in 'ADDR0'. (LBDB-176)

Unfortunately, I will need to add them back and we should fix Yosys.

@mguthaus mguthaus reopened this Feb 22, 2019
@mguthaus
Copy link
Collaborator

This issue was coincidentally opened 4 hours ago for Yosys:
YosysHQ/yosys#825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants