Hi Albert, Our bad. Here is the short story. None of this should happen when we get all our codes in the real opencpi.orgrepo. But the reality is that a lot of our "dirty laundry" is used here: https://github.com/ShepardSiegel/ocpi There is a unscripted, manual task that is needed to pre-compile the handful of BSV Verilog components in $OCPI/libsrc/hdl/bsv into proper libs for ISim and XST. However, there is no forward-backward compatibility; and this must be done for both V5 and V6 with XST as they use different lib file formats. Just yesterday I pushed up ISE 13.2 versions of these libs which would break everyone not using 13.2. (Which BTW, has its own separate issue). There is nothing wrong with not using the pre-compiled libs and just add the Verilogs to the prj; except that it isn't great "component design practice". (Imagine having to include all the POSIX math sources instead of just using -lm). Anyhow, try to hang tight, as this is definitely NOT how the real opencpi.org build process works.
Best, Shep On Mon, Jun 13, 2011 at 1:37 PM, Albert Kwon <[email protected]> wrote: > ** > Hello, > > So I'm trying to compile Shep's version of OCPI, and the compilation is > getting some errors. When I run make ml605, it tells me that I'm missing any > module that comes from libsrc/hdl/bsv directory. To bypass the problem, I > manually added them to the .prj file, but is there something that I should > be doing to avoid this? (perhaps an env variable?) > > Thanks, > Albert > > > On 06/13/2011 12:22 PM, Shepard Siegel wrote: > > Rafi, Albert > I have to run now. But that dump tells us that the mmap reads are returning > garbage. > I assume you are running this clean out of power up and NOT after any > failed attempt of running loadBitstream? > If that is true; it is as if you somehow have a defective *default* > bitstream. (Where did it come from?) > I may not be able to debug this with you side by side until I'm back in my > lab Thursday. > Everything looks fine; except for the garbage coming back. > Adding the list back so others may offer a debug suggestion. > -Shep > > > On Mon, Jun 13, 2011 at 12:09 PM, Rafi Rubin <[email protected]> wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 06/13/11 12:01, Albert Kwon wrote: >> > Hi Rafi, >> > >> > Can you run the following commands as sudo for me? Shep wants me to >> > test this out by running things actually as sudo, not what we've been >> doing. >> > >> > Environment variable that needs to be set: >> > export >> > XIL_PAR_DESIGN_CHECK_VERBOSE=1 >> > export XIL_TIMING_ALLOW_IMPOSSIBLE=1 >> > export PATH=$PATH:/scratch/ic3/ocpi/bin/ >> > >> > Then inside /scratch/ic3/ocpi/script, run >> > sudo -E ./ocfrp_check, >> >> Error during probe for OCFRP: Magic numbers do not match in region/bar 0 >> Did not find any OpenCPI FPGA reference platform boards. >> >> > sudo -E *swctl **0xFA000000 0xFB9F0000 admin* >> >> OCCP Admin Space >> Open: 0xffffffff "ÿÿÿÿ" >> CPI: 0xffffffff "ÿÿÿÿ" >> revision: 0xffffffff >> birthday: 0xffffffff Sun Feb 7 06:28:15 2106 >> workerMask: 0xffffffff workers 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 >> 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 exist >> pci_dev_id: 0xffffffff >> attention: 0xffffffff >> cpStatus: 0xffffffff >> scratch20: 0xffffffff >> scratch24: 0xffffffff >> cpControl: 0xffffffff >> timeStatus: 0xffffffff ppsLostSticky gpsInSticky ppsInSticky >> timeSetSticky ppsOK ppsLost >> timeControl: 0xffffffff >> gpsTimeMS: 0xffffffff (4294967295) Sun Feb 7 06:28:15 2106 >> gpsTimeLS: 0xffffffff (4294967295) >> deltaTimeMS: 0xffffffff >> deltaTimeLS: 0xffffffff >> refPerPPS: 0xffffffff (-1) >> numDPMemReg: 0xffffffff (-1) >> UUID[ 3: 0]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff >> UUID[ 7: 4]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff >> UUID[11: 8]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff >> UUID[15:12]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff >> >> >> > sudo lspci -v >> >> $ sudo lspci -vs 05:00.0 >> /scratch/ic3/ocpi/scripts 12:06PM hex >> 05:00.0 RAM memory: Xilinx Corporation Device 4243 (rev 02) >> Subsystem: Xilinx Corporation Device 0007 >> Flags: fast devsel, IRQ 10 >> [virtual] Memory at fa000000 (32-bit, non-prefetchable) [size=16M] >> [virtual] Memory at fb9f0000 (32-bit, non-prefetchable) [size=64K] >> Capabilities: [40] Power Management version 3 >> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+ >> Capabilities: [60] Express Endpoint, MSI 01 >> Capabilities: [100] Device Serial Number 00-00-00-01-01-00-0a-35 >> >> $ sudo lspci -vvs 05:00.0 >> /scratch/ic3/ocpi/scripts 12:06PM hex >> 05:00.0 RAM memory: Xilinx Corporation Device 4243 (rev 02) >> Subsystem: Xilinx Corporation Device 0007 >> Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- >> ParErr- Stepping- SERR- FastB2B- DisINTx- >> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- >> <TAbort- <MAbort- >SERR- <PERR- INTx- >> Interrupt: pin A routed to IRQ 10 >> Region 0: [virtual] Memory at fa000000 (32-bit, >> non-prefetchable) [size=16M] >> Region 1: [virtual] Memory at fb9f0000 (32-bit, >> non-prefetchable) [size=64K] >> Capabilities: [40] Power Management version 3 >> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA >> PME(D0+,D1+,D2+,D3hot+,D3cold-) >> Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME- >> Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+ >> Address: 0000000000000000 Data: 0000 >> Capabilities: [60] Express (v2) Endpoint, MSI 01 >> DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s >> <64ns, L1 unlimited >> ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- >> DevCtl: Report errors: Correctable- Non-Fatal- Fatal- >> Unsupported- >> RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ >> MaxPayload 128 bytes, MaxReadReq 512 bytes >> DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- >> TransPend- >> LnkCap: Port #0, Speed 5GT/s, Width x4, ASPM L0s, >> Latency L0 unlimited, L1 unlimited >> ClockPM- Surprise- LLActRep- BwNot- >> LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- >> CommClk- >> ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- >> LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk- >> DLActive- BWMgmt- ABWMgmt- >> DevCap2: Completion Timeout: Range B, TimeoutDis- >> DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- >> LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- >> SpeedDis-, Selectable De-emphasis: -6dB >> Transmit Margin: Normal Operating Range, >> EnterModifiedCompliance- ComplianceSOS- >> Compliance De-emphasis: -6dB >> LnkSta2: Current De-emphasis Level: -6dB >> Capabilities: [100 v1] Device Serial Number 00-00-00-01-01-00-0a-35 >> >> >> > >> > and if you can send me the outputs of each, that would be great >> > (only the output of Xilinx for lspci -v). >> > >> > And after the three commands above, if you don't mind, please try to >> run >> > sudo ./loadBitStreamML605_sudo >> > ../build/ml605-20110609_1313/fpgaTop.bit 0000:05:00.0 auto >> > inside the same script folder. >> > >> > Thanks a lot. >> > Albert >> > >> > >> > -------- Original Message -------- >> > Subject: Re: OCPI Question >> > Date: Mon, 13 Jun 2011 11:52:18 -0400 >> > From: Shepard Siegel <[email protected]> >> > To: Albert Kwon <[email protected]> >> > >> > >> > >> > right. good >> > so (with Rafi's help) try from $OCPI_DIR/bin >> > >> > *$ sudo -E ./swctl 0xFA000000 0xFB9F0000 admin* >> > >> > This should dump out a bunch of registers with sensible values, similar >> > to this >> > >> > [shep@core960 bin]$ sudo ./swctl 0xF1000000 0xF2FF0000 admin >> > >> > OCCP Admin Space >> > Open: 0x4f70656e "nepO" >> > CPI: 0x43504900 "" >> > revision: 0x00000001 >> > birthday: 0x4b2d41ab Sat Dec 19 21:12:11 2009 >> > workerMask: 0x0000601f workers 0 1 2 3 4 13 14 exist >> > pci_dev_id: 0x00000300 >> > attention: 0x00000000 >> > cpStatus: 0x00000381 >> > scratch20: 0x00000000 >> > scratch24: 0x00000000 >> > cpControl: 0x2202f798 >> > timeStatus: 0x00000000 >> > timeControl: 0x00000000 >> > gpsTimeMS: 0x0000fd6c (64876) Thu Jan 1 18:01:16 1970 >> > gpsTimeLS: 0x06ba5820 (112874480) >> > deltaTimeMS: 0x00000000 >> > deltaTimeLS: 0x00000000 >> > refPerPPS: 0x4b4a4948 (1263159624) >> > numDPMemReg: 0xdeadc0de (-559038242) >> > UUID[ 3: 0]: 0x4f4e4d4c 0x4b4a4948 0x00000000 0x00000000 >> > UUID[ 7: 4]: 0xdeadc0de 0xdeadc0de 0xdeadc0de 0xdeadc0de >> > UUID[11: 8]: 0xdeadc0de 0xdeadc0de 0xdeadc0de 0xdeadc0de >> > UUID[15:12]: 0xdeadc0de 0xdeadc0de 0xdeadc0de 0xdeadc0de >> > >> > >> > >> > >> > On Mon, Jun 13, 2011 at 11:47 AM, Albert Kwon <[email protected] >> > <mailto:[email protected]>> wrote: >> > >> > I will ask Rafi to run those things in sudo, and see what happens. >> > This is the output of lspci -v: >> > >> > >> > 05:00.0 RAM memory: Xilinx Corporation Device 4243 (rev 02) >> > Subsystem: Xilinx Corporation Device 0007 >> > Flags: fast devsel, IRQ 10 >> > [virtual] Memory at fa000000 (32-bit, non-prefetchable) >> [size=16M] >> > [virtual] Memory at fb9f0000 (32-bit, non-prefetchable) >> [size=64K] >> > Capabilities: <access denied> >> > >> > It seems like to get the full output, I need to run this as sudo as >> > well. Also, are the bar0 and bar1 in this case 0xFA000000 and >> > 0xFB9F0000 respectively? >> > >> > Thanks, >> > Albert >> > >> > >> > >> > On 06/13/2011 11:32 AM, Shepard Siegel wrote: >> >> Albert, >> >> It's highly unusual for lspci to see the board just fine; and >> >> ocfrp_check not find it. Especially with the default bitstream. >> >> If you can, do it as root with sudo -E, not Rafi's alternative. >> >> Also, can you post the output from lspci -v (but just for the >> >> Xlinix device) >> >> There is a compiled version of swctl in the $OCPI_DIR/bin directory >> >> Or you can go the /src dir, say $gcc swctl.c; mv a.out ../bin/swctl >> >> In any event, you will need to know the BAR0 and BAR1 addresses as >> >> reported by lspci -v and say >> >> >> >> $ sudo -E ./swctl 0xDE000000 0xDFFF0000 admin >> >> >> >> (I just made up the Bar addresses, you must use the correct ones) >> >> >> >> And post the output you get here with the default flashed >> bitstream. >> >> >> >> Thanks. >> >> _Shep >> >> >> >> >> >> On Mon, Jun 13, 2011 at 11:22 AM, Albert Kwon >> >> <[email protected] <mailto:[email protected]>> wrote: >> >> >> >> ocfrp_check gives the same result: >> >> >> >> >> >> Error during probe for OCFRP: Magic numbers do not match in >> >> region/bar 0 >> >> Did not find any OpenCPI FPGA reference platform boards. >> >> >> >> And I can't find the command/script swctl. Do I need to do >> >> something to get this program/script? >> >> >> >> Thanks so much for the help. >> >> -Albert >> >> >> >> >> >> On 06/13/2011 11:14 AM, Shepard Siegel wrote: >> >>> Albert, >> >>> I've never done it that way but Rafi must know what he is >> doing. >> >>> >> >>> Let's back up one more time before we move ahead. Before we >> >>> try to load your own bitstream with loadBitstreamML605, do >> >>> these programs work as expected on the default flash >> bitstream: >> >>> >> >>> ocfrp_check (to see the board) >> >>> swctl <bar0> <bar1> admin >> >>> >> >>> If not, then before we debug loadBitstreamXXX, we should get >> >>> ocfrp_check and swctl working. >> >>> >> >>> -Shep >> >>> >> >>> note: sharing with opencpi_dev for others to chime in. >> >>> >> >>> >> >>> >> >>> >> >>> On Mon, Jun 13, 2011 at 10:59 AM, Albert Kwon >> >>> <[email protected] <mailto:[email protected]>> >> wrote: >> >>> >> >>> Instead of having to run these things as sudo (since it's >> >>> Rafi's machine that we are running this on), Rafi set the >> >>> suid on ocfrp_check, and put it under /opt/opencpi/bin. >> >>> So on the script, instead of doing sudo ./ocfrp_check >> >>> $device, I do /opt/opencpi/bit/ocfrp_check $device. I've >> >>> also asked him to change permission on >> >>> /sys/bus/pci/devices/$device/config, so that I can write >> >>> to it. I've also changed the location of $tmp for >> >>> loadBitStreamML605 script to my home folder's tmp. So >> >>> currently, I don't think there are any commands that >> >>> require sudo. >> >>> >> >>> environment OCPI_DIR is currently set to be >> >>> /scratch/ic3/ocpi. >> >>> >> >>> Is there something wrong with that we are doing here? >> >>> >> >>> -Albert >> >>> >> >>> >> >>> >> >>> On Sat, Jun 11, 2011 at 7:58 PM, Albert Kwon >> >>> <[email protected] <mailto:[email protected]>> >> wrote: >> >>> >> >>> Hi Shep, >> >>> >> >>> The bitstream upload failed once due to some sudo >> >>> privilege issues, and now when I run loadBitStream >> >>> script, I get this error: >> >>> >> >>> Checking existing bitstream.. >> >>> Error during probe for OCFRP: Magic numbers do not match >> >>> in region/bar 0 >> >>> Did not find an OpenCPI FPGA reference platform board >> >>> named "0000:05:00.0". >> >>> Existing bitstream does not appear to be functional. >> >>> There is no config snapshot in >> >>> /opt/cpi/ocfrp/pci-config-snapshots/0000:05:00.0 to >> restore. >> >>> >> >>> Do you have any suggestion as to what to try? >> >>> >> >>> Thanks, >> >>> Albert >> >>> >> >>> >> >>> >> >>> snip >> >> >> >> >> > >> > >> > >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.11 (GNU/Linux) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >> >> iQIcBAEBAgAGBQJN9jZQAAoJEPILXytRLnK2SNkP/if3msS7afaug/E2ZKeERJ0A >> QSmYuVH6/bjVAxH0+kzoAWAj+g2Niy2XA0y3EapksQdaEgZtAqLTxMgxLo8Qiq8z >> gNYn/AeubfgTuZSu1eLHCgCOb/1hMvc6cC/daRdhCBqrUxWTDfEKh6HtGAYRIkef >> R0V7SRdfiOjDZGur0sbLpPUQqpfBrxfzVFxabkfR2XIxM2UXG+aUislSmkb6qx8R >> qQfqPsF+P9vK9YN4YNe/5zrojGct6/fTGkjHv9BTCtUCh596QxUD085MJKNQ5nMu >> DJ0Gxq9bDf+n+5PlFFJtlhE7g1nE2lWZ/EcWYtVe2PkVo6+vauiWF8U3tstgKiRA >> c8yIWS2bqk/GOEGHtedPjzAoD35Ulx/DkstYFu1/NfJvpg8eWjve+JEIPuu0frF2 >> /jNQXMC1cHwBX5UJh7l0hTeBQ0I0WXIIv13/6mIjTT7t0IPRzpVB5VARPab6iYr8 >> uiAKN53MxiPOyPYXPCbt1k2Yt9/k+QaY/4fWSOUC34EftFxGaCRgYLOnP5Mh8GGS >> YBQUdri7Cs5wpeWo7vsgSVgHo/xF1so6yPGYTWO791Wy0qpqCTuV6oJQTNK1d+hs >> rh/CHR5KWXBmTdC8kJTMaWI4t9TrvyoR6pA0RZGJl2W5Azv59AFgK9RpXCLezSQA >> ZCOXRN0NouoKGGRnd6zO >> =sy9Z >> -----END PGP SIGNATURE----- >> > > > > _______________________________________________ > opencpi_dev mailing list > [email protected] > http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org > >
_______________________________________________ opencpi_dev mailing list [email protected] http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org
