Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/GenUcieHeader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,21 @@ object GenUcieHeader {
def render(): String = {
val ports = uciePorts
// The header holds one register layout, so every port has to agree on
// everything that layout depends on. Address and moduleId do not reach it:
// the offsets are relative to each port's own MMIO base, and the moduleId
// only names modules.
// everything that layout depends on. Address, moduleId and the clock
// distribution netlist do not reach it: the offsets are relative to each
// port's own MMIO base, the moduleId only names modules, and the netlist is
// physical design.
val canonical = ports.map(
_.copy(
address = ports.head.address,
moduleId = ports.head.moduleId
moduleId = ports.head.moduleId,
clkDistLayout = ports.head.clkDistLayout
)
)
require(
canonical.forall(_ == canonical.head),
"UCIe ports must share a register layout, but their parameters differ " +
s"beyond address and moduleId: ${canonical.distinct.mkString("\n")}"
s"beyond address, moduleId and clock distribution: ${canonical.distinct.mkString("\n")}"
)
edu.berkeley.cs.uciedigital.tilelink.GenUcieHeader
.render(ports.head, regenCommand)
Expand Down
24 changes: 18 additions & 6 deletions src/Iris.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class JTAGChipIO(hasReset: Boolean) extends Bundle {
class IrisSystem(implicit p: Parameters)
extends edu.berkeley.cs.chippy.ChippySystem
with testchipip.soc.CanHaveChipletRouting
with CanHaveUcieClkRegs // UCIe clock registers, which the router can't attach
with testchipip.soc.CanHaveSubsystemInjectors // Enables the subsystem injector API
with testchipip.soc.CanHaveSwitchableOffchipBus // Enables optional off-chip-bus with interface-switch
with testchipip.serdes.CanHavePeripheryTLSerial
Expand Down Expand Up @@ -478,21 +479,32 @@ class IrisConfig(sim: Boolean = false)
routerParams = testchipip.soc.OffchipRouterParams(tableEntries = 4),
ports = Seq(
// PD hardens the two UCIe links together, so UcieComplexPort puts
// both instances inside one UcieComplex module. They are identical
// logic and share a `moduleId`, so they dedup into a single UcieTL
// underneath it; splitting them again is a matter of giving one its
// own `moduleId`.
// both instances inside one UcieComplex module. Their PHYs differ
// in their lane clock distribution: the analog IP's clock DEF gives
// each link a buffered clock tree laid out for its own bump field --
// link 0's in the canonical orientation, link 1's turned 90 degrees
// -- and the netlist of that tree is what its PHY instantiates
// outside simulation. So each link is its own module, `moduleId` 0
// and 1. Each link also has its own high-speed and digital bypass
// clock bumps.
UcieComplexPort(edu.berkeley.cs.uciedigital.tilelink.UcieTLParams(
address = 0x200000,
managerWhere = SBUS,
numLanes = 16,
includeDefaultModels = true
includeDefaultModels = true,
clkDistLayout =
if (sim) edu.berkeley.cs.uciedigital.phy.macros.clocking.ClkDistLayout.Behavioral
else edu.berkeley.cs.uciedigital.phy.macros.clocking.ClkDistLayout.Buffered("r0")
)),
UcieComplexPort(edu.berkeley.cs.uciedigital.tilelink.UcieTLParams(
address = 0x208000,
managerWhere = SBUS,
numLanes = 16,
includeDefaultModels = true
includeDefaultModels = true,
moduleId = 1,
clkDistLayout =
if (sim) edu.berkeley.cs.uciedigital.phy.macros.clocking.ClkDistLayout.Behavioral
else edu.berkeley.cs.uciedigital.phy.macros.clocking.ClkDistLayout.Buffered("r90")
))
))) ++
new WithIrisUncore(sim)
Expand Down
43 changes: 41 additions & 2 deletions src/UcieComplex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package edu.berkeley.cs.iris

import org.chipsalliance.cde.config.Parameters
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.subsystem.TLBusWrapperLocation
import edu.berkeley.cs.uciedigital.tilelink.UcieTLParams
import freechips.rocketchip.subsystem.{BaseSubsystem, TLBusWrapperLocation}
import freechips.rocketchip.tilelink.{TLBuffer, TLWidthWidget}
import edu.berkeley.cs.uciedigital.tilelink.{UcieChipletLink, UcieTLParams}
import testchipip.soc.{
CanHaveChipletRouting,
ChipletLinkParams,
ChipletLinkWrapper,
ChipletLinkWrapperInstantiationLike,
Expand Down Expand Up @@ -81,3 +83,40 @@ object UciePort {
.map(_.ports.collect { case UciePort(u) => u })
.getOrElse(Nil)
}

/** Attaches the part of each UCIe link that the chiplet router can't.
*
* The router gives every port one control node, coupled to its control bus,
* and one clock. A UCIe link has two register blocks: the main one, on the
* clock its PHY makes, and the clock register block, which sets that clock up
* and so runs on the chip's. Only the main one goes through the router. This
* couples the clock register block to the same bus the same way, and clocks it
* from that bus, so its register port needs no crossing.
*
* The links are found by walking the subsystem's children, since the router
* keeps its ports to itself. Extending [[CanHaveChipletRouting]] makes sure
* they exist by the time this runs.
*/
trait CanHaveUcieClkRegs extends CanHaveChipletRouting { this: BaseSubsystem =>
p(ChipletRoutingKey).foreach { params =>
def links(lm: LazyModule): Seq[UcieChipletLink] =
lm.getChildren.reverse.flatMap {
case link: UcieChipletLink => Seq(link)
case child => links(child)
}
val ucieLinks = links(this)
require(
ucieLinks.size == UciePort.all(p).size,
s"found ${ucieLinks.size} UCIe links under the subsystem, but the " +
s"chiplet router has ${UciePort.all(p).size} UCIe ports"
)

val cbus = locateTLBusWrapper(params.controlBusWhere)
ucieLinks.foreach { link =>
link.ucie.chipDigitalClockNode := cbus.fixedClockNode
cbus.coupleTo(s"${link.name}_clk_control") {
link.ucie.clkRegNode := TLWidthWidget(cbus.beatBytes) := TLBuffer() := _
}
}
}
}
2 changes: 1 addition & 1 deletion ucie
Submodule ucie updated 86 files
+13 −1 README.md
+126 −0 rs/src/verilog/afe.rs
+109 −6 rs/src/verilog/mod.rs
+16 −13 rs/src/verilog/phy.rs
+14 −51 rs/src/verilog/primitives.rs
+0 −70 rs/src/verilog/rx.rs
+39 −0 rs/src/verilog/serdes.rs
+41 −0 rs/src/verilog/training.rs
+0 −92 rs/src/verilog/tx.rs
+8 −0 scala/resources/vsrc/clkbuf_horizontal.v
+8 −0 scala/resources/vsrc/clkbuf_vertical.v
+8 −0 scala/resources/vsrc/clkbuf_vertical_fs.v
+225 −11 scala/resources/vsrc/clocking_tile.v
+11 −2 scala/resources/vsrc/debug_clkmux.v
+10 −1 scala/resources/vsrc/rx_clock_lane.v
+35 −0 scala/resources/vsrc/rx_data_lane.v
+17 −11 scala/resources/vsrc/tx_lane.v
+85 −4 scala/resources/vsrc/ucie_clk_dist_network.sv
+322 −0 scala/resources/vsrc/ucie_clk_dist_network_r0.sv
+318 −0 scala/resources/vsrc/ucie_clk_dist_network_r90.sv
+25 −16 scala/resources/vsrc/ucie_clk_div4.v
+146 −45 scala/src/phy/Phy.scala
+25 −1 scala/src/phy/RxAfeCtl.scala
+105 −233 scala/src/phy/macros/Rx.scala
+65 −4 scala/src/phy/macros/clocking/Common.scala
+102 −9 scala/src/phy/macros/clocking/SingleEnded.scala
+101 −37 scala/src/phytest/PhyTest.scala
+696 −8 scala/src/tilelink/Codegen.scala
+572 −35 scala/src/tilelink/TileLink.scala
+9 −8 scala/src/uciedigital/logphy/modules/linktraining/MBInitSM.scala
+14 −9 scala/src/uciedigital/logphy/modules/linktraining/TxD2CPointTest.scala
+18 −4 scala/src/uciedigital/logphy/modules/rdi/RDIController.scala
+13 −2 scala/src/uciedigital/top/UcieDigitalTop.scala
+95 −34 scala/test/src/Utils.scala
+5 −4 scala/test/src/phytest/PhyTestDebugBumpsSpec.scala
+6 −5 scala/test/src/phytest/PhyTestDebugLaneSpec.scala
+6 −5 scala/test/src/phytest/PhyTestFramingSpec.scala
+6 −5 scala/test/src/phytest/PhyTestLoopbackSpec.scala
+16 −6 scala/test/src/phytest/PhyTestSignatureSpec.scala
+163 −0 scala/test/src/phytest/ResetSchemeSpec.scala
+10 −6 scala/test/src/tilelink/CodegenSpec.scala
+1,232 −15 scala/test/src/tilelink/TileLinkSpec.scala
+2 −4 scala/test/src/uciedigital/d2dadapter/D2DMainbandModuleTest.scala
+1 −3 scala/test/src/uciedigital/loopback/LogPhyStagedBringupTest.scala
+1 −3 scala/test/src/uciedigital/loopback/UcieDigitalStagedBringupTest.scala
+1 −3 scala/test/src/uciedigital/loopback/UcieMmioBringupTest.scala
+182 −0 verilog/README.md
+218 −96 verilog/common/afe_tb.vams
+20 −0 verilog/common/clkmux.sv
+16 −0 verilog/common/global_delayline.sv
+18 −0 verilog/common/local_delayline.sv
+91 −44 verilog/common/phy.sv
+0 −0 verilog/common/primitives.sv
+115 −15 verilog/common/rx.sv
+38 −0 verilog/common/serdes_order_pkg.sv
+368 −0 verilog/common/training_tb.sv
+20 −23 verilog/common/tx.sv
+40 −3 verilog/constants.vams
+2 −2 verilog/models/circuit/bbpll.vams
+0 −0 verilog/models/circuit/clock_distribution.vams
+0 −0 verilog/models/circuit/clocking_testbenches/bbpll_tb.vams
+0 −0 verilog/models/circuit/clocking_testbenches/build/.gitignore
+9 −6 verilog/models/circuit/clocking_testbenches/build/Makefile
+0 −0 verilog/models/circuit/clocking_testbenches/build/amscf.scs
+0 −0 verilog/models/circuit/clocking_testbenches/build/bbpll_probe.tcl
+0 −0 verilog/models/circuit/clocking_testbenches/build/clock_distribution_probe.tcl
+0 −0 verilog/models/circuit/clocking_testbenches/build/clocking_ams_control_file.scs
+0 −0 verilog/models/circuit/clocking_testbenches/build/dcdl_probe.tcl
+0 −0 verilog/models/circuit/clocking_testbenches/build/s2d_probe.tcl
+0 −0 verilog/models/circuit/clocking_testbenches/clock_distribution_tb.vams
+0 −0 verilog/models/circuit/clocking_testbenches/dcdl_tb.vams
+0 −0 verilog/models/circuit/clocking_testbenches/s2d_tb.vams
+0 −0 verilog/models/circuit/dcdl.vams
+8 −89 verilog/models/circuit/primitives.vams
+77 −0 verilog/models/circuit/rx.vams
+0 −0 verilog/models/circuit/s2d.vams
+119 −0 verilog/models/circuit/tx.vams
+53 −0 verilog/models/eye/clock_distribution.vams
+34 −0 verilog/models/eye/dcc.sv
+55 −0 verilog/models/eye/dcdl.vams
+22 −0 verilog/models/eye/primitives.vams
+36 −0 verilog/models/eye/rx.sv
+134 −0 verilog/models/eye/rx.vams
+14 −0 verilog/models/eye/s2d.sv
+123 −0 verilog/models/eye/tx.vams
+0 −188 verilog/rx.vams
Loading