Hello,
I'm trying to get one of the tutorial 2 .bof files to work
nicely with its corresponding (or any) py file on my machine. Most
recently, I've really been trying to get tut2a.bof to work with tut2a.py.
After having to correct minor things in the py file (like making sure
that the python script was trying to communicate with registers that
actually existed in the design) I've hit a road block.
No matter what I do, I can not get tap-start() to run. The error that I
keep getting is below:
=========================================================
arccadmin@pestcontrol:~/Desktop/10gE_tut_FILES$ python2.7 tut2a.py
Connecting to server roach on port... ok
------------------------
Programming FPGA with tut2a.bof... ok
------------------------
Setting the port 0 linkup : True
------------------------
Configuring receiver core...
Traceback (most recent call last):
File "tut2a.py", line 40, in <module>
fpga.tap_start('tap0',gbe0,mac_base+src_ip,src_ip,port)
File
"/opt/python2.7.1/lib/python2.7/site-packages/corr/katcp_wrapper.py",
line 182, in tap_start
reply, informs = self._request("tap-start", tap_dev, device,
ip_str, port_str, mac_str)
File
"/opt/python2.7.1/lib/python2.7/site-packages/corr/katcp_wrapper.py",
line 68, in _request
% (request.name, request, reply))
RuntimeError: Request tap-start failed.
Request: ?tap-start tap0 tengb0 192.168.4.21 46224 02:02:C0:A8:04:15
Reply: !tap-start fail.
===========================================================
I've looked into upgrading borph...but as far as I can tell, I'm already
up to date with corr, tcpborphserver, and tgtap.
Any ideas? I've attached the .py file that I'm trying to run to this
email, though it's pretty much identical to the one I downloaded from
the tutorials online.
--
-Louis P. Dartez
Arecibo Remote Command Center Scholar
Center for Advanced Radio Astronomy Researcher
Department of Physics and Astronomy
University of Texas at Brownsville
#!/usr/bin/env python
import corr,time,numpy,struct,sys
bitstream = 'tut2a.bof'
roach = 'roach'
#Decide where we're going to send the data, and from which addresses:
dest_ip = 192*(2**24) + 168 * (2**16) + 4*(2**8) + 5 #192.168.4.5
port = 46224
src_ip = 192*(2**24) +168 * (2**16) + 4*(2**8) + 21 #10.0.0.10
mac_base = (2<<40) + (2<<32)
gbe0 = 'tengb0';
print('Connecting to server %s on port... '%(roach)),
fpga = corr.katcp_wrapper.FpgaClient(roach)
time.sleep(2)
if fpga.is_connected():
print 'ok\n'
else:
print 'ERROR\n'
print '------------------------'
print 'Programming FPGA with %s...' %bitstream,
fpga.progdev(bitstream)
print 'ok\n'
time.sleep(5)
print '------------------------'
print 'Setting the port 0 linkup :',
fpga.listdev()
gbe0_link=bool(fpga.read_int(gbe0))
print gbe0_link
if not gbe0_link:
print 'There is no cable plugged into port0'
print '------------------------'
print 'Configuring receiver core...',
#fpga.tap_start(gbe0,mac_base+src_ip,src_ip,port)
fpga.tap_start('tap0',gbe0,mac_base+src_ip,src_ip,port)
print 'done'
print '------------------------'
print 'Setting-up packet core...',
sys.stdout.flush()
fpga.write_int('dest_ip',dest_ip)
fpga.write_int('dest_port',port)
fpga.write_int('pkt_sim_period',200)
fpga.write_int('pkt_sim_length',6)
print 'done'
print 'Enabling the packetizer...',
fpga.write_int('pkt_sim_enable',0)
print 'done'