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_SHIFTL_QQW #1412

Closed
veripoolbot opened this issue Mar 28, 2019 · 3 comments
Closed

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Mar 28, 2019


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

Original Assignee: Larry Lee (@llee454)


Verilator is generating calls to a 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_SHIFTL_IIW:

static inline QData VL_SHIFTL_QQW(int obits,int,int rbits,IData 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<<rwp[0]);                                                     
}   
</code>

I've created a Git fork with the necessary changes that can be pulled into your Git repo.

  • Larry Lee
@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 28, 2019


Original Redmine Comment
Author Name: Larry Lee (@llee454)
Original Date: 2019-03-28T18:11:29Z


https://github.com/llee454/verilator

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 29, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-03-29T00:20:25Z


Thanks for the patch, very close, just had to make a minor change in that it needs to be passed QData input to avoid truncating upper 32 bits.

Fixed in 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:41Z


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.