Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Newbie
lsqleakey
Posts: 2
Registered: ‎02-10-2009
0
Accepted Solution

How to write software for custom IP?

Hello,

 

I'm working on a project which will be implemented by EDK 10.1. I have built the system and added a custom peripheral into the system successfully. Next I would like to add software application for the custom IP, but I couldn't find any helpful documents concerning how to write source code and header file for a custom IP. (I can only find examples of existing peripherals.) Could you post some useful link where I can find some application notes or something which I can refer to?(I have included PLB v46, UART 16550 and PowerPC 405 into my application, and I'm using XUPV2P board.)  

Expert Contributor
pumaju1808
Posts: 354
Registered: ‎08-14-2007

Re: How to write software for custom IP?

Hi,

 

When you add a custom IP, generally you uses the "Create/Import Peripheral" wizard of XPS, then you add some "services" to your custom IP (software reset, software registers, interrupts, FIFOs, etc), at the end of this wizard, software drivers (C functions) are created depends of the services that you selected, these drivers are C functions that control your custom IP peripheral, then in your application you only add the library "mycustomip.h"  and then you can use the drivers in your application

 

The drivers of your custom ip are in the directory  ($EDK_project\drivers ) where $EDK_project is the root directory of your project, in this directory you can take a look of how drivers are implemented to control you peripheral. you can add new functions to your customip.h library

Again this drivers depends of what your custom ip do

 

Hope this helps

Regards

Newbie
lsqleakey
Posts: 2
Registered: ‎02-10-2009
0

Re: How to write software for custom IP?

Thanx a lot!

I've got it clearly!

LEakey

 

Expert Contributor
bassman59
Posts: 4,679
Registered: ‎02-25-2008
0

Re: How to write software for custom IP?


lsqleakey wrote:

Hello,

 

I'm working on a project which will be implemented by EDK 10.1. I have built the system and added a custom peripheral into the system successfully. Next I would like to add software application for the custom IP, but I couldn't find any helpful documents concerning how to write source code and header file for a custom IP. (I can only find examples of existing peripherals.) Could you post some useful link where I can find some application notes or something which I can refer to?(I have included PLB v46, UART 16550 and PowerPC 405 into my application, and I'm using XUPV2P board.)  


We have found that the whole Xilinx notion of "drivers" is waaay overcomplicated and fraught with danger.

 

It's a simple matter to understand that, at the base of things, your IP core amounts to a bunch of hardware addresses that you peek and poke. So it's easy to create a source file and a header that encapsulate everything necessary to handle your hardware, and then simply add those files to your application project, rather than dealing with it all as a "driver."

 

-a


----------------------------------------------------------------
Yes, I do this for a living.
Regular Visitor
skimura_lynx
Posts: 24
Registered: ‎03-30-2009
0

Re: How to write software for custom IP?

[ Edited ]

I have followed the steps provided above in all their detail, but for some reason there is no "drivers" folder created for me in the root directory after I have "successfully" added my custom IP. I have gone through the wizard a few times now, and see no options at the end for adding in C-files for my IP. Since EDK can't "find" or "create" a driver for my IP, it goes ahead and assigns my IP a "generic" driver file out of the EDK driver library. I obviously do not want this.

 

Any advice from someone who has done this successfully?

Message Edited by skimura_lynx on 04-23-2009 10:23 AM
Expert Contributor
pumaju1808
Posts: 354
Registered: ‎08-14-2007

Re: How to write software for custom IP?

hi,

 

you must have selected the option "Generate template drivers file ..." in the create custom ip wizard , see figure below, then in the root folder of your project you will have the "drivers" directory

 

best regards

imagcustom.JPG
Regular Visitor
veiledcavalier
Posts: 10
Registered: ‎09-13-2007
0

Re: How to write software for custom IP?

Thanks a lot pumaju 1808

I had the same problem drives directory not generated!!

Now i know the cause. It is mentioned in the EDK CTT pdf "use default"

and the default is unchecked box for " Generate template drivers file ...".

 

take care others...

Regular Visitor
skimura_lynx
Posts: 24
Registered: ‎03-30-2009
0

Re: How to write software for custom IP?

Thanks for the help so far. Unfortunately, this only works if you CREATE a new peripheral. In my case, I am trying to IMPORT a peripheral from an existing ISE project. What I've found after talking with some Xilinx people, is that you must first "Create" a peripheral so that all of your driver directories/files are created, then you have to manually copy over all of your Verilog/VHDL IP source files as well as modify your .mpd/.pao file a bit to get it work correctly. I can give more details after I try to do it myself right now! :smileyhappy:

Expert Contributor
pumaju1808
Posts: 354
Registered: ‎08-14-2007
0

Re: How to write software for custom IP?

that right skimura,

 

does not matter if you are trying to import, in any case you must first create your peripheral, then you import

Contributor
halas86
Posts: 48
Registered: ‎03-31-2010
0

Re: How to write software for custom IP?

[ Edited ]

i create an ip and i link it to microblaze. it has to in put and one output ; the first is the clock and i link it to bus2ip_clk the second is a 8bit value witch i like to put it myself to control the ip . i tried to write it to slv_reg0 and link or copy it to input but it wrote successefuly in register but variable dont take the value. if i fix input as a signal and write the value in it work and i have an output in led but i like to change it from hyperterminal not to change it in vhdl file and re import the ip and download the bit everyttime. here the user_logic :