Conversation
…urces There could be scenarios where aligned as well as misaligned sources multiplexed through a single source. The data received from the HCI is always one word more. If there are strictly aligned sources for example weight in Neureka[TP_IN=32], then they can benefit from the additional bandwidth[TP_IN*9=288b]. Thus, in the aligned case we can provide the whole DATA_WIDTH data to the downstream and it is upto the the downstream sink to slice data according to its requirement.
Some HWPE might depend on the r_valid for the read response whereas don't care for the write and they can support multiple outstanding instructions. So a r_valid generated for a write coming after multiple cycles could behave like a r_valid for a read response(read request follows a write request). Even though the TCDM responds the data after a single cycle latency, any FIFO in the request path can cause the r_valid to arrive a few cycles later even though the handshake is done(writing data to the FIFO). For selected HWPEs we can filter the r_valid for the write requests using FILTER_WRITE_R_VALID parameter exposed to the top.
fix arbiter tree to handle any number of wide ports
|
I will give you a detailed review, but in the meantime one important question: are you sure that the multi-dimensional arrays of interfaces are synthesizable? I strongly suspect they are not. |
FrancescoConti
left a comment
There was a problem hiding this comment.
Mostly very minor comments. But the N-dimensional interface array are not convincing.
rtl/common/hci_helpers.svh
Outdated
| ) | ||
| `define HCI_INTF(__name, __clk) `HCI_INTF_EXPLICIT_PARAM(__name, __clk, `HCI_SIZE_PARAM(__name)) | ||
| `define HCI_INTF_ARRAY(__name, __clk, __range) `HCI_INTF_EXPLICIT_PARAM(__name[__range], __clk, `HCI_SIZE_PARAM(__name)) | ||
| `define HCI_INTF_2D_ARRAY(__name, __clk, __range2D, __range1D) `HCI_INTF_EXPLICIT_PARAM(__name[__range2D][__range1D], __clk, `HCI_SIZE_PARAM(__name)) |
There was a problem hiding this comment.
See my comment on 2d, 3d interfaces: I am scared by these...
rtl/core/hci_core_assign_expand.sv
Outdated
|
|
||
| module hci_core_assign_expand | ||
| import hwpe_stream_package::*; | ||
| #( |
There was a problem hiding this comment.
same alignment as module
There was a problem hiding this comment.
It seems like github aligns TAB differently. I aligned them too!
rtl/core/hci_core_r_id_filter.sv
Outdated
| #( | ||
| parameter hci_size_parameter_t `HCI_SIZE_PARAM(tcdm_target) = '0 | ||
| parameter hci_size_parameter_t `HCI_SIZE_PARAM(tcdm_target) = '0, | ||
| parameter int unsigned N_OUTSTANDING = 2, |
There was a problem hiding this comment.
fix alignment on these lines, remove all tabs
rtl/core/hci_core_r_id_filter.sv
Outdated
| end else begin | ||
| logic [IW-1:0] id_q; | ||
| assign target_r_id = id_q; | ||
| assign tcdm_target.gnt = tcdm_initiator.gnt; |
rtl/hci_interconnect.sv
Outdated
| .out ( hwpe_mem ) | ||
| for(genvar ii=0; ii<N_HWPE; ii++) begin : hwpe_req2mem | ||
|
|
||
| hci_router #( |
There was a problem hiding this comment.
fix all alignments in this block
rtl/interco/hci_arbiter_tree.sv
Outdated
| input logic clear_i, | ||
| input hci_interconnect_ctrl_t ctrl_i, | ||
|
|
||
| hci_core_intf.target in [0:NB_REQUESTS-1][0:NB_CHAN-1], |
There was a problem hiding this comment.
same as above. one possible alternative is a single [0:NB_REQUESTS*NB_CHAN-1] array... requires a bit more boilerplate though.
rtl/interco/hci_arbiter_tree.sv
Outdated
| .rst_ni ( rst_ni ), | ||
| .clear_i ( clear_i ), | ||
| .ctrl_i ( ctrl_i ), | ||
| .in_high ( in[ii] ), |
rtl/interco/hci_router.sv
Outdated
| .NB_IN_CHAN ( NB_IN_CHAN ), | ||
| .NB_OUT_CHAN ( NB_OUT_CHAN ) | ||
| .NB_OUT_CHAN ( NB_OUT_CHAN ), | ||
| .FILTER_WRITE_R_VALID(FILTER_WRITE_R_VALID) |
| assign tcdm_target.gnt = tcdm_initiator.gnt & !(fifo_full); | ||
| assign tcdm_initiator.req = tcdm_target.req & !(fifo_full); | ||
|
|
||
| fifo_v3 #( |
There was a problem hiding this comment.
i am not a huge fan of depending on common_cells... but ok.
2D interface arrays are not synthesizable at the moment. Thus, 2D interfaces are flattened to 1D arrays. Additionally the alignements are fixed
70544a1 to
e54ae19
Compare
e54ae19 to
df0540a
Compare
Yes, you are right! I removed the reliance on the 2D interfaces |
There was a problem hiding this comment.
I rebased this branch on top of the latest modifications to the HCI done for Astral (https://github.com/pulp-platform/hci/tree/lg/ecc_rebase_v2.1.1), so that I could use it in our Cluster pv2.
Please chek: https://github.com/pulp-platform/hci/tree/smazzola/chimera
Can we change the origin branch of this PR to smazzola/chimera? Or I open another PR and we close this? @FrancescoConti @arpansur
|
I am not sure we can change the origin (we can change the base from the PR interface), so I'd say let's open a new PR and then we close this one mentioning the new PR. |
|
As discussed I opened #53, which supersedes this PR |
I created and integrated an arbiter tree using the hci_arbiter to support multiple hwpes arbitration for wide port.