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

Documentation to TLBroadcast #2706

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Documentation to TLBroadcast #2706

wants to merge 1 commit into from

Conversation

sequencer
Copy link
Member

Related issue: None

Type of change: Documentation

Impact: no functional change

Development Phase: implementation

val addressMask = AddressDecoder(flatAddresses.map(Seq(_)), flatAddresses.map(_.mask).reduce(_|_))
/** This identify all the caches for the probe walker. */
val caches: Seq[IdRange] = clients.filter(_.supports.probe).map(_.sourceId)
/** Use start bit in IdRange to locate which client is target. */
Copy link
Member

Choose a reason for hiding this comment

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

I think it is the lowest id value in the IdRange, which isn't the same as a bit index within a UInt

val d_trackerOH = VecInit(trackers.map { t => t.need_d && t.source === d_normal.bits.source }).asUInt holdUnless d_first

/** if d is valid, and not drop. */
Copy link
Member

Choose a reason for hiding this comment

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

Good comments don't repeat the code or explain it. They clarify its intent. The next line of code literally says !out.d.valid || !d_drop so I don't think this comment adds any clarity.

(trackers zip UIntToOH(in.e.bits.sink).asBools) foreach { case (tracker, select) =>
tracker.e_last := select && in.e.fire()
}

// Depending on the high source bits, we might transform D
/* Client D Channel:
* Forward or transform manger D channel based on the payload of the source.
Copy link
Member

Choose a reason for hiding this comment

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

manger -> manager

Copy link
Member

Choose a reason for hiding this comment

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

you should find/replace this change, i see more

// ProbeAck => decrement tracker, drop
// ProbeAckData => decrement tracker, send out A as PutFull(DROP)
// ReleaseData => send out A as PutFull(TRANSFORM)
// Release => send out D as ReleaseAck
Copy link
Member

Choose a reason for hiding this comment

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

Did this information get lost? Or is it replicated elsewhere now?

Copy link
Member Author

Choose a reason for hiding this comment

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

In has been moved to Top of this file under
Behavior of [[TLBroadcast]]:
Actually original comments was wrong or not accurate, since ProbeAckData won't decrement tracker(MSHR)
Real behavior should be:

  1. ClientA -Acquire-> BH
  2. BH -Probe-> ClientB
  3. ClientB -ProbeAckData-> BH
  4. BH -Put-> Manger
  5. Manger -AccessAckData-> BH

decrement by Acquire should happen in 5. rather than 3.

val cacheOH = UInt(caches.W)
}

/** Tracker to track trans */
Copy link
Member

Choose a reason for hiding this comment

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

I would say something here about how some people might call this a Miss Status Handling Register (MSHR)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I finally understand it after documenting to MSHR of InclusiveCache, I found they have a similar behavior.

val in_a_first: Bool = Input(Bool())
/** incoming A channel from clients. */
val in_a: DecoupledIO[TLBundleA] = Flipped(Decoupled(new TLBundleA(edgeIn.bundle)))
/** output A channel to mangers. */
Copy link
Member

Choose a reason for hiding this comment

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

I'd say "inwards" and "outwards" here to match what we wrote for the diplomacy node docs

count := 1.U
}

/* cache [[cacheOH]] by [[io.clearOH]] */
Copy link
Member

Choose a reason for hiding this comment

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

Again I think this repeats the code without clarifying its intent. (I think its intent is to clear some of the pending bits identifying which caches still need to be probed).

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

Successfully merging this pull request may close these issues.

None yet

3 participants