Commit 8c0345d2 authored by Matthieu Cattin's avatar Matthieu Cattin

Add max number of DMA items check.

parent 49922282
......@@ -239,6 +239,9 @@ class CSpecFmcAdc100Ms:
def get_data(self, carrier_addr, length):
# Configure DMA
items_required = int(math.ceil(length/float(self.DMA_LENGTH)))
if(128 < items_required):
print('Required items: %d')%items_required
raise Exception('Current gn4124 class only supports up to 128 items.')
#print('Required items: %d')%items_required
for num in range(items_required):
if(items_required == num+1):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment