Go to Post I think its great that some teams are 100% student built; but I would also hope that 100% of their students are mentor advised. - =Martin=Taylor= [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-04-2015, 09:17 AM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Custom roboRIO HAL: Where to find C library for roboRIO fpga?

Quote:
Originally Posted by CodeYeti View Post
Alright, I guess I'll inquire of NI if they plan on providing something like these C bindings in future years as well. Thanks for your help, I'll be sure to report back with results if/when I get this working.
Those C bindings are for a different FPGA image running on the roboRIO. That API and that FPGA are designed to closely mimic the myRIO counterparts. This will certainly be updated in future years (it was only released yesterday!). However, I don't believe it is what you are looking for.

Quote:
Originally Posted by CodeYeti View Post
Any idea of a good way to contact them?
I found you!

Quote:
Originally Posted by CodeYeti View Post
EDIT: Also: is there any documentation on the operation of the registers for the FPGA or is that all fairly secretive as well?
There is a higher level presentation floating around the Internet that I wrote years ago. As for registers, WPILib is the most accurate documentation.

Quote:
Originally Posted by CodeYeti View Post
EDIT2: I'm thinking I could write a parser to parse the lvbitx file and dump out my necessary register definitions for zinc's ioreg macro. This way I can access libNiFpga directly instead of having to go through the roborio-specific frontend. I was able to get some rudimentary parsing done with a crappy python script.
That's actually what I would recommend. Except not manually parsed. Use the NiFpga API for accessing registers. That's all the ChipObject does.
  #2   Spotlight this post!  
Unread 08-06-2015, 05:51 AM
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: Custom roboRIO HAL: Where to find C library for roboRIO fpga?

Quote:
Originally Posted by jhersh View Post
Those C bindings are for a different FPGA image running on the roboRIO. That API and that FPGA are designed to closely mimic the myRIO counterparts. This will certainly be updated in future years (it was only released yesterday!). However, I don't believe it is what you are looking for.
Yea I definitely see that now. Feeling pretty dumb.

Quote:
Originally Posted by jhersh View Post
That's actually what I would recommend. Except not manually parsed. Use the NiFpga API for accessing registers. That's all the ChipObject does.
Any chance of getting the generated C API for the FRC roboRIO FPA? The ioreg macro I've been working on for zinc is fairly hard-coded to use compiler intrinsic memset, etc. to set raw memory locations rather than using an api, so a comprehensive update would be required to get it to use NiFpga_WriteU8 and friends. The process would be greatly simplified by having the raw C bindings as well. Admittedly, the WPIlib HAL is pretty darn good, but it would be wonderful to have around purely for experimentation and fun-having purposes. There's no way I'd be letting my team develop in Rust for the actual competition anyways, teaching a bunch of high-schoolers Java is hard enough, let alone a language that's (sometimes) more complex than C++.
__________________
Team 662 - Student/Programming VP/Driver - (2011-2013) - 43-31-2
Team 662 - Mentor - (2015-present) - 0-0-0
  #3   Spotlight this post!  
Unread 08-06-2015, 12:21 PM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Custom roboRIO HAL: Where to find C library for roboRIO fpga?

You might try this tool on our website:

http://www.ni.com/download/fpga-inte...-14.0/4946/en/

However, it doesn't support fixed-point or structured registers, so it won't generate a complete API in C.

The rest of the API that uses FXP and structured registers would have to be added afterward.

As for the C++ generator that we currently use, only C++ and Java were ever supported, and Java support has been disabled ever since the WPILib HAL replaced the need for it.

I think you should either use the generator I linked above and manually add accessors for any missing-but-needed-by-you registers or you should write a C wrapper around the C++ chip object library that the HAL uses for at least the registers you care about.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:10 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi