|
Message
From: Robert Lluís Garcia<rlluis@p...>
Date: Wed Dec 7 10:05:21 CET 2005
Subject: [pci] how to use the PCI bridge IP core ?
Hi,I found what I was doing wrong. I was reading from the address pointed by BAR0 that is used for configuration space. I have had to enable another BAR, by uncommenting a define in the code, and read from this one. By using dbg.exe I realized I was reading the configuration space so thanks for the replays.
Regards, Robert
----- Original Message ----- From: "Mark McDougall" <markm@v...> To: <rlluis@p...>; "Discussion list about free, open source PCI IP core" <pci@o...> Sent: Wednesday, December 07, 2005 12:44 AM Subject: Re: [pci] how to use the PCI bridge IP core ?
> Robert Lluís Garcia wrote: > >> On the board side I have the following VHDL code to talk to the wishbone >> bus. >> wbm_err_i <= '0'; -- no error >> wbm_rty_i <= '0'; -- no retry >> wbm_ack_i <= wbm_stb_o; --instantaneous acknowledgment >> wbm_dat_i <= "00000000000000000000000000001000"; -- data returned > > Looks OK to me so far... (I'd use wbm_dat_i <= X"0008"; tho') > >> Now, the data read by the C program is not what I would expect. I would >> expect to read always the value in wbm_dat_i but it is not like that so >> something is wrong. > > What data are you getting back? Is it consistent? Constant or random? > > I haven't used /dev/mem to access PCI space before as I've only accessed > PCI space in a linux driver, so I can't vouch for your code but it looks > OK. > > If you want to eliminate your code from the equation just to verify the > firmware, create a DOS boot floppy and put a copy of CDBG on it. It has a > simple CLI for twiddling PCI resources - you'll be up and running in a > matter of minutes - invaluable! > > <http://www.probo.com/cdbg.htm> > > Regards, > > -- > Mark McDougall, Software Engineer > Virtual Logic Pty Ltd, <http://www.vl.com.au> > 21-25 King St, Rockdale, 2216 > Ph: +612-9599-3255 Fax: +612-9599-3266 > >
|
 |