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

Verilator generates calls to an undefined function named: VL_SHIFTR_QQW #1415

Closed
veripoolbot opened this issue Apr 5, 2019 · 2 comments
Closed

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Apr 5, 2019


Author Name: Larry Lee (@llee454)
Original Redmine Issue: 1415 from https://www.veripool.org

Original Assignee: Larry Lee (@llee454)


Verilator is generating calls to a undefined function named VL_SHIFTR_QQW.

This bug is nearly identical to that reported in [[1412-Verilator-Verilator-generates-calls-to-an-undefined-function-named-VL_SHIFTL_QQW]]

I've found that defining this function in include/verilated.h fixes this issue. To resolve, simply add the following definition to include/verilated.h after VL_SHIFTR_IIW:

static inline QData VL_SHIFTR_QQW(int obits,int,int rbits,QData lhs, WDataInP rwp) VL_MT_SAFE {
     for (int i=1; i < VL_WORDS_I(rbits); ++i) {
         if (VL_UNLIKELY(rwp[i])) {  // Huge shift 1>>32 or more
             return 0;
         }
     }
     return VL_CLEAN_QQ(obits,obits,lhs>>(static_cast<QData>(rwp[0])));
}
</code>

I've created a Git fork with the necessary changes that can be pulled into your Git repo: https://github.com/llee454/verilator

  • Larry Lee
@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Apr 6, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-04-06T01:20:40Z


Thanks again for the patch.

Pushed to git towards 4.014.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented May 9, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-05-09T01:37:48Z


In 4.014.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.