Skip to content
Merged
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
51 changes: 25 additions & 26 deletions software/ucie.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,32 +81,31 @@
#define UCIE_DEBUG_DATA_WIDTH 0x8ULL
#define UCIE_DEBUG_DRIVERCTL 0x35d8ULL
#define UCIE_DEBUG_DRIVERCTL_WIDTH 0x8ULL
#define UCIE_DEBUG_TXCTL_TILE 0x35f8ULL
#define UCIE_DEBUG_TXCTL_SHUFFLER 0x3600ULL
#define UCIE_DEBUG_TXCTL_TILE 0x35e8ULL
#define UCIE_DEBUG_TXCTL_SHUFFLER 0x35f0ULL
#define UCIE_DEBUG_TXCTL_SHUFFLER_WIDTH 0x8ULL
#define UCIE_DEBUG_TX_TEST_STATE 0x3700ULL
#define UCIE_DEBUG_TX_PACKETS_SENT 0x3708ULL
#define UCIE_DEBUG_CLK_MUX_SEL 0x3710ULL
#define UCIE_DEBUG_RX_LANE 0x3718ULL
#define UCIE_DEBUG_RX_BIT 0x3720ULL
#define UCIE_TX_VALID 0x3728ULL
#define UCIE_RX_LFSR_VALID 0x3730ULL
#define UCIE_CONTROLLER_SEL 0x3738ULL
#define UCIE_MAINBAND_MODE 0x3740ULL
#define UCIE_SIDEBAND_MODE 0x3748ULL
#define UCIE_CREDIT_FLOW_ENABLE 0x3750ULL
#define UCIE_TX_VALID_LANE_SEL 0x3758ULL
#define UCIE_RX_VALID_LANE_SEL 0x3760ULL
#define UCIE_LAST_SEEN_TL_REQ 0x3768ULL
#define UCIE_SB_TX_PACKET 0x3770ULL
#define UCIE_SB_TX_SEND 0x3778ULL
#define UCIE_SB_TX_BUSY 0x3780ULL
#define UCIE_SB_RX_PACKET 0x3788ULL
#define UCIE_SB_RX_VALID 0x3790ULL
#define UCIE_SB_RX_POP 0x3798ULL
#define UCIE_SB_RX_OVERFLOW 0x37a0ULL
#define UCIE_SB_RX_RST 0x37a8ULL
#define UCIE_SB_TL_RX_OVERFLOW 0x37b0ULL
#define UCIE_DEBUG_TX_TEST_STATE 0x36f0ULL
#define UCIE_DEBUG_TX_PACKETS_SENT 0x36f8ULL
#define UCIE_DEBUG_MUX_SEL 0x3700ULL
#define UCIE_DEBUG_MUX_SEL_WIDTH 0x8ULL
#define UCIE_TX_VALID 0x3710ULL
#define UCIE_RX_LFSR_VALID 0x3718ULL
#define UCIE_CONTROLLER_SEL 0x3720ULL
#define UCIE_MAINBAND_MODE 0x3728ULL
#define UCIE_SIDEBAND_MODE 0x3730ULL
#define UCIE_CREDIT_FLOW_ENABLE 0x3738ULL
#define UCIE_TX_VALID_LANE_SEL 0x3740ULL
#define UCIE_RX_VALID_LANE_SEL 0x3748ULL
#define UCIE_LAST_SEEN_TL_REQ 0x3750ULL
#define UCIE_SB_TX_PACKET 0x3758ULL
#define UCIE_SB_TX_SEND 0x3760ULL
#define UCIE_SB_TX_BUSY 0x3768ULL
#define UCIE_SB_RX_PACKET 0x3770ULL
#define UCIE_SB_RX_VALID 0x3778ULL
#define UCIE_SB_RX_POP 0x3780ULL
#define UCIE_SB_RX_OVERFLOW 0x3788ULL
#define UCIE_SB_RX_RST 0x3790ULL
#define UCIE_SB_TL_RX_OVERFLOW 0x3798ULL
#define UCIE_PCIE_EXT_CAP_ID 0x4000ULL
#define UCIE_DVSEC_VENDOR_ID 0x4004ULL
#define UCIE_DVSEC_ID 0x4008ULL
Expand Down Expand Up @@ -379,7 +378,7 @@ static inline void setup_ucie(uintptr_t base) {
reg_write64(base + UCIE_TX_CLK_N, UCIE_DEFAULT_CLK_N);
reg_write64(base + UCIE_TX_VALID, UCIE_DEFAULT_VALID);
reg_write64(base + UCIE_RX_LFSR_VALID, UCIE_DEFAULT_VALID);
for (int i = 0; i < 4; i++) {
for (int i = 0; i < 2; i++) {
reg_write64(base + UCIE_DEBUG_DRIVERCTL + 8 * i, UCIE_ENABLE_DRIVER_CTL);
}
reg_write64(base + UCIE_DEBUG_TXCTL_TILE, UCIE_ENABLE_TX_CTL);
Expand Down
12 changes: 8 additions & 4 deletions src/GenUcieHeader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,25 @@ object GenUcieHeader {
// 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.
// physical design. Nor does `hasTxDebugLane`: a port without the lane
// keeps its registers' slots, holding nothing.
val canonical = ports.map(
_.copy(
address = ports.head.address,
moduleId = ports.head.moduleId,
clkDistLayout = ports.head.clkDistLayout
clkDistLayout = ports.head.clkDistLayout,
hasTxDebugLane = true
)
)
require(
canonical.forall(_ == canonical.head),
"UCIe ports must share a register layout, but their parameters differ " +
s"beyond address, moduleId and clock distribution: ${canonical.distinct.mkString("\n")}"
s"beyond address, moduleId, clock distribution and TX debug lane: ${canonical.distinct.mkString("\n")}"
)
// Rendered with the lane, so its registers come out as real ones; on a
// port without it they read 0 and drop writes.
edu.berkeley.cs.uciedigital.tilelink.GenUcieHeader
.render(ports.head, regenCommand)
.render(canonical.head, regenCommand)
}

def main(args: Array[String]): Unit = {
Expand Down
12 changes: 9 additions & 3 deletions src/Iris.scala
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ class IrisTop(implicit p: Parameters) extends LazyModule with BindingScope {

// Connect D2D UCIe
val uciePorts = UciePort.all(p)
val c2c_ucie0 = IO(new edu.berkeley.cs.uciedigital.tilelink.UcieBumpsIO(uciePorts(0).numLanes))
val c2c_ucie1 = IO(new edu.berkeley.cs.uciedigital.tilelink.UcieBumpsIO(uciePorts(1).numLanes))
val c2c_ucie0 = IO(new edu.berkeley.cs.uciedigital.tilelink.UcieBumpsIO(uciePorts(0).numLanes, uciePorts(0).hasTxDebugLane))
val c2c_ucie1 = IO(new edu.berkeley.cs.uciedigital.tilelink.UcieBumpsIO(uciePorts(1).numLanes, uciePorts(1).hasTxDebugLane))
c2c_ucie0 <> system.d2d_port_ios.get(0)
c2c_ucie1 <> system.d2d_port_ios.get(1)
}
Expand Down Expand Up @@ -583,14 +583,20 @@ class IrisConfig(sim: Boolean = false)
// in one 2 ns cycle, -0.391 at worst. The block's own timing saw
// each half alone, inside the 0.2 ns I/O budget its SDC gives the
// outside. A cycle of latency each way.
//
// The chip has one off-chip TX data debug lane, in link 1, on its
// own bump; link 0 is built without one (`hasTxDebugLane`). Both
// keep its registers' slots, so they still share one register
// layout. See docs/ucie-debug-bumps.md in the chip repo.
UcieComplexPort(edu.berkeley.cs.uciedigital.tilelink.UcieTLParams(
address = 0x200000,
managerWhere = SBUS,
numLanes = 16,
queueParams = AsyncQueueParams(depth = 16),
includeDefaultModels = true,
sim = sim,
managerBuffer = BufferParams.default
managerBuffer = BufferParams.default,
hasTxDebugLane = false
)),
UcieComplexPort(edu.berkeley.cs.uciedigital.tilelink.UcieTLParams(
address = 0x208000,
Expand Down
Loading