-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frontends/desc64: Transition Regbus master to AXI master and improve performance #2
frontends/desc64: Transition Regbus master to AXI master and improve performance #2
Conversation
4a2dbeb
to
3f1d584
Compare
Please make sure to also update src/systems/cva6_desc accordingly to avoid any incompatibilities |
9f67d5e
to
3e21e56
Compare
@@ -16,6 +16,9 @@ module idma_desc64_top #( | |||
/// or see the idma backend documentation for more details | |||
parameter type reg_rsp_t = logic, | |||
parameter type reg_req_t = logic, | |||
/// axi interface types. Use the AXI_TYPEDEF_ALL macros to define the types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe comment here that this is the AXI bus fetching the descriptors. Might be helpful as your DMA will have two different AXI buses at the top
master_req.ar.addr = submitter_current_addr_q; | ||
master_req.ar.len = 'd3; /* a descriptor is 4 words long (3 + 1) */ | ||
master_req.ar.size = 'b011; /* 8 */ | ||
master_req.ar.burst = BURST_INCR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directly reference the type here: axi_pkg::BURST_INCR
and remove the import above.
master_req.ar.id = '0; | ||
master_req.ar.addr = submitter_current_addr_q; | ||
master_req.ar.len = 'd3; /* a descriptor is 4 words long (3 + 1) */ | ||
master_req.ar.size = 'b011; /* 8 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you derive this from the DW?
// TODO: make sure that a burst does not cross a 4-KB boundary | ||
always_comb begin : proc_submitter_axi_ar | ||
master_req.ar = '0; | ||
master_req.ar.id = '0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could make sense to be controllable via a parameter.
// ignore the b channel, we have no error reporting atm | ||
assign master_req.b_ready = '1; | ||
|
||
always_comb begin : proc_feedback_axi_aw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id, and size as mentioned above
always_comb begin : proc_feedback_axi_w | ||
master_req.w = '0; | ||
master_req.w.data = ~'0; | ||
master_req.w.strb = ~'0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'1
|
||
always_comb begin : proc_feedback_axi_w | ||
master_req.w = '0; | ||
master_req.w.data = ~'0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'x
master_req.w = '0; | ||
master_req.w.data = ~'0; | ||
master_req.w.strb = ~'0; | ||
master_req.w.last = '1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the width is known: 1'b1
. Please check all the other occurrences of this.
@@ -114,8 +112,8 @@ module dma_desc_wrap #( | |||
.idma_rsp_t ( idma_rsp_t ), | |||
.idma_eh_req_t ( idma_pkg::idma_eh_req_t ), | |||
.idma_busy_t ( idma_pkg::idma_busy_t ), | |||
.axi_req_t ( axi_slv_req_t ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe think about if error handling could be valuable in your case. Otherwise, we can leave it disconnected
A few additional comments:
|
a85fbbe
to
aa8d65c
Compare
354527e
to
537609d
Compare
Make sure to run |
537609d
to
27f7117
Compare
c9714ae
to
d84c804
Compare
Now that we changed the frontend, we also need to update its synth module.
It lacks all verification instrumentation. For verification use _top.
The ready-valid signals were one cycle behind the data, leading to wrong data being pushed to the fifo under continuous writes.
With the backend supporting handshaking, it isn't needed any longer.
Now featuring: - Data-Flow design - Bug-free(TM) implementation
1a9c5ed
to
907b5b2
Compare
- These parameters provoke a crash on questasim: vsim tb_idma_desc64_bench -t 1ps \ -GNumberOfTests=10 \ -GChainedDescriptors=10 \ -GSimulationTimeoutCycles=200000 \ -GNumContiguous=20 \ -GMemLatency=16 \ -GRAWCouplingAvail=0 \ -GNSpeculation=20 \ -GTransferLength=256 \ -GDoIRQ=1 \ +trace_file=trace-debug.log \ -voptargs=+acc
This fixes some errors with Questa somehow logging the axi responses as Z and allows us to measure utilization over the entire duration of a transfer (not only the time the iDMA is busy, but also count CPU time) Additionally, relay the NSpeculation, InputFifoDepth and PendingFifo parameters up to the wrapper instantiation site.
As there still is a logic loop, it will probably fail to compile. Add it none the less.
Loop was flush->speculation_valid->address to compare->flush. We now flush the speculation fifo one cycle later while holding the ready/valid at zero, in order not to miss anything.
In order to synthesize the cva6-desc64 system package, we need more modules that weren't on the list yet. Add them.
On flush, we had one extra cycle until the next AR goes out. Fix that.
Now with the latest changes from the dataflow branch. What still needs to be done:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An initial pass looks good. If it is ok for you, I will close this PR, take the branch back into the pulp-platform namespace, rebase and merge it there.
Replaced by #18. |
This commit series transitions the descriptor frontend from using regbus for its master interface to using AXI.
Tested under Questa vsim 2019.3.