Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
VCVT
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
3 replies
Subscribers
126 subscribers
Views
2012 views
Users
0 members are here
Related
VCVT
Offline
pachu pachu
over 7 years ago
Note: This was originally posted on 7th July 2009 at http://forums.arm.com
Hello all,
We are facing an issue with conversion from float to integer
the following parallel instruction seems to be working...
vcvt.f32.s32 q0,q0 @ converting rect[0] tr.x,y tr.width,height to float
vcvt.f32.s32 q1,q1 @ converting rect[1] tr.x,y tr.width,height to float
the same thing when tried the other way, ie float to integer seems to be going wrong. Doesnt seem to be rounding to the nearest integer, rather truncating the decimal part and returning the int.
vcvt.s32.f32 q0,q0 @ converting rect[0] tr.weight,a,b,cto int
vcvt.s32.f32 q1,q1 @ converting rect[1] tr.weight,a,b,cto int
but if we put each single precesion instruction it seems to be working
vcvt.s32.f32 s0,s0
vcvt.s32.f32 s1,s1
vcvt.s32.f32 s2,s2
vcvt.s32.f32 s3,s3
kindly suggest if we are doing anything wrong.
thanks and regards
pachu
Offline
Simon Craske
over 7 years ago
Note: This was originally posted on 7th July 2009 at
http://forums.arm.com
Is this on a simulator or real hardware?
s.
Cancel
Up
0
Down
Reply
Cancel
Offline
Peter Harris
over 7 years ago
Note: This was originally posted on 9th July 2009 at
http://forums.arm.com
Your results look right to me -
The NEON vector unit is defined to always round towards zero for float to integer conversions.
The scalar single precision instruction executes on the VFP unit, which normally uses the round towards zero rounding mode, but can optionally use the rounding mode specified by the FPSCR.
If you are seeing "different" behavior between the two, I'd strongly suspect someone has changed the VFP configuration in the FPSCR - but note that this configuration only affects the VFP unit, not the SIMD NEON unit.
Cancel
Up
0
Down
Reply
Cancel
Offline
pachu pachu
over 7 years ago
Note: This was originally posted on 9th July 2009 at
http://forums.arm.com
Is this on a simulator or real hardware?
s.
Hello,
this is real mode (On the board) (TI-OMAP3430 SDP)
gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126)
We do not have a simulator.
thanks and regards
pachu
Cancel
Up
0
Down
Reply
Cancel
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Answered
Errors while importing CCS project into IAR project
+1
Arm Compiler
458
views
1
reply
Latest
1 month ago
by
Andy Neil
Answered
Connecting to multiple cores with command line debugger?
0
DS-5 Debugger
1321
views
2
replies
Latest
1 month ago
by
Alex Earl
Answered
ARM Toolchain Visual Studio Code
+1
1500
views
6
replies
Latest
1 month ago
by
Andy Neil
Answered
Automation for IAR build and run
+1
1614
views
1
reply
Latest
1 month ago
by
Stephen Theobald
Answered
index are changing with the voltage apply to the adc
+1
1986
views
2
replies
Latest
1 month ago
by
Vishal_Patel
<
>
View all questions in Arm Development Studio forum