how to get a vendor id of a pci

hi i would like to know that how can i obtain a vendor id in brief read the value at the base of config space.. I know that we had to write to CONFIG_ADDRESS register and read from CONFIG_DATA register... but how to read that

pls help me out and if possible pls mail me small coding to write into config_address and read for config_data and obtain base of config space and and obtain vendor id

i would be really greatfull to you thanks

Reply to
abhishek tara
Loading thread data ...

Can you elaborate on what you are trying to do here? Are you using Xilinx PCI LogiCORE? If so, you can use the ping example which is included with core zip file. In the ping example's simulation file "stimulus.v/vhd", there are tasks (Verilog)/procedures (VHDL) for configuration reads/writes. You should be able to use these in testbench to access configuration space.

Device ID and Vendor ID are in configuration space at address 0x00. Refer PCI specification or Xilinx PCI User guide.

-Vikram

Reply to
Vikram Pasham

Under linux use lspci (read the man page) or look at the contents of /proc/bus/pci/

Under DOS and its successors use pcispy.exe

Also very useful under windows is the memaccess library from zealsoft.

Kolja Sulimma

Reply to
Kolja Sulimma

Hello,

The mechanism you describe is the low-level way of turning a memory space or I/O space access from a processor into a configuration cycle on the PCI bus. If you want to know how to do this, you will need to get the documentation on the host bridge chipset you are using. In most PC systems, I am sure these registers always show up at the same address, but you don't mention what system you are working with.

You only want to do this if you are writing a BIOS that does the bus enumeration, or if you are writing an operating system from scratch. If you are writing an application, you will want to use existing, higher level services to scan configuration space.

Eric

Reply to
Eric Crabill

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.