Skip to content

Commit

Permalink
Merge pull request #50 from casper-astro/py38
Browse files Browse the repository at this point in the history
Py38
  • Loading branch information
jkocz authored Sep 16, 2022
2 parents a52e064 + 68a3df9 commit d24673f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/snapadc.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,13 @@ def readRAM(self, ram=None, signed=True):
length = 1024
vals = self.ram[ram]._read(addr=0, size=length)
vals = np.array(struct.unpack(fmt,vals)).reshape(-1,8)
return vals
else:
raise ValueError

# A lane in this method actually corresponds to a "branch" in HMCAD1511 datasheet.
# But I have to follow the naming convention of signals in casper repo.
def bitslip(self, chipSel=None, laneSel=None):
def bitslip(self, chipSel=None, laneSel=None, verify=False):
""" Reorder the parallelize data for word-alignment purpose
Reorder the parallelized data by asserting a itslip command to the bitslip
Expand Down Expand Up @@ -505,10 +506,7 @@ def delay(self, tap, chipSel=None, laneSel=None, verify=False):
elif laneSel not in self.laneList:
raise ValueError("Invalid parameter")

if not isinstance(tap, (int, np.int64)):
raise ValueError("Invalid parameter")
if isinstance(tap, np.int64):
tap = int(tap) # Fix for Py3
tap = int(tap) # Fix for Py3

strl = ','.join([str(c) for c in laneSel])
strc = ','.join([str(c) for c in chipSel])
Expand Down

0 comments on commit d24673f

Please sign in to comment.