Skip to content

Issue with TileLink ready-valid logic in TLMasterModel #175

@tymcauley

Description

@tymcauley

In the TLMasterModel Trait, there are tlWrite* and tlRead* functions for each TileLink channel. All of them contain logic that looks something like this:

def tlWriteA(a: AChannel): Unit = {
  poke(memTL.a.valid, 1)
  pokeA(a)

  while(peek(memTL.a.ready) != BigInt(0)) {
    step(1)
  }
  step(1)
  poke(memTL.a.valid, 0)
}

I'm a bit confused by the line while(peek(memTL.a.ready) != BigInt(0)) {. That would suggest the logic of this function looks something like this:

  • Assert valid.
  • Wait for ready to deassert.
  • Wait a cycle, then deassert valid.

Since the TileLink transaction fires when both ready and valid are high, shouldn't we wait for ready to assert, not deassert? Should that line read while(peek(memTL.a.ready) == BigInt(0)) { or while(peek(memTL.a.ready) != BigInt(1)) {?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions