import React from 'react'; import { motion } from 'framer-motion'; import { API_BASE } from '../api'; interface Props { designName: string; result: any; jobStatus: string; events: any[]; jobId?: string; onReset: () => void; } function StatCell({ label, value, warn }: { label: string; value: any; warn?: boolean }) { return (
{success ? [ buildTimeMin > 0 ? `${buildTimeMin} min` : null, checkpointCount > 0 ? `${checkpointCount} checkpoints passed` : null, strategy || null, ].filter(Boolean).join(' · ') : `${designName} · Review the log below for details` }
{spec.substring(0, 1200)}{spec.length > 1200 ? '\n…' : ''}
{rtlSnippet.substring(0, 1200)}{rtlSnippet.length > 1200 ? '\n// …' : ''}
| Iter | WNS (ns) | TNS (ns) | Congestion % | Area (µm²) | Power (W) |
|---|---|---|---|---|---|
| {s.iteration} | = 0 ? 'true' : 'false'}>{s.wns?.toFixed(3)} | {s.tns?.toFixed(3)} | {s.congestion?.toFixed(2)} | {s.area_um2?.toFixed(0)} | {s.power_w?.toExponential(2)} |
{failureExplanation}
)} {failureSuggestion && (Try: {failureSuggestion}
)} {result?.error && !failureExplanation && (
{String(result.error).substring(0, 500)}