Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Miss post>>Code Challenge: optimize c function using labview icons. VI and c-code given!

{Edit: Sorry, I did intent for this to go into the LabVIEW section.. although, you can execute all the code on RT targets, as it does not involve floating operatins.. you could do it on the FPGA too..

****
REPLY TO THIS THREAD INSTEAD:
http://forums.ni.com/ni/board/message?board.id=170&message.id=168392
****
/Edit}

Hi!

To pat myself on the back while keeping an eye out to see if anyone out there can do it better, I'd like to post a quick challenge! -Mostly though, the tribute goes to these two:
Original Code: Ashley Roll
C-code Optimisations: Scott Dattalo
(LabVIEW Port: Kjell-Edmund Ims)

In the VI, I have posted the original C-code (open source, includes url's and references to original authors), as well as my adaptation of the c code. It is a CRC 16 implementation that is FAST on embedded electronics, such as PIC's.. it executes in just 17 instructions on the PIC, not to shabby!

I basically just "copied" the c-code straight off over to LabVIEW code, using built in LV functions for shifts and such, the reason this is so optimized already is just because the original author of the c-code did a very good job of optimizing it.

So, if you are bored, jump right in and see if you can do it better!!

I have attached both LV 7.1, LV 8 and a jpg file so everyone can participate. The jpg is relatively small, its not a complicated code to copy by hand.. 😉

Kjell-Edmund Ims

Message Edited by Kjell-Edmund on 02-19-2006 09:01 AM

Message Edited by Kjell-Edmund on 02-19-2006 09:07 AM

Message Edited by Support on 02-21-2006 04:45 PM

---------------------------------------------------

Project Engineer
LabVIEW 2009
Run LabVIEW on WinXP and Vista system.
Used LabVIEW since May 2005

Certifications: CLD and CPI certified
Currently employed.
Download All
0 Kudos
Message 1 of 1
(3,414 Views)