Skip to content

Commit

Permalink
Refactor to allow skarab- or roach-style devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Prozesky committed Jun 13, 2017
1 parent a783dcc commit 4adffc0
Show file tree
Hide file tree
Showing 11 changed files with 1,150 additions and 833 deletions.
19 changes: 7 additions & 12 deletions scripts/casperfpga_tengbe_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
# -*- coding: utf-8 -*-
# pylint: disable-msg=C0103
# pylint: disable-msg=C0301
"""
View the status of a given xengine.

Created on Fri Jan 3 10:40:53 2014
@author: paulp
"""
import sys
import time
import argparse
Expand Down Expand Up @@ -53,7 +47,8 @@
except AttributeError:
raise RuntimeError('No such log level: %s' % log_level)
# import logging
# logging.basicConfig(filename='/tmp/casperfpga_tengbe_status_curses.log', level=logging.DEBUG)
# logging.basicConfig(filename='/tmp/casperfpga_tengbe_status_curses.log',
# level=logging.DEBUG)
# logging.info('****************************************************')

if args.comms == 'katcp':
Expand All @@ -75,7 +70,7 @@
utils.threaded_fpga_function(fpgas, 10, 'test_connection')
utils.threaded_fpga_function(fpgas, 15, 'get_system_information')
for fpga in fpgas:
numgbes = len(fpga.tengbes)
numgbes = len(fpga.gbes)
if numgbes < 1:
raise RuntimeWarning('Host %s has no 10gbe cores', fpga.host)
print '%s: found %i 10gbe core%s.' % (
Expand All @@ -100,7 +95,7 @@ def get_gbe_data(fpga):
Get 10gbe data counters from the fpga.
"""
returndata = {}
for gbecore in fpga.tengbes:
for gbecore in fpga.gbes:
ctr_data = gbecore.read_counters()
for regname in ctr_data:
regdata = ctr_data[regname]
Expand All @@ -118,8 +113,8 @@ def get_tap_data(fpga):
What it says on the tin.
"""
data = {}
for gbecore in fpga.tengbes.names():
data[gbecore] = fpga.tengbes[gbecore].tap_info()
for gbecore in fpga.gbes.names():
data[gbecore] = fpga.gbes[gbecore].tap_info()
return data

# get gbe and tap data
Expand Down Expand Up @@ -164,7 +159,7 @@ def exit_gracefully(sig, frame):
max_1st_col_offset = -1
for fpga in fpgas:
max_1st_col_offset = max(max_1st_col_offset, len(fpga.host))
for gbe_name in fpga.tengbes.names():
for gbe_name in fpga.gbes.names():
max_1st_col_offset = max(max_1st_col_offset, len(gbe_name))
max_fldname = -1
for hdr in fpga_headers:
Expand Down
4 changes: 2 additions & 2 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
from bitfield import Bitfield, Field
from dcp_fpga import DcpFpga
from katadc import KatAdc
from katcp_fpga import KatcpFpga
from transport_katcp import KatcpTransport
from transport_skarab import SkarabTransport
from memory import Memory
from qdr import Qdr
from register import Register
from sbram import Sbram
from snap import Snap
from tengbe import TenGbe
from skarab_fpga import SkarabFpga

# BEGIN VERSION CHECK
# Get package version when locally imported from repo or via -e develop install
Expand Down
Loading

0 comments on commit 4adffc0

Please sign in to comment.