Home /Modules/cpu/threadripper-at-spec.sleela

threadripper-at-spec.sleela

lib/cpu/components/examples/threadripper-at-spec.sleela · 124 line(s) · sleela

<< lib/cpu/components/examples/threadripper-at-spec.sleela
   SLeeLa example: assemble AMD Ryzen Threadripper 9000 executors "at spec" —
   the CPU on its real board (TRX50 HEDT / WRX90 PRO), with DDR5-6400 populated
   across the platform's channels, the DDR5/SoC/core voltage rails settled, and
   the DDR5-6400 expert RAM timings honored. Shows both a HEDT 9980X build and a
   workstation PRO 9995WX build, then reports the assembled characterization. >>
#sleela 2.5
material;
class ThreadripperAtSpecExample {
  < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
  << Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
     or catalog can read and (where appropriate) override this record.
     Values are faithful to the subject's real origin where publicly known. >>
  String metaVersion = "1.0.0";
  int metaId = 11281;
  String metaAuthor = "Kiro Agent";
  String metaDate = "2026-10-16";
  String metaCopyright = "SLeeLa project";
  String metaTrademark = "none";
  String metaCorporation = "none";
  < metaOrigin: National | <nation> | International | Galactic >
  String metaOrigin = "International";
  String metaBirthDate = "2026-10-16";
  < metaScienceRating: maturity/robustness on a 1..10 scale >
  int metaScienceRating = 7;
  < metaNationalSchedule: a real, citable instrument or "none" >
  String metaNationalSchedule = "none";

  String getMetaVersion() { return metaVersion; }
  void setMetaVersion(String v) { metaVersion = v; }
  int getMetaId() { return metaId; }
  void setMetaId(int v) { metaId = v; }
  String getAuthor() { return metaAuthor; }
  void setAuthor(String v) { metaAuthor = v; }
  String getDate() { return metaDate; }
  void setDate(String v) { metaDate = v; }
  String getCopyright() { return metaCopyright; }
  void setCopyright(String v) { metaCopyright = v; }
  String getTrademark() { return metaTrademark; }
  void setTrademark(String v) { metaTrademark = v; }
  String getCorporation() { return metaCorporation; }
  void setCorporation(String v) { metaCorporation = v; }
  String getOrigin() { return metaOrigin; }
  void setOrigin(String v) { metaOrigin = v; }
  String getBirthDate() { return metaBirthDate; }
  void setBirthDate(String v) { metaBirthDate = v; }
  int getScienceRating() { return metaScienceRating; }
  void setScienceRating(int v) { metaScienceRating = v; }
  String getNationalSchedule() { return metaNationalSchedule; }
  void setNationalSchedule(String v) { metaNationalSchedule = v; }

  void main() {
    SLAMDThreadripperPlatform plat = new SLAMDThreadripperPlatform();

    < ---------- HEDT: Threadripper 9980X on TRX50, 4-channel DDR5-6400 ------- >
    SLAMDThreadripper9980X hedtCpu = new SLAMDThreadripper9980X();
    < runs at its rated clock >
    hedtCpu.configure();

    SLExecutorBuild hedt = new SLExecutorBuild();
    hedt.configure("threadripper-9980x-hedt");
    hedt.installCpu(hedtCpu);
    < TRX50, sTR5, 4-ch, 88x PCIe5 >
    hedt.installBoard(plat.hedtBoard());
    < 4 × 32 GiB DDR5-6400 >
    hedt.installMemory(plat.hedtMemory(32768));
    hedt.installStorage(new SLComponentCatalog().nvmeGen4());
    < PCIe 5.0 x16 >
    hedt.installBus(plat.pcie5x16());
    boolean hedtFits = hedt.boardFits();
    hedt.assemble();

    print("=== Threadripper 9980X (HEDT / TRX50) ===");
    print("CPU spec clock: " + hedt.cpuSpecMHz() + " MHz");
    print("board: " + hedt.motherboard().name() + " socket=" +
          hedt.motherboard().socketName() + " channels=" +
          hedt.motherboard().channels() + " PCIe lanes=" +
          hedt.motherboard().lanes() + " gen" + hedt.motherboard().pcieGeneration());
    print("RAM: " + hedt.ram().name() + " total=" + hedt.ram().totalCapacityMiB() +
          " MiB, aggregate BW=" + hedt.ram().peakBandwidthMBs() + " MB/s");
    print("memory fits board: " + hedtFits);

    < DDR5-6400 expert timing + rails for this channel. >
    SLRamTiming hedtRam = plat.ddr5_6400Timing("DIMM ch0 (HEDT)");
    print("DDR5-6400 first-word latency: " + hedtRam.firstWordLatencyNs() +
          " ns, random access: " + hedtRam.randomAccessLatencyNs() +
          " ns, honored=" + hedtRam.honored());
    print("Vddq settled: " + plat.vddq().effectiveMv() + " mV, Vcore settled: " +
          plat.vcore().effectiveMv() + " mV, Vsoc settled: " + plat.vsoc().effectiveMv() + " mV");

    < ---------- Workstation: PRO 9995WX on WRX90, 8-channel DDR5-6400 ------- >
    SLAMDThreadripperPro9995WX proCpu = new SLAMDThreadripperPro9995WX();
    proCpu.configure();

    SLExecutorBuild pro = new SLExecutorBuild();
    pro.configure("threadripper-pro-9995wx-ws");
    pro.installCpu(proCpu);
    < WRX90, sTR5, 8-ch, 128x PCIe5 >
    pro.installBoard(plat.proBoard());
    < 8 × 32 GiB DDR5-6400 >
    pro.installMemory(plat.proMemory(32768));
    pro.installStorage(new SLComponentCatalog().nvmeGen4());
    pro.installBus(plat.pcie5x16());
    boolean proFits = pro.boardFits();
    pro.assemble();

    print("=== Threadripper PRO 9995WX (workstation / WRX90) ===");
    print("board: " + pro.motherboard().name() + " channels=" +
          pro.motherboard().channels() + " PCIe lanes=" + pro.motherboard().lanes());
    print("RAM: " + pro.ram().name() + " total=" + pro.ram().totalCapacityMiB() +
          " MiB, aggregate BW=" + pro.ram().peakBandwidthMBs() + " MB/s");
    print("memory fits board: " + proFits);

    < Cross-check: an 8-channel module must NOT fit a 4-channel HEDT board. >
    SLExecutorBuild mismatch = new SLExecutorBuild();
    mismatch.configure("mismatch-check");
    < 4-channel TRX50 >
    mismatch.installBoard(plat.hedtBoard());
    < 8-channel module >
    mismatch.installMemory(plat.proMemory(16384));
    print("8-channel memory on 4-channel board fits (expected false): " + mismatch.boardFits());
  }
}