Minor refactoring, remove extra conversion
This commit is contained in:
@@ -318,17 +318,16 @@ class AxiMasterWrite(object):
|
|||||||
user = []
|
user = []
|
||||||
|
|
||||||
for bid, burst_length in cmd.burst_list:
|
for bid, burst_length in cmd.burst_list:
|
||||||
while True:
|
while not self.int_write_resp_queue_list[bid]:
|
||||||
if self.int_write_resp_queue_list[bid]:
|
|
||||||
break
|
|
||||||
|
|
||||||
await self.b_channel.wait()
|
await self.b_channel.wait()
|
||||||
b = self.b_channel.recv()
|
b = self.b_channel.recv()
|
||||||
|
|
||||||
if self.active_id[int(b.bid)] <= 0:
|
i = int(b.bid)
|
||||||
|
|
||||||
|
if self.active_id[i] <= 0:
|
||||||
raise Exception(f"Unexpected burst ID {bid}")
|
raise Exception(f"Unexpected burst ID {bid}")
|
||||||
|
|
||||||
self.int_write_resp_queue_list[int(b.bid)].append(b)
|
self.int_write_resp_queue_list[i].append(b)
|
||||||
|
|
||||||
b = self.int_write_resp_queue_list[bid].popleft()
|
b = self.int_write_resp_queue_list[bid].popleft()
|
||||||
|
|
||||||
@@ -598,17 +597,16 @@ class AxiMasterRead(object):
|
|||||||
|
|
||||||
for rid, burst_length in cmd.burst_list:
|
for rid, burst_length in cmd.burst_list:
|
||||||
for k in range(burst_length):
|
for k in range(burst_length):
|
||||||
while True:
|
while not self.int_read_resp_queue_list[rid]:
|
||||||
if self.int_read_resp_queue_list[rid]:
|
|
||||||
break
|
|
||||||
|
|
||||||
await self.r_channel.wait()
|
await self.r_channel.wait()
|
||||||
r = self.r_channel.recv()
|
r = self.r_channel.recv()
|
||||||
|
|
||||||
if self.active_id[int(r.rid)] <= 0:
|
i = int(r.rid)
|
||||||
|
|
||||||
|
if self.active_id[i] <= 0:
|
||||||
raise Exception(f"Unexpected burst ID {rid}")
|
raise Exception(f"Unexpected burst ID {rid}")
|
||||||
|
|
||||||
self.int_read_resp_queue_list[int(r.rid)].append(r)
|
self.int_read_resp_queue_list[i].append(r)
|
||||||
|
|
||||||
r = self.int_read_resp_queue_list[rid].popleft()
|
r = self.int_read_resp_queue_list[rid].popleft()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user