Jump to content


negative right shift


  • You cannot reply to this topic
3 replies to this topic

#1 cls_egr

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts

Posted 07 July 2008 - 01:10 PM

Hi,

I wondering how could I get rid of the warning "right shift count is negative". My data includes negative floating point numbers and it is a particular function that causes this warning. I tried to convert the parameters to the function to a positive value and a integer that tells whether that input is negative, but I still obtain the same error. Also I am not able to find the functions 'clk_delta' and 'init_proc' where that warning comes from. My current function works when implemented in hardware, but when using the SMD it provides me '1' as the result all the time. It would really help because I am trying to debug errors in my project when using the pragma CO PIPELINE.
Does anyone has a suggestion?

Thank you

cls

#2 cls_egr

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts

Posted 09 July 2008 - 08:50 AM

Hi,

I have found the file and the source of the problem.

Thank you

cls

#3 etrexel

    Advanced Member

  • Impulse Staff
  • PipPipPip
  • 260 posts

Posted 09 July 2008 - 03:54 PM

QUOTE (cls_egr @ Jul 9 2008, 10:50 AM) <{POST_SNAPBACK}>
Hi,

I have found the file and the source of the problem.

Thank you

cls

Hi,
SOunds like some of it was in the code created by SMD or no? any recommendations for other users?

Thanks,
Ed
Ed Trexel
Impulse Accelerated Technologies, Inc.

#4 cls_egr

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts

Posted 09 July 2008 - 06:24 PM

QUOTE (etrexel @ Jul 9 2008, 06:54 PM) <{POST_SNAPBACK}>
Hi,
SOunds like some of it was in the code created by SMD or no? any recommendations for other users?

Thanks,
Ed


Hi,

Yes, I obtained the error when trying to debug the code using the SMD. I guess like you said, it(the error(s)) might be compiler dependent, because it synthesized and worked correctly in the platform. My problem specifically was when I trying to do a comparison, like a case-switch statment with floating point values (positive and negative). After multiple attempts, I end up just changing the comparison values to integers by multiplying a multiple of 10, but in my final computation using my original float value. I guess it is application specific, but it worked for my case. I still do not understand why it would employ a shift for that section of the code. I was not aware, but when using the SMD, an "SMD" folder is created and contains the code generated and any error related to SMD simulation can be traced back to the files in that folder.

Thank you

cls





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users