@@ -363,22 +363,22 @@ def dma_write_async(self, fsm, ram, local_addr, global_addr, local_size,
363
363
local_stride , local_blocksize , port )
364
364
365
365
# DMA for each bank
366
- def dma_read_bank (self , fsm , ram , bank , local_addr , global_addr , local_size ,
367
- local_stride = 1 , port = 0 ):
366
+ def dma_read_bank (self , fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
367
+ local_bank_stride = 1 , port = 0 ):
368
368
369
- self ._dma_read_bank (fsm , ram , bank , local_addr , global_addr , local_size ,
370
- local_stride , port )
369
+ self ._dma_read_bank (fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
370
+ local_bank_stride , port )
371
371
372
372
self .dma_wait_read (fsm )
373
373
374
- def dma_read_bank_async (self , fsm , ram , bank , local_addr , global_addr , local_size ,
375
- local_stride = 1 , port = 0 ):
374
+ def dma_read_bank_async (self , fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
375
+ local_bank_stride = 1 , port = 0 ):
376
376
377
- self ._dma_read_bank (fsm , ram , bank , local_addr , global_addr , local_size ,
378
- local_stride , port )
377
+ self ._dma_read_bank (fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
378
+ local_bank_stride , port )
379
379
380
- def _dma_read_bank (self , fsm , ram , bank , local_addr , global_addr , local_size ,
381
- local_stride = 1 , port = 0 ):
380
+ def _dma_read_bank (self , fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
381
+ local_bank_stride = 1 , port = 0 ):
382
382
383
383
if isinstance (ram , (tuple , list )):
384
384
ram = to_multibank_ram (ram )
@@ -394,8 +394,8 @@ def _dma_read_bank(self, fsm, ram, bank, local_addr, global_addr, local_size,
394
394
for i , _ram in enumerate (ram .rams ):
395
395
starts .append (fsm .current )
396
396
local_blocksize = 1
397
- self ._dma_read (fsm , _ram , local_addr , global_addr , local_size ,
398
- local_stride , local_blocksize , port )
397
+ self ._dma_read (fsm , _ram , local_bank_addr , global_addr , local_bank_size ,
398
+ local_bank_stride , local_blocksize , port )
399
399
ends .append (fsm .current )
400
400
fsm .set_index (fsm .current + 1 )
401
401
@@ -405,22 +405,22 @@ def _dma_read_bank(self, fsm, ram, bank, local_addr, global_addr, local_size,
405
405
fsm .goto_from (check , s , cond = bank == i )
406
406
fsm .goto_from (e , fin )
407
407
408
- def dma_write_bank (self , fsm , ram , bank , local_addr , global_addr , local_size ,
409
- local_stride = 1 , port = 0 ):
408
+ def dma_write_bank (self , fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
409
+ local_bank_stride = 1 , port = 0 ):
410
410
411
- self ._dma_write_bank (fsm , ram , bank , local_addr , global_addr , local_size ,
412
- local_stride , port )
411
+ self ._dma_write_bank (fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
412
+ local_bank_stride , port )
413
413
414
414
self .dma_wait_write (fsm )
415
415
416
- def dma_write_bank_async (self , fsm , ram , bank , local_addr , global_addr , local_size ,
417
- local_stride = 1 , port = 0 ):
416
+ def dma_write_bank_async (self , fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
417
+ local_bank_stride = 1 , port = 0 ):
418
418
419
- self ._dma_write_bank (fsm , ram , bank , local_addr , global_addr , local_size ,
420
- local_stride , port )
419
+ self ._dma_write_bank (fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
420
+ local_bank_stride , port )
421
421
422
- def _dma_write_bank (self , fsm , ram , bank , local_addr , global_addr , local_size ,
423
- local_stride = 1 , port = 0 ):
422
+ def _dma_write_bank (self , fsm , ram , bank , local_bank_addr , global_addr , local_bank_size ,
423
+ local_bank_stride = 1 , port = 0 ):
424
424
425
425
if isinstance (ram , (tuple , list )):
426
426
ram = to_multibank_ram (ram )
@@ -436,8 +436,8 @@ def _dma_write_bank(self, fsm, ram, bank, local_addr, global_addr, local_size,
436
436
for i , _ram in enumerate (ram .rams ):
437
437
starts .append (fsm .current )
438
438
local_blocksize = 1
439
- self ._dma_write (fsm , _ram , local_addr , global_addr , local_size ,
440
- local_stride , local_blocksize , port )
439
+ self ._dma_write (fsm , _ram , local_bank_addr , global_addr , local_bank_size ,
440
+ local_bank_stride , local_blocksize , port )
441
441
ends .append (fsm .current )
442
442
fsm .set_index (fsm .current + 1 )
443
443
@@ -448,21 +448,21 @@ def _dma_write_bank(self, fsm, ram, bank, local_addr, global_addr, local_size,
448
448
fsm .goto_from (e , fin )
449
449
450
450
# DMA with block interleave
451
- def dma_read_block (self , fsm , ram , local_addr , global_addr , local_size ,
451
+ def dma_read_block (self , fsm , ram , local_bank_addr , global_addr , local_size ,
452
452
local_blocksize = 1 , local_stride = None , port = 0 ):
453
453
454
- self ._dma_read_block (fsm , ram , local_addr , global_addr , local_size ,
454
+ self ._dma_read_block (fsm , ram , local_bank_addr , global_addr , local_size ,
455
455
local_blocksize , local_stride , port )
456
456
457
457
self .dma_wait_read (fsm )
458
458
459
- def dma_read_block_async (self , fsm , ram , local_addr , global_addr , local_size ,
459
+ def dma_read_block_async (self , fsm , ram , local_bank_addr , global_addr , local_size ,
460
460
local_blocksize = 1 , local_stride = None , port = 0 ):
461
461
462
- self ._dma_read_block (fsm , ram , local_addr , global_addr , local_size ,
462
+ self ._dma_read_block (fsm , ram , local_bank_addr , global_addr , local_size ,
463
463
local_blocksize , local_stride , port )
464
464
465
- def _dma_read_block (self , fsm , ram , local_addr , global_addr , local_size ,
465
+ def _dma_read_block (self , fsm , ram , local_bank_addr , global_addr , local_size ,
466
466
local_blocksize = 1 , local_stride = None , port = 0 ):
467
467
468
468
if isinstance (ram , (tuple , list )):
@@ -505,24 +505,24 @@ def _dma_read_block(self, fsm, ram, local_addr, global_addr, local_size,
505
505
local_stride = 1
506
506
507
507
ram_method = ram .write_burst_block
508
- self ._dma_read (fsm , ram , local_addr , global_addr , local_size ,
508
+ self ._dma_read (fsm , ram , local_bank_addr , global_addr , local_size ,
509
509
local_stride , local_blocksize , port , ram_method )
510
510
511
- def dma_write_block (self , fsm , ram , local_addr , global_addr , local_size ,
511
+ def dma_write_block (self , fsm , ram , local_bank_addr , global_addr , local_size ,
512
512
local_blocksize = 1 , local_stride = None , port = 0 ):
513
513
514
- self ._dma_write_block (fsm , ram , local_addr , global_addr , local_size ,
514
+ self ._dma_write_block (fsm , ram , local_bank_addr , global_addr , local_size ,
515
515
local_blocksize , local_stride , port )
516
516
517
517
self .dma_wait_write (fsm )
518
518
519
- def dma_write_block_async (self , fsm , ram , local_addr , global_addr , local_size ,
519
+ def dma_write_block_async (self , fsm , ram , local_bank_addr , global_addr , local_size ,
520
520
local_blocksize = 1 , local_stride = None , port = 0 ):
521
521
522
- self ._dma_write_block (fsm , ram , local_addr , global_addr , local_size ,
522
+ self ._dma_write_block (fsm , ram , local_bank_addr , global_addr , local_size ,
523
523
local_blocksize , local_stride , port )
524
524
525
- def _dma_write_block (self , fsm , ram , local_addr , global_addr , local_size ,
525
+ def _dma_write_block (self , fsm , ram , local_bank_addr , global_addr , local_size ,
526
526
local_blocksize = 1 , local_stride = None , port = 0 ):
527
527
528
528
if isinstance (ram , (tuple , list )):
@@ -565,7 +565,7 @@ def _dma_write_block(self, fsm, ram, local_addr, global_addr, local_size,
565
565
local_stride = 1
566
566
567
567
ram_method = ram .read_burst_block
568
- self ._dma_write (fsm , ram , local_addr , global_addr , local_size ,
568
+ self ._dma_write (fsm , ram , local_bank_addr , global_addr , local_size ,
569
569
local_stride , local_blocksize , port , ram_method )
570
570
571
571
# multi-bank packed DMA
@@ -1648,7 +1648,8 @@ def pack_read_req(self, op_sel, local_addr, local_stride, local_size, local_bloc
1648
1648
_local_blocksize .assign (local_blocksize )
1649
1649
packed = self .m .TmpWire (self .op_sel_width + self .addrwidth * 4 + 1 ,
1650
1650
prefix = 'pack_read_req_packed' )
1651
- packed .assign (vtypes .Cat (_op_sel , _local_addr , _local_stride , _local_size , _local_blocksize ))
1651
+ packed .assign (
1652
+ vtypes .Cat (_op_sel , _local_addr , _local_stride , _local_size , _local_blocksize ))
1652
1653
return packed
1653
1654
1654
1655
def unpack_read_req (self , v ):
@@ -1682,7 +1683,8 @@ def pack_write_req(self, op_sel, local_addr, local_stride, size, local_blocksize
1682
1683
_local_blocksize .assign (local_blocksize )
1683
1684
packed = self .m .TmpWire (self .op_sel_width + self .addrwidth * 4 + 1 ,
1684
1685
prefix = 'pack_write_req_packed' )
1685
- packed .assign (vtypes .Cat (_op_sel , _local_addr , _local_stride , _size , _local_blocksize ))
1686
+ packed .assign (
1687
+ vtypes .Cat (_op_sel , _local_addr , _local_stride , _size , _local_blocksize ))
1686
1688
return packed
1687
1689
1688
1690
def unpack_write_req (self , v ):
0 commit comments