Skip to content

Commit 70c5803

Browse files
authored
Merge pull request #2165 from ucb-bar/phy-naming
Improve naming of Serial-TL PhyParams
2 parents 1c95be9 + 4c06e55 commit 70c5803

File tree

14 files changed

+42
-42
lines changed

14 files changed

+42
-42
lines changed

fpga/src/main/scala/arty100t/Configs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ class NoCoresArty100TConfig extends Config(
5454
class BringupArty100TConfig extends Config(
5555
new WithArty100TSerialTLToGPIO ++
5656
new WithArty100TTweaks(freqMHz = 50) ++
57-
new testchipip.serdes.WithSerialTLPHYParams(testchipip.serdes.InternalSyncSerialPhyParams(freqMHz=50)) ++
57+
new testchipip.serdes.WithSerialTLPHYParams(testchipip.serdes.DecoupledInternalSyncSerialPhyParams(freqMHz=50)) ++
5858
new chipyard.ChipBringupHostConfig)

fpga/src/main/scala/arty100t/HarnessBinders.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class WithArty100TSerialTLToGPIO extends HarnessBinder({
6262
harnessIO match {
6363
case io: DecoupledPhitIO => {
6464
val clkIO = io match {
65-
case io: InternalSyncPhitIO => IOPin(io.clock_out)
66-
case io: ExternalSyncPhitIO => IOPin(io.clock_in)
65+
case io: HasClockOut => IOPin(io.clock_out)
66+
case io: HasClockIn => IOPin(io.clock_in)
6767
}
6868
val packagePinsWithPackageIOs = Seq(
6969
("G13", clkIO),
@@ -87,10 +87,10 @@ class WithArty100TSerialTLToGPIO extends HarnessBinder({
8787

8888
// Don't add IOB to the clock, if its an input
8989
io match {
90-
case io: InternalSyncPhitIO => packagePinsWithPackageIOs foreach { case (pin, io) => {
90+
case io: DecoupledInternalSyncPhitIO => packagePinsWithPackageIOs foreach { case (pin, io) => {
9191
artyTh.xdc.addIOB(io)
9292
}}
93-
case io: ExternalSyncPhitIO => packagePinsWithPackageIOs.drop(1).foreach { case (pin, io) => {
93+
case io: DecoupledExternalSyncPhitIO => packagePinsWithPackageIOs.drop(1).foreach { case (pin, io) => {
9494
artyTh.xdc.addIOB(io)
9595
}}
9696
}

fpga/src/main/scala/datastorm/Configs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ class NoCoresDatastormConfig extends Config(
5757
class BringupDatastormConfig extends Config(
5858
new WithDatastormSerialTLToFMC ++
5959
new WithDatastormTweaks ++
60-
new testchipip.serdes.WithSerialTLPHYParams(testchipip.serdes.InternalSyncSerialPhyParams(freqMHz=40)) ++
60+
new testchipip.serdes.WithSerialTLPHYParams(testchipip.serdes.DecoupledInternalSyncSerialPhyParams(freqMHz=40)) ++
6161
new chipyard.ChipBringupHostConfig)

fpga/src/main/scala/datastorm/HarnessBinders.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class WithDatastormSerialTLToFMC extends HarnessBinder({
3838
harnessIO match {
3939
case io: DecoupledPhitIO => {
4040
val clkIO = io match {
41-
case io: InternalSyncPhitIO => IOPin(io.clock_out)
42-
case io: ExternalSyncPhitIO => IOPin(io.clock_in)
41+
case io: HasClockOut => IOPin(io.clock_out)
42+
case io: HasClockIn => IOPin(io.clock_in)
4343
}
4444
val packagePinsWithPackageIOs = Seq(
4545
("PIN_C13", clkIO),

fpga/src/main/scala/nexysvideo/HarnessBinders.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class WithNexysVideoSerialTLToGPIO extends HarnessBinder({
5757
harnessIO match {
5858
case io: DecoupledPhitIO => {
5959
val clkIO = io match {
60-
case io: InternalSyncPhitIO => IOPin(io.clock_out)
61-
case io: ExternalSyncPhitIO => IOPin(io.clock_in)
60+
case io: HasClockOut => IOPin(io.clock_out)
61+
case io: HasClockIn => IOPin(io.clock_in)
6262
}
6363
val packagePinsWithPackageIOs = Seq(
6464
("AB22", clkIO),
@@ -82,10 +82,10 @@ class WithNexysVideoSerialTLToGPIO extends HarnessBinder({
8282

8383
// Don't add IOB to the clock, if its an input
8484
io match {
85-
case io: InternalSyncPhitIO => packagePinsWithPackageIOs foreach { case (pin, io) => {
85+
case io: DecoupledInternalSyncPhitIO => packagePinsWithPackageIOs foreach { case (pin, io) => {
8686
nexysTh.xdc.addIOB(io)
8787
}}
88-
case io: ExternalSyncPhitIO => packagePinsWithPackageIOs.drop(1).foreach { case (pin, io) => {
88+
case io: DecoupledExternalSyncPhitIO => packagePinsWithPackageIOs.drop(1).foreach { case (pin, io) => {
8989
nexysTh.xdc.addIOB(io)
9090
}}
9191
}

generators/chipyard/src/main/scala/config/AbstractConfig.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class AbstractConfig extends Config(
7171
new testchipip.serdes.WithSerialTL(Seq( /** add a serial-tilelink interface */
7272
testchipip.serdes.SerialTLParams(
7373
client = Some(testchipip.serdes.SerialTLClientParams(totalIdBits=4)), // serial-tilelink interface will master the FBUS, and support 4 idBits
74-
phyParams = testchipip.serdes.ExternalSyncSerialPhyParams(phitWidth=32, flitWidth=32) // serial-tilelink interface with 32 lanes
74+
phyParams = testchipip.serdes.DecoupledExternalSyncSerialPhyParams(phitWidth=32, flitWidth=32) // serial-tilelink interface with 32 lanes
7575
)
7676
)) ++
7777
new freechips.rocketchip.subsystem.WithNMemoryChannels(1) ++ /** Default 1 AXI-4 memory channels */

generators/chipyard/src/main/scala/config/ChipConfigs.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ChipLikeRocketConfig extends Config(
3131
isMemoryDevice = true
3232
)),
3333
client = Some(testchipip.serdes.SerialTLClientParams()), // Allow an external manager to probe this chip
34-
phyParams = testchipip.serdes.ExternalSyncSerialPhyParams(phitWidth=4, flitWidth=16) // 4-bit bidir interface, sync'd to an external clock
34+
phyParams = testchipip.serdes.DecoupledExternalSyncSerialPhyParams(phitWidth=4, flitWidth=16) // 4-bit bidir interface, sync'd to an external clock
3535
))) ++
3636

3737
new freechips.rocketchip.subsystem.WithNoMemPort ++ // Remove axi4 mem port
@@ -78,7 +78,7 @@ class ChipBringupHostConfig extends Config(
7878
))
7979
)),
8080
client = Some(testchipip.serdes.SerialTLClientParams()), // Allow chip to access this device's memory (DRAM)
81-
phyParams = testchipip.serdes.InternalSyncSerialPhyParams(phitWidth=4, flitWidth=16, freqMHz = 75) // bringup platform provides the clock
81+
phyParams = testchipip.serdes.DecoupledInternalSyncSerialPhyParams(phitWidth=4, flitWidth=16, freqMHz = 75) // bringup platform provides the clock
8282
))) ++
8383

8484
//============================

generators/chipyard/src/main/scala/config/ChipletConfigs.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SymmetricChipletRocketConfig extends Config(
1616
new testchipip.serdes.WithSerialTL(Seq(
1717
testchipip.serdes.SerialTLParams( // 0th serial-tl is chip-to-bringup-fpga
1818
client = Some(testchipip.serdes.SerialTLClientParams()), // bringup serial-tl acts only as a client
19-
phyParams = testchipip.serdes.ExternalSyncSerialPhyParams() // bringup serial-tl is sync'd to external clock
19+
phyParams = testchipip.serdes.DecoupledExternalSyncSerialPhyParams() // bringup serial-tl is sync'd to external clock
2020
),
2121
testchipip.serdes.SerialTLParams( // 1st serial-tl is chip-to-chip
2222
client = Some(testchipip.serdes.SerialTLClientParams()), // chip-to-chip serial-tl acts as a client
@@ -27,7 +27,7 @@ class SymmetricChipletRocketConfig extends Config(
2727
)),
2828
slaveWhere = OBUS
2929
)),
30-
phyParams = testchipip.serdes.SourceSyncSerialPhyParams() // chip-to-chip serial-tl is symmetric source-sync'd
30+
phyParams = testchipip.serdes.CreditedSourceSyncSerialPhyParams() // chip-to-chip serial-tl is symmetric source-sync'd
3131
))
3232
) ++
3333
new testchipip.soc.WithOffchipBusClient(SBUS, // obus provides path to other chip's memory
@@ -51,7 +51,7 @@ class RocketCoreChipletConfig extends Config(
5151
new testchipip.serdes.WithSerialTL(Seq(
5252
testchipip.serdes.SerialTLParams(
5353
client = Some(testchipip.serdes.SerialTLClientParams()),
54-
phyParams = testchipip.serdes.ExternalSyncSerialPhyParams() // chip-to-chip serial-tl is symmetric source-sync'd
54+
phyParams = testchipip.serdes.DecoupledExternalSyncSerialPhyParams() // chip-to-chip serial-tl is symmetric source-sync'd
5555
),
5656
testchipip.serdes.SerialTLParams(
5757
manager = Some(testchipip.serdes.SerialTLManagerParams(
@@ -62,7 +62,7 @@ class RocketCoreChipletConfig extends Config(
6262
slaveWhere = OBUS,
6363
isMemoryDevice = true
6464
)),
65-
phyParams = testchipip.serdes.SourceSyncSerialPhyParams()
65+
phyParams = testchipip.serdes.CreditedSourceSyncSerialPhyParams()
6666
)
6767
)) ++
6868
new testchipip.soc.WithOffchipBusClient(SBUS) ++
@@ -79,7 +79,7 @@ class LLCChipletConfig extends Config(
7979
new chipyard.harness.WithSerialTLTiedOff ++
8080
new testchipip.serdes.WithSerialTL(Seq(testchipip.serdes.SerialTLParams( // 1st serial-tl is chip-to-chip
8181
client = Some(testchipip.serdes.SerialTLClientParams(supportsProbe=true)),
82-
phyParams = testchipip.serdes.SourceSyncSerialPhyParams() // chip-to-chip serial-tl is symmetric source-sync'd
82+
phyParams = testchipip.serdes.CreditedSourceSyncSerialPhyParams() // chip-to-chip serial-tl is symmetric source-sync'd
8383
))) ++
8484
new freechips.rocketchip.subsystem.WithExtMemSize((1 << 30) * 4L) ++
8585
new chipyard.NoCoresConfig

generators/chipyard/src/main/scala/example/FlatTestHarness.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ class FlatTestHarness(implicit val p: Parameters) extends Module {
4747

4848
// Figure out which clock drives the harness TLSerdes, based on the port type
4949
val serial_ram_clock = dut.serial_tl_pad match {
50-
case io: InternalSyncPhitIO => io.clock_out
51-
case io: ExternalSyncPhitIO => clock
50+
case io: HasClockOut => io.clock_out
51+
case io: HasClockIn => clock
5252
}
5353
dut.serial_tl_pad match {
54-
case io: ExternalSyncPhitIO => io.clock_in := clock
55-
case io: InternalSyncPhitIO =>
54+
case io: HasClockIn => io.clock_in := clock
55+
case io: HasClockOut =>
5656
}
5757

5858
dut.serial_tl_pad match {

generators/chipyard/src/main/scala/harness/HarnessBinders.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,16 @@ class WithSerialTLTiedOff(tieoffs: Option[Seq[Int]] = None) extends HarnessBinde
224224
case (th: HasHarnessInstantiators, port: SerialTLPort, chipId: Int) if (tieoffs.map(_.contains(port.portId)).getOrElse(true)) => {
225225
port.io match {
226226
case io: DecoupledPhitIO => io.out.ready := false.B; io.in.valid := false.B; io.in.bits := DontCare;
227-
case io: SourceSyncPhitIO => {
227+
case io: CreditedSourceSyncPhitIO => {
228228
io.clock_in := false.B.asClock
229229
io.reset_in := false.B.asAsyncReset
230230
io.in := DontCare
231231
}
232232
}
233233
port.io match {
234-
case io: InternalSyncPhitIO =>
235-
case io: ExternalSyncPhitIO => io.clock_in := false.B.asClock
236-
case io: SourceSyncPhitIO =>
234+
case io: HasClockOut =>
235+
case io: HasClockIn => io.clock_in := false.B.asClock
236+
case io: CreditedSourceSyncPhitIO =>
237237
case _ =>
238238
}
239239
}
@@ -242,18 +242,18 @@ class WithSerialTLTiedOff(tieoffs: Option[Seq[Int]] = None) extends HarnessBinde
242242
class WithSimTSIOverSerialTL extends HarnessBinder({
243243
case (th: HasHarnessInstantiators, port: SerialTLPort, chipId: Int) if (port.portId == 0) => {
244244
port.io match {
245-
case io: InternalSyncPhitIO =>
246-
case io: ExternalSyncPhitIO => io.clock_in := th.harnessBinderClock
247-
case io: SourceSyncPhitIO => io.clock_in := th.harnessBinderClock; io.reset_in := th.harnessBinderReset
245+
case io: HasClockOut =>
246+
case io: HasClockIn => io.clock_in := th.harnessBinderClock
247+
case io: CreditedSourceSyncPhitIO => io.clock_in := th.harnessBinderClock; io.reset_in := th.harnessBinderReset
248248
}
249249

250250
port.io match {
251251
case io: DecoupledPhitIO => {
252252
// If the port is locally synchronous (provides a clock), drive everything with that clock
253253
// Else, drive everything with the harnes clock
254254
val clock = port.io match {
255-
case io: InternalSyncPhitIO => io.clock_out
256-
case io: ExternalSyncPhitIO => th.harnessBinderClock
255+
case io: HasClockOut => io.clock_out
256+
case io: HasClockIn => th.harnessBinderClock
257257
}
258258
withClock(clock) {
259259
val ram = Module(LazyModule(new SerialRAM(port.serdesser, port.params)(port.serdesser.p)).module)

0 commit comments

Comments
 (0)