Read this thread:
http://www.alteraforum.com/forum/showthread.php?t=35678 Download the PDF and zip file. You can port the design to your kit.
If you want to read/write from the FPGA via PCIe to talk to another PCIe device all you need to do is
a) Use the host PC to determine the PCIe address of the device you need to talk to.
b) Configure the Qsys PCIe address remap registers (the 1MB region discussed in the document) so that it maps to the region of the device you want to control.
c) Issue a read/write to the Avalon-MM slave interface of the Qsys PCIe component. That Avalon-MM transaction will map to a PCIe transaction that will then perform a read/write to the PCIe device.
And that's it. Simple, eh :)
Cheers,
Dave