Skip to content
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

Give TileLink keys more sensible names #349

Merged
merged 4 commits into from Sep 27, 2016
Merged

Give TileLink keys more sensible names #349

merged 4 commits into from Sep 27, 2016

Conversation

zhemao
Copy link
Contributor

@zhemao zhemao commented Sep 27, 2016

The "Outermost" and "MMIO_Outermost" keys are renamed to "MCtoEdge"
and "MMIOtoEdge". They are only used after width conversion to adapt to
external interfaces in the periphery.

That means there is no longer any width adapting done in the Coreplex,
the width adapter is moved to the Periphery just before conversion
to AXI/AHB or sending off chip.

We also add an additional TLKey "EdgetoSlave" for the bus_axi interface.
This means there is also a width adapter from the AXI -> TL converter
to the coreplex slave port.

This also fixes a bug introduced previously in which the wrong
parameters object is given to the width adapter for external MMIO.

@@ -50,7 +50,7 @@ abstract class BaseCoreplex(c: CoreplexConfig)(implicit p: Parameters) extends L

abstract class BaseCoreplexBundle(val c: CoreplexConfig)(implicit val p: Parameters) extends Bundle with HasCoreplexParameters {
val master = new Bundle {
val mem = Vec(c.nMemChannels, new ClientUncachedTileLinkIO()(outermostParams))
val mem = Vec(c.nMemChannels, new ClientUncachedTileLinkIO()(outerMemParams))
Copy link
Contributor

Choose a reason for hiding this comment

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

This is changing behavior. Was this a bug before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, before the width adapter was still inside the coreplex. Now the width adapter is in the periphery. That way there are no edge* parameters in the coreplex. I think that's the most sensible and consistent way.

val backendBuffering = TileLinkDepths(0,0,0,0,0)
for ((bank, icPort) <- managerEndpoints zip mem_ic.io.in) {
val enqueued = TileLinkEnqueuer(bank.outerTL, backendBuffering)
val unwrapped = TileLinkIOUnwrapper(enqueued)
TileLinkWidthAdapter(icPort, unwrapped)
icPort <> TileLinkIOUnwrapper(enqueued)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see what you're doing here now. You've moved the width conversion out to the Periphery. I support this change.

Copy link
Member

Choose a reason for hiding this comment

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

Yes this seems more straightforward

@@ -173,7 +175,8 @@ trait PeripheryMasterMemModule extends HasPeripheryParameters {

// Abuse the fact that zip takes the shorter of the two lists
((io.mem_axi zip coreplexIO.master.mem) zipWithIndex) foreach { case ((axi, mem), idx) =>
val axi_sync = PeripheryUtils.convertTLtoAXI(mem)
val mem_edge = TileLinkWidthAdapter(mem, edgeMemParams)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't you factor mem_edge out of the specific axi, ahb, tl connection routines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@yunsup
Copy link
Contributor

yunsup commented Sep 27, 2016

This commit has 3 different things going on. I suggest you split them out to separate commits:

  1. bug fix
  2. making coreplex use outerMemParams instead of edgeMemParams
  3. rename parameters

@yunsup
Copy link
Contributor

yunsup commented Sep 27, 2016

Howie, can you also take a look at why the regression failed?

@zhemao
Copy link
Contributor Author

zhemao commented Sep 27, 2016

Yeah, the regressions failed because I forgot that the old Outermost TLKey was also increasing the size of the client_xact_id. So now the FancyMemtestConfig is failing because ID bits are getting cut off. I'm fixing that now by just making the client_xact_id for L2toMC large enough to get through the arbiters.

@zhemao
Copy link
Contributor Author

zhemao commented Sep 27, 2016

I'll try to split the commits.

case TLKey("Outermost") => site(TLKey("L2toMC")).copy(
maxClientXacts = site(NAcquireTransactors) + 2,
maxClientsPerPort = site(NBanksPerMemoryChannel),
dataBeats = site(MIFDataBeats))
Copy link
Member

Choose a reason for hiding this comment

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

Coreplex not knowing about "outermost"/"edgeX" also feels correct.

 * Outermost -> MCtoEdge
 * MMIO_Outermost -> MMIOtoEdge

Then the corresponding parameters objects are

 * L1toL2 -> innerParams
 * L2toMC -> outerMemParams
 * L2toMMIO -> outerMMIOParams
 * MCtoEdge -> edgeMemParams
 * MMIOtoEdge -> edgeMMIOParams
@yunsup
Copy link
Contributor

yunsup commented Sep 27, 2016

This is great!

@hcook hcook merged commit 71a9c78 into master Sep 27, 2016
@hcook hcook deleted the tl1-params-fix branch September 27, 2016 19:48
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.

None yet

3 participants