Conversation
08a9bb1 to
6eef71c
Compare
[hardware] Correct address scrambler parametrization
6eef71c to
7702798
Compare
[software] Add DMA with DAS test
7702798 to
ee0ff54
Compare
d70ea47 to
0a7a90c
Compare
mbertuletti
left a comment
There was a problem hiding this comment.
Thank you for your work,
- Please keep naming scheme consistent between hardware and software. Add explanatory comments where needed to clarify the use of some signals. In particular the group_factor was replaced by tiles_das.
- Please remove unused or commented out code blocks and format the .sv files.
- Please verify the critical path of the design.
| #define CONTROL_REGISTERS_PARAM_MAX_NUMGROUPS 8 | ||
|
|
||
| // Supported number of DAS partitions | ||
| #define CONTROL_REGISTERS_PARAM_NUM_D_A_S_PARTITIONS 4 |
There was a problem hiding this comment.
Please use consistent naming, you use "DAS" for other defines.
There was a problem hiding this comment.
Register naming has been changed from D_A_S to DAS
| // Wake Up Offst Register | ||
| #define CONTROL_REGISTERS_WAKE_UP_OFFST_REG_OFFSET 0x30 | ||
|
|
||
| // Tile grouping for DAS partition (common parameters) |
There was a problem hiding this comment.
These registers shift the address of other previously existing registers. Couldn't you place them at address 0x64 and following?
There was a problem hiding this comment.
I placed DAS related registers to the end of the existing regs
| // Wake Up Offst Register | ||
| #define CONTROL_REGISTERS_WAKE_UP_OFFST_REG_OFFSET 0x30 | ||
|
|
||
| // Tile grouping for DAS partition (common parameters) |
There was a problem hiding this comment.
Please add a Comment on what the DAS addresses are used for. The difference between the "TILES_DAS" and "START_DAS" registers is not clear.
There was a problem hiding this comment.
Desc for the DAS related regs has been addded
| ## Unreleased | ||
|
|
||
| ### Added | ||
| - Add Dynamic Address Scrambling (DAS) support with configurable partitioning, hardware address scrambler, and software runtime for dynamic heap allocation |
There was a problem hiding this comment.
Please move this to the bottom of the list.
There was a problem hiding this comment.
Moved to the end of the list
| [](https://github.com/pulp-platform/mempool/actions/workflows/ci.yml) | ||
| [](https://github.com/pulp-platform/mempool/actions/workflows/lint.yml) | ||
| [](https://opensource.org/licenses/Apache-2.0) | ||
| # MemPool Dynamic Allocation Scheme |
There was a problem hiding this comment.
Please add this to the bottom of ./config/README.md and provide more information about how the DAS registers should be configured.
There was a problem hiding this comment.
This part has been moved to config/README.md
| .tcdm_slave_resp_valid_o (tcdm_slave_resp_valid[g] ), | ||
| .tcdm_slave_resp_ready_i (tcdm_slave_resp_ready[g] ), | ||
| `ifdef DAS | ||
| .tiles_das_i (tiles_das_i ), |
There was a problem hiding this comment.
FOrmat misaligned parentheses.
There was a problem hiding this comment.
Please confirm that this solution does not compromise the timing of the cores to L1 connection.
There was a problem hiding this comment.
I narrowed the add/sub datapath from 32-bit to 8-bit.
I will schedule a backend run asap
There was a problem hiding this comment.
Can the address scrambler of the mempool/hw/src/ be reused? In this case the naming of the input signals is possibly wrong and the group_factor_i should be replaced by the more intuitive das_tile_i.
There was a problem hiding this comment.
Good catch, i have aligned the naming accordingly.
However, the scrambler in DMA is not the same as the one in the Tile, because DAS does not consider the logic for the stack region. Therefore, the logic related to the stack region has been stripped.
I would keep these two module apart.
| end | ||
| end | ||
|
|
||
| // ------ Considering Partition Scheme ------ // |
There was a problem hiding this comment.
Can you add a comment on what shift_index, partition_mask, masked_start_addr, shift_index_sc, shift_row, shift_partition, masked_shift_row are used for? The naming is not very clear and should be possibly improved.
There was a problem hiding this comment.
You are very right, it was very confusing. i hope now it is clearer
| logic [AddrWidth-1:0] partition_mask; | ||
| addr_t masked_start_addr; | ||
|
|
||
| always_comb begin |
There was a problem hiding this comment.
Similar case blocks were replaced by lzcs in the address scramblers. I believe such implementation and a consistent name replacement for group_factor would improve clarity.
There was a problem hiding this comment.
Thank you for the advice, this has been adapted
…gnals with proper comments
| // L2 --> L1 | ||
| if (burst_req_i.num_bytes<=DmaRegionWidth )begin | ||
| burst_req_o[i].src = burst_req_i.src+i*rows_das_i*DmaRegionWidth; | ||
| end else if (i==2) begin |
This PR enabled TeraPool with a dynamic allocation scheme with support for the DMA engine.
address_scramblerand in the software for allocation.mempool_pkg.sv.tiles_das,start_das,rows_das, and make it consistent across all the files.Changelog
Added
Changed
address_scrambler.svfor dynamic address mappingidma_midend_distributor.svandidma_midend_splitter.svfor augmented transaction splitmempool_tile.sv,mempool_sub_group.sv,mempool_group.sv, andmempool_cluster.svfor passing scrambling configurationFixed
(Reference to issues, labels, and related merge requests)
Checklist
Please check our contributing guidelines before opening a Pull Request.