Skip to content

multiple hwpe support in parallel#45

Closed
arpansur wants to merge 13 commits intomasterfrom
prasadar/multi-hwpe-support
Closed

multiple hwpe support in parallel#45
arpansur wants to merge 13 commits intomasterfrom
prasadar/multi-hwpe-support

Conversation

@arpansur
Copy link
Contributor

I created and integrated an arbiter tree using the hci_arbiter to support multiple hwpes arbitration for wide port.

da-gazzi and others added 11 commits July 8, 2024 16:52
…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
@arpansur arpansur requested a review from FrancescoConti July 22, 2024 16:48
@FrancescoConti
Copy link
Member

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.

Copy link
Member

@FrancescoConti FrancescoConti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly very minor comments. But the N-dimensional interface array are not convincing.

)
`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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment on 2d, 3d interfaces: I am scared by these...


module hci_core_assign_expand
import hwpe_stream_package::*;
#(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same alignment as module

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like github aligns TAB differently. I aligned them too!

#(
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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix alignment on these lines, remove all tabs

end else begin
logic [IW-1:0] id_q;
assign target_r_id = id_q;
assign tcdm_target.gnt = tcdm_initiator.gnt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix alignment

.out ( hwpe_mem )
for(genvar ii=0; ii<N_HWPE; ii++) begin : hwpe_req2mem

hci_router #(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix all alignments in this block

input logic clear_i,
input hci_interconnect_ctrl_t ctrl_i,

hci_core_intf.target in [0:NB_REQUESTS-1][0:NB_CHAN-1],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above. one possible alternative is a single [0:NB_REQUESTS*NB_CHAN-1] array... requires a bit more boilerplate though.

.rst_ni ( rst_ni ),
.clear_i ( clear_i ),
.ctrl_i ( ctrl_i ),
.in_high ( in[ii] ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix alignments

.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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alignments

assign tcdm_target.gnt = tcdm_initiator.gnt & !(fifo_full);
assign tcdm_initiator.req = tcdm_target.req & !(fifo_full);

fifo_v3 #(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@arpansur arpansur force-pushed the prasadar/multi-hwpe-support branch 2 times, most recently from 70544a1 to e54ae19 Compare July 23, 2024 15:16
@arpansur arpansur force-pushed the prasadar/multi-hwpe-support branch from e54ae19 to df0540a Compare July 23, 2024 15:29
@arpansur
Copy link
Contributor Author

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.

Yes, you are right! I removed the reliance on the 2D interfaces

Copy link
Contributor

@sermazz sermazz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@FrancescoConti
Copy link
Member

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.

@FrancescoConti
Copy link
Member

As discussed I opened #53, which supersedes this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments