Skip to content

Make HasTLController generic to MultiIOModules#18

Open
harrisonliew wants to merge 1 commit into
masterfrom
generic-tlcontroller
Open

Make HasTLController generic to MultiIOModules#18
harrisonliew wants to merge 1 commit into
masterfrom
generic-tlcontroller

Conversation

@harrisonliew
Copy link
Copy Markdown
Collaborator

@harrisonliew harrisonliew commented Jan 31, 2020

The HasTLController trait is super useful to other analog widgets, so let's make it generic to MultiIOModules and check its type in the case of a Lane. Requires overriding allios as well.

Will need to revive #9 eventually to make everything "awl".

case _ => x.clock match {
case OuterClock => (this.clock, this.reset.toBool)
case _ => ???
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

IMO, if we're genericizing this, these probably need to change (Your random analog widget might have a different set of clocks)

case _ => x.clock match {
case OuterClock => (this.clock, this.reset.toBool)
case _ => ???
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See above.

with HasTLController
with HasTLController {
override def allios = Seq(ssio, encoderio, decoderio, packetizerio) ++ debugio
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm, I don't really like this. It's easy to mess up and requires a lot of boilerplate. An alternative might be to create a GenericHasTLController module, then make the current HasTLController implementation inherit from it so that this "API" doesn't change.

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.

2 participants