Spaces:
Running
Running
Restore applicable sp2 Analysis design constraints
Browse files- docs/topology/2to1_switching_capacitors/analysis_constraints.md +37 -0
- docs/topology/2to1_switching_capacitors/integration/verify_analysis_constraints.mjs +109 -0
- docs/topology/2to1_switching_capacitors/local_integration.md +1 -1
- docs/topology/minjie_confirmation_list.md +2 -0
- static/compare/app.js +43 -20
- static/compare/recommend.js +7 -2
- static/compare/style.css +2 -1
- static/openpels-source.zip +2 -2
docs/topology/2to1_switching_capacitors/analysis_constraints.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Analysis Design Constraints audit
|
| 2 |
+
|
| 3 |
+
The original XFLY6S Analysis view at `9a4ea8c` already exposed frequency, silicon budget and capacitance. The Analysis form, styles and recommendation files were identical at `local-baseline-v1.0`, and the form and defaults carried forward to the current XFLY6S view. The first `sp2` integration generated those same fields, then a `.sp2-focused` CSS rule hid every labeled field except voltage and current. Its efficiency estimate took frequency, total FET width, capacitance and ESR from the collapsed 180 nm device panel instead. Die-area entry was unavailable for `sp2`. Pre-fix Chrome showed 17 visible XFLY6S controls in area mode and two for `sp2`. [Generated form](../../../static/compare/app.js), [focused styles](../../../static/compare/style.css)
|
| 4 |
+
|
| 5 |
+
## Design Constraints and defaults
|
| 6 |
+
|
| 7 |
+
| Input | Baseline and current XFLY6S | sp2 after this fix |
|
| 8 |
+
| --- | --- | --- |
|
| 9 |
+
| Output voltage, output current | Form defaults 0.825 V, 2 A. Gallery handoff supplies the selected reference point, initially 0.8 V, 2 A. Editable. | Initial nominal 1.5 V, 1.1404833 A from Gallery. Editable. |
|
| 10 |
+
| Frequency | 10 MHz. Editable. | 2 MHz. Editable in Design Constraints. Previously editable in the collapsed device panel. |
|
| 11 |
+
| Silicon budget | Die area + Ron × area by default. Area mode shows 1 mm² total die area, 0.5 usable fraction, 1 mΩ·mm² Ron × area. Width mode shows 360 mm maximum FET width. Both modes editable. | Width mode by default, 80.2666667 mm, preserving the previous estimate. Switch to area mode for 1 mm², 0.5 and 1 mΩ·mm², all editable. |
|
| 12 |
+
| Flying/clamp capacitance and ESR | 4 µF total, 20 mΩ main cap ESR. Editable. | 2 µF total, 20 mΩ ESR per flying cap. Editable in Design Constraints. Previously editable in the collapsed device panel. |
|
| 13 |
+
| Maximum cap and winding counts | 4 caps, 2 windings. Editable shortlist screens. | Hidden. The fixed reference has two flying capacitors and zero power windings. |
|
| 14 |
+
| Winding DCR, leakage, magnetizing inductance | 38 mΩ, 50 nH, 1 µH per winding. Editable. | Hidden. Winding DCR is passed as zero for the physical example. |
|
| 15 |
+
| Maximum phase ripple, estimated droop | 5%, 10%. Editable shortlist screens. | Hidden. The fixed calculation reports delivered voltage and loss over the specified budget. |
|
| 16 |
+
| Priority | Lowest modeled loss. Editable alternatives prioritize capacitors or magnetics. | Hidden. `sp2` has no coupled-inductor shortlist entry. |
|
| 17 |
+
|
| 18 |
+
## Advanced inputs and routing
|
| 19 |
+
|
| 20 |
+
- **Per-unit loss weights**, inside **Inspect schematics, die allocation, and loss derivations**, default to `ρC = 1`, `ρL = 1`, `ρQ = 20`. Users can edit them and click Apply. `params()` passes those weights, selected IDs and the ratio to `/api/analyze-pu`. They are independent of the physical example's frequency and capacitance. Inspecting an XFLY shortlist result can populate the per-unit fields using that result's actual resistance base. [Analysis inputs and exports](../../../static/compare/app.js), [per-unit engine](../../../static/compare/engine.js#L20)
|
| 21 |
+
- **Recommendation**, used by XFLY6S, reads the complete design form through `designParameters()` and the **Update candidates** button. In area mode, usable area is die area × fraction and the available width is `0.602 × usable area ÷ (Ron × area in Ω·mm²)`. Width mode uses the entered maximum directly. The unchanged search varies total width under that limit, respects applicable ripple/resource/droop screens, and evaluates the existing topology loss equations. The cap budget is allocated per capacitor and frequency also supplies winding excitation and the gate estimate. Its gate calculation uses the default 3.3 V and the technology reference; the advanced device panel is a separate calculation. [Recommendation and width search](../../../static/compare/recommend.js)
|
| 22 |
+
- **180 nm device reference**, collapsed by default, has its own XFLY example inputs. These are 10 MHz, 3.3 V gate swing, 360 mm width, 4 µF budget, 20 mΩ cap ESR, 38 mΩ winding resistance, one gate charge per period, and blank effective Coss energy. The panel uses the specified design voltage and current. Edits apply through **Update example** and export through **Technology JSON**. The illustrative reference constants are 0.602 Ω, 2.51 pC gate charge and 1.12 pC output charge at 1 mm width, with a 0.18 µm reference length. These constants have no form controls. Blank effective Coss energy remains unknown. [Technology implementation](../../../static/compare/technology.js)
|
| 23 |
+
- **sp2 physical example** takes frequency, available width, total flying capacitance and ESR directly from Design Constraints and updates the displayed estimate on input. The same existing area-to-width conversion supplies width mode and die-area mode. The model uses the full specified budget with eight equal devices and two equal flying capacitors. Technology controls for gate swing (3.3 V), gate events (one) and optional effective Coss energy (blank) remain editable in the advanced panel. The duplicate resource inputs are hidden there so the visible inputs and exported calculation have one source. The magnetic width optimizer and ranking remain specific to the coupled-inductor shortlist. The integrated NGSpice settings are qualified separately. [Analysis wiring](../../../static/compare/app.js), [simulation domain](local_integration.md)
|
| 24 |
+
|
| 25 |
+
The ratio picker and topology toggles are hidden when Gallery focuses Analysis on a single reference. The form sends the selected ratio, `voltage_mode: output_ratio` and `load_mode: current`. It derives input voltage from ratio × nominal output voltage and does not offer separate input-voltage or power-load controls. The conversion-ratio plot, loss derivation and recommendation-scope disclosures are collapsible. They add no physical constraint inputs. The vision disclosure belongs to the image-review workflow.
|
| 26 |
+
|
| 27 |
+
## Reproduction
|
| 28 |
+
|
| 29 |
+
Run `./run-local.sh` and execute:
|
| 30 |
+
|
| 31 |
+
```sh
|
| 32 |
+
node docs/topology/2to1_switching_capacitors/integration/verify_analysis_constraints.mjs
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
The Chrome check uses both Gallery references, validates XFLY6S recommendation export, recalculates `sp2` with edited frequency, ESR and capacitance, checks both silicon modes including the 60.2 mm area-mode conversion, checks Coss and restores each topology's edited settings when switching. No analytical or device loss equations changed.
|
| 36 |
+
|
| 37 |
+
The focused check passed in Chrome at port 8765. The real Simulator smoke test also passed for the `sp2` nominal case, output-current sweep, and all three legacy 4:1 presets. All 45 archived analytical tests passed. The rebuilt source archive passed its integrity test and matched the generated runtime files.
|
docs/topology/2to1_switching_capacitors/integration/verify_analysis_constraints.mjs
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import assert from "node:assert/strict";
|
| 2 |
+
import { readFile } from "node:fs/promises";
|
| 3 |
+
import { createRequire } from "node:module";
|
| 4 |
+
import { dirname, join, resolve } from "node:path";
|
| 5 |
+
import { fileURLToPath } from "node:url";
|
| 6 |
+
|
| 7 |
+
const here = dirname(fileURLToPath(import.meta.url));
|
| 8 |
+
const source = resolve(process.env.OPENPELS_SOURCE ?? join(here, "../../../../local-source/openpels"));
|
| 9 |
+
const { chromium } = createRequire(join(source, "package.json"))("@playwright/test");
|
| 10 |
+
const origin = new URL(process.env.OPENPELS_URL ?? "http://127.0.0.1:8765").origin;
|
| 11 |
+
const browser = await chromium.launch({ channel: "chrome", headless: true });
|
| 12 |
+
try {
|
| 13 |
+
const page = await browser.newPage({ viewport: { width: 1600, height: 1100 } });
|
| 14 |
+
await page.route("**/*", (route) => {
|
| 15 |
+
const url = new URL(route.request().url());
|
| 16 |
+
return ["http:", "https:"].includes(url.protocol) && url.origin !== origin
|
| 17 |
+
? route.abort()
|
| 18 |
+
: route.continue();
|
| 19 |
+
});
|
| 20 |
+
const errors = [];
|
| 21 |
+
page.on("pageerror", (error) => errors.push(error.message));
|
| 22 |
+
await page.goto(origin);
|
| 23 |
+
const analysis = page.frameLocator("#comparison");
|
| 24 |
+
const field = (name) => analysis.locator("#design-" + name);
|
| 25 |
+
async function open(ratio, id) {
|
| 26 |
+
if (await page.locator("#back-gallery").isVisible()) await page.locator("#back-gallery").click();
|
| 27 |
+
await page.locator(`[data-family="${ratio}"]`).click();
|
| 28 |
+
await page.locator(`[data-topology-id="${id}"]`).click();
|
| 29 |
+
await analysis.locator(`#circuits article[data-topology="${id}"]`).waitFor();
|
| 30 |
+
}
|
| 31 |
+
async function exportJson(button) {
|
| 32 |
+
const pending = page.waitForEvent("download");
|
| 33 |
+
await analysis.locator(button).click();
|
| 34 |
+
const file = await pending;
|
| 35 |
+
return JSON.parse(await readFile(await file.path(), "utf8"));
|
| 36 |
+
}
|
| 37 |
+
const near = (value, expected) => assert(Math.abs(value - expected) < 1e-8, `${value} ≠ ${expected}`);
|
| 38 |
+
|
| 39 |
+
await open(4, "xfly2p");
|
| 40 |
+
assert.equal(await field("fs_mhz").inputValue(), "10");
|
| 41 |
+
assert.equal(await field("budget_mode").inputValue(), "area");
|
| 42 |
+
assert(await field("die_mm2").isVisible());
|
| 43 |
+
assert(await field("lm_uh").isVisible());
|
| 44 |
+
assert(!(await field("width_mm").isVisible()));
|
| 45 |
+
await field("budget_mode").selectOption("width");
|
| 46 |
+
await field("width_mm").fill("350");
|
| 47 |
+
await field("fs_mhz").fill("11");
|
| 48 |
+
await analysis.locator("#recommend-design").click();
|
| 49 |
+
const shortlist = await exportJson("#export-recommendation");
|
| 50 |
+
assert.equal(shortlist.parameters.fs_mhz, 11);
|
| 51 |
+
assert.equal(shortlist.available_width_mm, 350);
|
| 52 |
+
assert(shortlist.rows.some((item) => item.id === "xfly2p"));
|
| 53 |
+
|
| 54 |
+
await open(2, "sp2");
|
| 55 |
+
const efficiency = analysis.locator("#sp2-efficiency");
|
| 56 |
+
await efficiency.filter({ hasText: /Modeled efficiency: 93\.2\d%/ }).waitFor();
|
| 57 |
+
assert.equal(await field("fs_mhz").inputValue(), "2");
|
| 58 |
+
assert.equal(await field("budget_mode").inputValue(), "width");
|
| 59 |
+
assert.equal(await field("width_mm").inputValue(), "80.2666667");
|
| 60 |
+
assert.equal(await field("cap_uf").inputValue(), "2");
|
| 61 |
+
assert(!(await field("lm_uh").isVisible()));
|
| 62 |
+
const original = await efficiency.innerText();
|
| 63 |
+
await field("fs_mhz").fill("4");
|
| 64 |
+
await field("width_mm").fill("160");
|
| 65 |
+
await field("cap_uf").fill("4");
|
| 66 |
+
await field("rc_mohm").fill("25");
|
| 67 |
+
assert.notEqual(await efficiency.innerText(), original);
|
| 68 |
+
|
| 69 |
+
const tech = analysis.locator("#technology-panel");
|
| 70 |
+
if (!(await tech.evaluate((panel) => panel.open))) await tech.locator("summary").first().click();
|
| 71 |
+
assert(!(await analysis.locator("#tech-width_mm").isVisible()));
|
| 72 |
+
assert(await analysis.locator("#tech-vgs").isVisible());
|
| 73 |
+
await analysis.locator("#tech-eoss_pj").fill("3");
|
| 74 |
+
await analysis.locator("#apply-technology").click();
|
| 75 |
+
const widthReport = await exportJson("#export-technology");
|
| 76 |
+
assert.equal(widthReport.parameters.fs_mhz, 4);
|
| 77 |
+
assert.equal(widthReport.parameters.width_mm, 160);
|
| 78 |
+
assert.equal(widthReport.parameters.cap_uf, 4);
|
| 79 |
+
assert.equal(widthReport.parameters.rc_mohm, 25);
|
| 80 |
+
near(widthReport.rows[0].cf, 2e-6);
|
| 81 |
+
near(widthReport.rows[0].device[0].width_mm, 20);
|
| 82 |
+
assert(widthReport.rows[0].efficiency_includes_coss);
|
| 83 |
+
|
| 84 |
+
await field("budget_mode").selectOption("area");
|
| 85 |
+
assert(!(await field("width_mm").isVisible()));
|
| 86 |
+
await field("die_mm2").fill(".5");
|
| 87 |
+
await field("utilization").fill(".4");
|
| 88 |
+
await field("ron_area_mohm_mm2").fill("2");
|
| 89 |
+
const areaReport = await exportJson("#export-technology");
|
| 90 |
+
near(areaReport.parameters.width_mm, 60.2);
|
| 91 |
+
near(areaReport.rows[0].device[0].width_mm, 7.525);
|
| 92 |
+
await field("utilization").fill("1.2");
|
| 93 |
+
await analysis.locator("#design-error").filter({ hasText: /usable transistor fraction/ }).waitFor();
|
| 94 |
+
await field("utilization").fill(".4");
|
| 95 |
+
|
| 96 |
+
await open(4, "xfly2p");
|
| 97 |
+
assert.equal(await field("fs_mhz").inputValue(), "11");
|
| 98 |
+
assert.equal(await field("width_mm").inputValue(), "350");
|
| 99 |
+
assert(await field("lm_uh").isVisible());
|
| 100 |
+
assert.equal(await analysis.locator("#tech-fs_mhz").inputValue(), "10");
|
| 101 |
+
await open(2, "sp2");
|
| 102 |
+
assert.equal(await field("fs_mhz").inputValue(), "4");
|
| 103 |
+
assert.equal(await field("budget_mode").inputValue(), "area");
|
| 104 |
+
assert.equal(await field("utilization").inputValue(), ".4");
|
| 105 |
+
assert.deepEqual(errors, []);
|
| 106 |
+
console.log("Chrome verified XFLY6S shortlist inputs, both sp2 silicon budget modes, technology export and per-topology settings.");
|
| 107 |
+
} finally {
|
| 108 |
+
await browser.close();
|
| 109 |
+
}
|
docs/topology/2to1_switching_capacitors/local_integration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Local sp2 integration
|
| 2 |
|
| 3 |
-
**Workflow.** On the local OpenPELS workbench, select **Gallery → 2:1 → 2:1 series-parallel SC**. Analysis shows delivered-voltage efficiency, the existing exact periodic-RC loss model and equal area allocation under a fixed total width.
|
| 4 |
|
| 5 |
## Simulation domain
|
| 6 |
|
|
|
|
| 1 |
# Local sp2 integration
|
| 2 |
|
| 3 |
+
**Workflow.** On the local OpenPELS workbench, select **Gallery → 2:1 → 2:1 series-parallel SC**. Analysis shows delivered-voltage efficiency, the existing exact periodic-RC loss model and equal area allocation under a fixed total width. Design Constraints accepts width or die area, frequency, capacitance and ESR. The 180 nm device panel accepts gate-drive inputs and optional effective Coss energy. [Analysis controls](analysis_constraints.md) **Edit schematic** opens the eight-device native starter. **Simulate** runs the integrated NGSpice preset and keeps the 2:1 identity when returning to Analysis.
|
| 4 |
|
| 5 |
## Simulation domain
|
| 6 |
|
docs/topology/minjie_confirmation_list.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
| 12 |
|
| 13 |
## Local implementation review
|
| 14 |
|
|
|
|
|
|
|
| 15 |
- The 2:1 entry reuses the existing analytical equations and area allocation. The Analysis efficiency estimate uses delivered output after modeled droop. Optional Coss energy remains a distinctly identified model input.
|
| 16 |
- The simulator uses the existing asynchronous job API. It supports the validated 3 V constant-current-load fixtures and one-variable sweeps in frequency, capacitance, ESR, Ron and load current. The three pinned 4:1 models and their sweep path remain independent. See the [local integration record](2to1_switching_capacitors/local_integration.md).
|
| 17 |
|
|
|
|
| 12 |
|
| 13 |
## Local implementation review
|
| 14 |
|
| 15 |
+
- The sp2 Analysis screen now exposes its resource inputs through Design Constraints. Both silicon modes use the existing budget conversion, and advanced gate and Coss inputs remain in the device panel. The coupled-inductor shortlist and loss equations keep their current scope. [Analysis audit](2to1_switching_capacitors/analysis_constraints.md)
|
| 16 |
+
|
| 17 |
- The 2:1 entry reuses the existing analytical equations and area allocation. The Analysis efficiency estimate uses delivered output after modeled droop. Optional Coss energy remains a distinctly identified model input.
|
| 18 |
- The simulator uses the existing asynchronous job API. It supports the validated 3 V constant-current-load fixtures and one-variable sweeps in frequency, capacitance, ESR, Ron and load current. The three pinned 4:1 models and their sweep path remain independent. See the [local integration record](2to1_switching_capacitors/local_integration.md).
|
| 19 |
|
static/compare/app.js
CHANGED
|
@@ -80,11 +80,11 @@ $('#upload-status').textContent=d.configured?'Review required before using the r
|
|
| 80 |
const techFields=[['fs_mhz','fs (MHz)',10],['vgs','VGS (V)',3.3],['width_mm','Total FET width (mm)',360],['cap_uf','Flying + clamp budget (μF)',4],['rc_mohm','Main-cap ESR (mΩ)',20],['rl_mohm','Winding ESR (mΩ)',38],['events','Gate charges / period',1],['eoss_pj','Effective Eoss (pJ/mm/cycle)','']];
|
| 81 |
$('#tech-settings').innerHTML=techFields.map(([k,label,v])=>`<label>${label}<input id="tech-${k}" type="number" value="${v}" min="0" step="any" placeholder="unknown"></label>`).join('');
|
| 82 |
let technologyReport;
|
| 83 |
-
function renderTechnology(){if(!report)return;try{const p=Object.fromEntries(techFields.filter(([k])=>k!=='eoss_pj'||$('#tech-'+k).value.trim()!=='').map(([k])=>[k,Number($('#tech-'+k).value)]));const point=OpenPELSRecommendation.operatingPoint(
|
| 84 |
$('#technology-status').textContent=`Rs = ${fmt(t.rs*1e3)} mΩ · RΣ = ${fmt(t.parallel*1e3)} mΩ · gate demand = ${fmt(t.gate_power*1e3)} mW · physical example is separate from the per-unit weights above`;
|
| 85 |
$('#technology-results').innerHTML=`<table><caption>Fixed-width example: flat-current buck models; exact linear periodic RC for SP-SC. Not measured efficiency.</caption><thead><tr><th>Topology</th><th>CF each (μF)</th><th>RFET (mΩ)</th><th>RCAP (mΩ)</th><th>RIND (mΩ)</th><th>RHC,add (mΩ)</th><th>Req (mΩ)</th><th>Rg at Vx (Ω)</th><th>Ross at Vx (Ω)</th><th>Iout²Req + Pg + known Poss (mW)</th></tr></thead><tbody>${t.rows.map(r=>r.valid?`<tr><th>${esc(report.rows.find(a=>a.id===r.id).short)}</th><td>${r.cf?unit(r.cf,1e6):'—'}</td>${['fet','cap','ind','hc','req'].map(k=>`<td>${unit(r[k],1e3)}</td>`).join('')}<td>${unit(r.gate_r)}</td><td>${unit(r.oss_r)}</td><td>${unit(r.partial_loss,1e3)}${r.poss===null?' + unknown Coss':''}</td></tr>`:`<tr><th>${esc(r.id)}</th><td colspan="9">Outside the supported analytical model</td></tr>`).join('')}</tbody></table>`;
|
| 86 |
if(typeof renderSp2Efficiency==='function')renderSp2Efficiency(t);
|
| 87 |
-
}catch(e){technologyReport=null;$('#technology-status').textContent=e.message;$('#technology-results').innerHTML='';if(typeof renderSp2Efficiency==='function')renderSp2Efficiency(null)}}
|
| 88 |
$('#apply-technology').onclick=renderTechnology;$('#export-technology').onclick=()=>{if(technologyReport)download('openpels-180nm-example.json',JSON.stringify({...technologyReport,source:'User-supplied XFLY_Power_Analysis.md; not independently verified foundry data',method:'Paper FSL/SSL interpolation; separate gate demand; Qoss does not establish Eoss'},(k,v)=>typeof v==='number'&&!Number.isFinite(v)?String(v):v,2),'application/json')};
|
| 89 |
(function rcChart(){const w=600,h=210,x=a=>45+(Math.log10(a)+2)/4*530,y=v=>175-(Math.log10(v)+.3)/3*155,points=fn=>Array.from({length:161},(_,i)=>{const a=10**(-2+i/40);return `${x(a)},${y(fn(a))}`}).join(' ');$('#rc-limit-chart').innerHTML=`<svg viewBox="0 0 ${w} ${h}" role="img" aria-label="Finite RC event resistance and its SSL and FSL limits on log axes"><defs><clipPath id="rc-plot-clip"><rect x="45" y="15" width="530" height="160"/></clipPath></defs><rect width="600" height="210" fill="white"/><path d="M45 15V175H575" fill="none" stroke="#a6b6aa"/><g clip-path="url(#rc-plot-clip)"><polyline points="${points(a=>1/Math.tanh(a/2))}" fill="none" stroke="#157e70" stroke-width="2"/><polyline points="${points(a=>2/a)}" fill="none" stroke="#5c70b8" stroke-dasharray="5 4"/><polyline points="${points(()=>1)}" fill="none" stroke="#cf7b30" stroke-dasharray="5 4"/></g><g font-family="Arial" font-size="10" fill="#526b5e"><text x="65" y="18">Revent / RSSL · log axis</text><text x="340" y="18">green: finite RC · blue: FSL · orange: SSL</text>${[.01,.1,1,10,100].map(a=>`<text x="${x(a)}" y="190" text-anchor="middle">${a}</text>`).join('')}${[1,10,100].map(v=>`<text x="36" y="${y(v)+3}" text-anchor="end">${v}</text>`).join('')}<text x="310" y="207" text-anchor="middle">d / (fs Rpath C) · log axis</text></g></svg>`})();
|
| 90 |
const designFields=[
|
|
@@ -137,7 +137,7 @@ const candidatePanel=r=>{
|
|
| 137 |
$('#shortlist-results').innerHTML=`${t.eligible.length?`<div class="comparison-switch" aria-label="Comparison view"><button data-comparison-view="scoreboard">Loss scoreboard</button><button data-comparison-view="circuits">Circuit cards</button></div><div id="loss-scoreboard-view">${lossScoreboard(t)}</div>`:''}<div id="candidate-cards-view"><p class="candidate-legend">R<sub>S</sub>: unit-area MOSFET on-resistance · R<sub>C</sub>: main-capacitor ESR · R<sub>L</sub>: winding resistance. Device multipliers follow each topology’s die allocation; clamp ESR is zero in the clamp-cell model. Gate-control annotations are omitted from these previews.</p><div class="candidate-grid">${t.eligible.map(candidatePanel).join('')||'<p class="no-candidates">No candidate satisfies all currently modeled screens.</p>'}</div></div><details class="excluded-list"><summary>Cancellation-point candidates failing constraints (${t.rows.length-t.eligible.length})</summary><div class="candidate-grid">${t.rows.filter(r=>r.status==='excluded').map(candidatePanel).join('')}</div>${t.rows.filter(r=>r.status==='unmodeled').map(candidatePanel).join('')}</details>`;
|
| 138 |
if(t.eligible.length){setComparisonView(comparisonView);$$('[data-comparison-view]').forEach(b=>b.onclick=()=>setComparisonView(b.dataset.comparisonView))}$$('[data-inspect-design]').forEach(b=>b.onclick=()=>inspectRecommendation(b.dataset.inspectDesign));renderTechnology();
|
| 139 |
}catch(e){recommendationReport=null;$('#design-error').textContent=e.message;$('#candidate-status').textContent='Check the design inputs to calculate the candidates.';$('#shortlist-results').innerHTML=''}}
|
| 140 |
-
$('#design-fields').addEventListener('input',()=>{updateLoadSummary();$('#design-error').textContent='Inputs changed — update the recommendation.';$('#recommend-design').textContent='Update candidates';$('#export-recommendation').disabled=true;$$('[data-inspect-design]').forEach(b=>b.disabled=true)});$('#recommend-design').onclick=renderRecommendation;$('#export-recommendation').onclick=()=>{if(recommendationReport)download('openpels-design-shortlist.json',JSON.stringify(recommendationReport,null,2),'application/json')};
|
| 141 |
let resizeTimer;window.addEventListener('resize',()=>{clearTimeout(resizeTimer);resizeTimer=setTimeout(()=>{if($('#sweep-section').open)drawSweep()},200)});
|
| 142 |
(async()=>{try{catalog=await api('/api/catalog');selected=new Set(OpenPELSRecommendation.familyIds(ratio));picker();await update();announceAnalysisReady()}catch(e){toast(e.message)}})();
|
| 143 |
|
|
@@ -158,15 +158,16 @@ function focusRecommendation(result) {
|
|
| 158 |
function isSwitchedCapReference() {
|
| 159 |
return focusedTopology === "sp2" && ratio === 2;
|
| 160 |
}
|
| 161 |
-
function renderSp2Efficiency(technology) {
|
| 162 |
if (!isSwitchedCapReference()) return;
|
|
|
|
| 163 |
const row = technology?.rows.find((item) => item.id === "sp2");
|
| 164 |
const host = document.querySelector("#shortlist-results");
|
| 165 |
host.replaceChildren();
|
| 166 |
const summary = document.createElement("p");
|
| 167 |
summary.id = "sp2-efficiency";
|
| 168 |
if (!row?.valid || !(row.vo > 0)) {
|
| 169 |
-
summary.textContent = "This operating point has no positive delivered-voltage estimate. Check the technology inputs and load.";
|
| 170 |
} else {
|
| 171 |
const power = row.vo * technology.parameters.io;
|
| 172 |
row.delivered_w = power;
|
|
@@ -174,22 +175,47 @@ function renderSp2Efficiency(technology) {
|
|
| 174 |
row.efficiency_includes_coss = row.poss !== null;
|
| 175 |
summary.textContent = `Modeled efficiency: ${(100 * row.efficiency).toFixed(2)}% · delivered output ${row.vo.toFixed(4)} V / ${power.toFixed(4)} W · modeled loss ${(1000 * row.partial_loss).toFixed(2)} mW.`;
|
| 176 |
const scope = document.createElement("p");
|
| 177 |
-
scope.textContent = `
|
| 178 |
host.append(summary, scope);
|
| 179 |
return;
|
| 180 |
}
|
| 181 |
host.append(summary);
|
| 182 |
}
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
if (entering === isSwitchedCapReference()) return;
|
| 187 |
-
const fields = Object.keys(
|
| 188 |
-
const current = Object.fromEntries(fields.map((
|
| 189 |
-
const next = entering ?
|
| 190 |
-
if (entering)
|
| 191 |
-
else
|
| 192 |
-
for (const
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
}
|
| 194 |
function reportOperatingPoint() {
|
| 195 |
if (!focusedTopology) return;
|
|
@@ -218,7 +244,7 @@ window.addEventListener("message", (event) => {
|
|
| 218 |
)
|
| 219 |
return;
|
| 220 |
if (!catalog.some((entry) => entry.id === next.id)) return;
|
| 221 |
-
|
| 222 |
document.body.classList.toggle("sp2-focused", next.id === "sp2");
|
| 223 |
ratio = next.ratio;
|
| 224 |
focusedTopology = next.id;
|
|
@@ -243,10 +269,7 @@ document
|
|
| 243 |
.querySelector("#design-fields")
|
| 244 |
.addEventListener("input", () => {
|
| 245 |
reportOperatingPoint();
|
| 246 |
-
if (isSwitchedCapReference())
|
| 247 |
-
document.querySelector("#design-error").textContent = "";
|
| 248 |
-
renderTechnology();
|
| 249 |
-
}
|
| 250 |
});
|
| 251 |
function announceAnalysisReady() {
|
| 252 |
parent.postMessage({ type: "pe:analysis-ready" }, location.origin);
|
|
|
|
| 80 |
const techFields=[['fs_mhz','fs (MHz)',10],['vgs','VGS (V)',3.3],['width_mm','Total FET width (mm)',360],['cap_uf','Flying + clamp budget (μF)',4],['rc_mohm','Main-cap ESR (mΩ)',20],['rl_mohm','Winding ESR (mΩ)',38],['events','Gate charges / period',1],['eoss_pj','Effective Eoss (pJ/mm/cycle)','']];
|
| 81 |
$('#tech-settings').innerHTML=techFields.map(([k,label,v])=>`<label>${label}<input id="tech-${k}" type="number" value="${v}" min="0" step="any" placeholder="unknown"></label>`).join('');
|
| 82 |
let technologyReport;
|
| 83 |
+
function renderTechnology(){if(!report)return;try{const p=Object.fromEntries(techFields.filter(([k])=>k!=='eoss_pj'||$('#tech-'+k).value.trim()!=='').map(([k])=>[k,Number($('#tech-'+k).value)]));const design=designParameters();const point=OpenPELSRecommendation.operatingPoint(design);p.vin=point.parameters.vin;p.io=point.output_current;if(typeof isSwitchedCapReference==='function'&&isSwitchedCapReference())Object.assign(p,sp2ResourceParameters(design));technologyReport=OpenPELSTechnology.example(report.rows,p);const t=technologyReport,unit=(v,scale=1)=>v==null?'unknown':!Number.isFinite(v)?'∞':fmt(v*scale);
|
| 84 |
$('#technology-status').textContent=`Rs = ${fmt(t.rs*1e3)} mΩ · RΣ = ${fmt(t.parallel*1e3)} mΩ · gate demand = ${fmt(t.gate_power*1e3)} mW · physical example is separate from the per-unit weights above`;
|
| 85 |
$('#technology-results').innerHTML=`<table><caption>Fixed-width example: flat-current buck models; exact linear periodic RC for SP-SC. Not measured efficiency.</caption><thead><tr><th>Topology</th><th>CF each (μF)</th><th>RFET (mΩ)</th><th>RCAP (mΩ)</th><th>RIND (mΩ)</th><th>RHC,add (mΩ)</th><th>Req (mΩ)</th><th>Rg at Vx (Ω)</th><th>Ross at Vx (Ω)</th><th>Iout²Req + Pg + known Poss (mW)</th></tr></thead><tbody>${t.rows.map(r=>r.valid?`<tr><th>${esc(report.rows.find(a=>a.id===r.id).short)}</th><td>${r.cf?unit(r.cf,1e6):'—'}</td>${['fet','cap','ind','hc','req'].map(k=>`<td>${unit(r[k],1e3)}</td>`).join('')}<td>${unit(r.gate_r)}</td><td>${unit(r.oss_r)}</td><td>${unit(r.partial_loss,1e3)}${r.poss===null?' + unknown Coss':''}</td></tr>`:`<tr><th>${esc(r.id)}</th><td colspan="9">Outside the supported analytical model</td></tr>`).join('')}</tbody></table>`;
|
| 86 |
if(typeof renderSp2Efficiency==='function')renderSp2Efficiency(t);
|
| 87 |
+
}catch(e){technologyReport=null;$('#technology-status').textContent=e.message;$('#technology-results').innerHTML='';if(typeof renderSp2Efficiency==='function')renderSp2Efficiency(null,e.message)}}
|
| 88 |
$('#apply-technology').onclick=renderTechnology;$('#export-technology').onclick=()=>{if(technologyReport)download('openpels-180nm-example.json',JSON.stringify({...technologyReport,source:'User-supplied XFLY_Power_Analysis.md; not independently verified foundry data',method:'Paper FSL/SSL interpolation; separate gate demand; Qoss does not establish Eoss'},(k,v)=>typeof v==='number'&&!Number.isFinite(v)?String(v):v,2),'application/json')};
|
| 89 |
(function rcChart(){const w=600,h=210,x=a=>45+(Math.log10(a)+2)/4*530,y=v=>175-(Math.log10(v)+.3)/3*155,points=fn=>Array.from({length:161},(_,i)=>{const a=10**(-2+i/40);return `${x(a)},${y(fn(a))}`}).join(' ');$('#rc-limit-chart').innerHTML=`<svg viewBox="0 0 ${w} ${h}" role="img" aria-label="Finite RC event resistance and its SSL and FSL limits on log axes"><defs><clipPath id="rc-plot-clip"><rect x="45" y="15" width="530" height="160"/></clipPath></defs><rect width="600" height="210" fill="white"/><path d="M45 15V175H575" fill="none" stroke="#a6b6aa"/><g clip-path="url(#rc-plot-clip)"><polyline points="${points(a=>1/Math.tanh(a/2))}" fill="none" stroke="#157e70" stroke-width="2"/><polyline points="${points(a=>2/a)}" fill="none" stroke="#5c70b8" stroke-dasharray="5 4"/><polyline points="${points(()=>1)}" fill="none" stroke="#cf7b30" stroke-dasharray="5 4"/></g><g font-family="Arial" font-size="10" fill="#526b5e"><text x="65" y="18">Revent / RSSL · log axis</text><text x="340" y="18">green: finite RC · blue: FSL · orange: SSL</text>${[.01,.1,1,10,100].map(a=>`<text x="${x(a)}" y="190" text-anchor="middle">${a}</text>`).join('')}${[1,10,100].map(v=>`<text x="36" y="${y(v)+3}" text-anchor="end">${v}</text>`).join('')}<text x="310" y="207" text-anchor="middle">d / (fs Rpath C) · log axis</text></g></svg>`})();
|
| 90 |
const designFields=[
|
|
|
|
| 137 |
$('#shortlist-results').innerHTML=`${t.eligible.length?`<div class="comparison-switch" aria-label="Comparison view"><button data-comparison-view="scoreboard">Loss scoreboard</button><button data-comparison-view="circuits">Circuit cards</button></div><div id="loss-scoreboard-view">${lossScoreboard(t)}</div>`:''}<div id="candidate-cards-view"><p class="candidate-legend">R<sub>S</sub>: unit-area MOSFET on-resistance · R<sub>C</sub>: main-capacitor ESR · R<sub>L</sub>: winding resistance. Device multipliers follow each topology’s die allocation; clamp ESR is zero in the clamp-cell model. Gate-control annotations are omitted from these previews.</p><div class="candidate-grid">${t.eligible.map(candidatePanel).join('')||'<p class="no-candidates">No candidate satisfies all currently modeled screens.</p>'}</div></div><details class="excluded-list"><summary>Cancellation-point candidates failing constraints (${t.rows.length-t.eligible.length})</summary><div class="candidate-grid">${t.rows.filter(r=>r.status==='excluded').map(candidatePanel).join('')}</div>${t.rows.filter(r=>r.status==='unmodeled').map(candidatePanel).join('')}</details>`;
|
| 138 |
if(t.eligible.length){setComparisonView(comparisonView);$$('[data-comparison-view]').forEach(b=>b.onclick=()=>setComparisonView(b.dataset.comparisonView))}$$('[data-inspect-design]').forEach(b=>b.onclick=()=>inspectRecommendation(b.dataset.inspectDesign));renderTechnology();
|
| 139 |
}catch(e){recommendationReport=null;$('#design-error').textContent=e.message;$('#candidate-status').textContent='Check the design inputs to calculate the candidates.';$('#shortlist-results').innerHTML=''}}
|
| 140 |
+
$('#design-fields').addEventListener('input',()=>{updateLoadSummary();if(document.body.classList.contains('sp2-focused'))return;$('#design-error').textContent='Inputs changed — update the recommendation.';$('#recommend-design').textContent='Update candidates';$('#export-recommendation').disabled=true;$$('[data-inspect-design]').forEach(b=>b.disabled=true)});$('#recommend-design').onclick=renderRecommendation;$('#export-recommendation').onclick=()=>{if(recommendationReport)download('openpels-design-shortlist.json',JSON.stringify(recommendationReport,null,2),'application/json')};
|
| 141 |
let resizeTimer;window.addEventListener('resize',()=>{clearTimeout(resizeTimer);resizeTimer=setTimeout(()=>{if($('#sweep-section').open)drawSweep()},200)});
|
| 142 |
(async()=>{try{catalog=await api('/api/catalog');selected=new Set(OpenPELSRecommendation.familyIds(ratio));picker();await update();announceAnalysisReady()}catch(e){toast(e.message)}})();
|
| 143 |
|
|
|
|
| 158 |
function isSwitchedCapReference() {
|
| 159 |
return focusedTopology === "sp2" && ratio === 2;
|
| 160 |
}
|
| 161 |
+
function renderSp2Efficiency(technology, error = "") {
|
| 162 |
if (!isSwitchedCapReference()) return;
|
| 163 |
+
document.querySelector("#design-error").textContent = error;
|
| 164 |
const row = technology?.rows.find((item) => item.id === "sp2");
|
| 165 |
const host = document.querySelector("#shortlist-results");
|
| 166 |
host.replaceChildren();
|
| 167 |
const summary = document.createElement("p");
|
| 168 |
summary.id = "sp2-efficiency";
|
| 169 |
if (!row?.valid || !(row.vo > 0)) {
|
| 170 |
+
summary.textContent = "This operating point has no positive delivered-voltage estimate. Check the design constraints, technology inputs and load.";
|
| 171 |
} else {
|
| 172 |
const power = row.vo * technology.parameters.io;
|
| 173 |
row.delivered_w = power;
|
|
|
|
| 175 |
row.efficiency_includes_coss = row.poss !== null;
|
| 176 |
summary.textContent = `Modeled efficiency: ${(100 * row.efficiency).toFixed(2)}% · delivered output ${row.vo.toFixed(4)} V / ${power.toFixed(4)} W · modeled loss ${(1000 * row.partial_loss).toFixed(2)} mW.`;
|
| 177 |
const scope = document.createElement("p");
|
| 178 |
+
scope.textContent = `The estimate uses the full silicon budget. Each of eight devices gets 12.5% of that budget (${row.device[0].width_mm.toFixed(3)} mm in this example). The estimate includes modeled gate energy. ${row.efficiency_includes_coss ? "It includes the entered Coss energy." : "Coss energy is unknown and is excluded from this estimate."}`;
|
| 179 |
host.append(summary, scope);
|
| 180 |
return;
|
| 181 |
}
|
| 182 |
host.append(summary);
|
| 183 |
}
|
| 184 |
+
function sp2ResourceParameters(design) {
|
| 185 |
+
if (design.budget_mode === "area" &&
|
| 186 |
+
!(design.die_mm2 > 0 && design.utilization > 0 && design.utilization <= 1 &&
|
| 187 |
+
design.ron_area_mohm_mm2 > 0)) {
|
| 188 |
+
throw new Error("Enter positive die area and Ron × area, and a usable transistor fraction greater than 0 and at most 1.");
|
| 189 |
+
}
|
| 190 |
+
return {
|
| 191 |
+
fs_mhz: design.fs_mhz,
|
| 192 |
+
width_mm: OpenPELSRecommendation.availableWidth(design, OpenPELSTechnology),
|
| 193 |
+
cap_uf: design.cap_uf,
|
| 194 |
+
rc_mohm: design.rc_mohm,
|
| 195 |
+
rl_mohm: 0,
|
| 196 |
+
};
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
let sp2Profile = {
|
| 200 |
+
"design-fs_mhz": 2, "design-budget_mode": "width", "design-width_mm": 80.2666667,
|
| 201 |
+
"design-die_mm2": 1, "design-utilization": .5, "design-ron_area_mohm_mm2": 1,
|
| 202 |
+
"design-cap_uf": 2, "design-rc_mohm": 20,
|
| 203 |
+
"tech-vgs": 3.3, "tech-events": 1, "tech-eoss_pj": "",
|
| 204 |
+
};
|
| 205 |
+
let otherProfile = null;
|
| 206 |
+
const defaultInputScope = document.querySelector(".input-scope").textContent;
|
| 207 |
+
function switchAnalysisScope(entering) {
|
| 208 |
if (entering === isSwitchedCapReference()) return;
|
| 209 |
+
const fields = Object.keys(sp2Profile).map((id) => document.getElementById(id));
|
| 210 |
+
const current = Object.fromEntries(fields.map((field) => [field.id, field.value]));
|
| 211 |
+
const next = entering ? sp2Profile : otherProfile;
|
| 212 |
+
if (entering) otherProfile = current;
|
| 213 |
+
else sp2Profile = current;
|
| 214 |
+
for (const field of fields) field.value = next[field.id];
|
| 215 |
+
showBudgetFields();
|
| 216 |
+
document.querySelector(".input-scope").textContent = entering
|
| 217 |
+
? "The loss estimate uses the full silicon budget with equal device allocation. Capacitance is split between the two flying capacitors. Gate and optional Coss inputs are in the 180 nm device panel."
|
| 218 |
+
: defaultInputScope;
|
| 219 |
}
|
| 220 |
function reportOperatingPoint() {
|
| 221 |
if (!focusedTopology) return;
|
|
|
|
| 244 |
)
|
| 245 |
return;
|
| 246 |
if (!catalog.some((entry) => entry.id === next.id)) return;
|
| 247 |
+
switchAnalysisScope(next.id === "sp2");
|
| 248 |
document.body.classList.toggle("sp2-focused", next.id === "sp2");
|
| 249 |
ratio = next.ratio;
|
| 250 |
focusedTopology = next.id;
|
|
|
|
| 269 |
.querySelector("#design-fields")
|
| 270 |
.addEventListener("input", () => {
|
| 271 |
reportOperatingPoint();
|
| 272 |
+
if (isSwitchedCapReference()) renderTechnology();
|
|
|
|
|
|
|
|
|
|
| 273 |
});
|
| 274 |
function announceAnalysisReady() {
|
| 275 |
parent.postMessage({ type: "pe:analysis-ready" }, location.origin);
|
static/compare/recommend.js
CHANGED
|
@@ -9,8 +9,13 @@ function ripplePoint(id,p){const ldm=p.lk_nh*1e-9+2*p.lm_uh*1e-6;if(id==='3lbuck
|
|
| 9 |
|
| 10 |
const defaults={ratio:4,vin:3.3,vout:null,voltage_mode:'input_output',load_mode:'current',io:2,pout_w:1.65,fs_mhz:10,vgs:3.3,budget_mode:'area',width_mm:360,die_mm2:1,utilization:.5,ron_area_mohm_mm2:1,cap_uf:4,max_caps:4,max_windings:2,rc_mohm:20,rl_mohm:38,max_drop_percent:10,lk_nh:50,lm_uh:1,max_phase_ripple_percent:5,objective:'loss'};
|
| 11 |
function operatingPoint(input){const p={...defaults,...input};if(!['input_output','output_ratio'].includes(p.voltage_mode))throw Error('Choose a valid voltage-input mode');if(p.vout==null)p.vout=p.vin/p.ratio;if(p.voltage_mode==='output_ratio')p.vin=p.ratio*p.vout;for(const k of ['vin','vout','ratio'])if(!Number.isFinite(p[k])||p[k]<=0)throw Error(k+' must be positive');if(!['current','power'].includes(p.load_mode))throw Error('Choose current or power as the output-load input');if(p.load_mode==='power'){if(!Number.isFinite(p.pout_w)||p.pout_w<=0)throw Error('Output load power must be positive');p.io=p.pout_w/p.vout}if(!Number.isFinite(p.io)||p.io<=0)throw Error('Output load current must be positive');p.pout_w=p.vout*p.io;const nominal=p.vin/p.ratio;return {parameters:p,requested_vout:p.vout,output_current:p.io,output_power:p.pout_w,load_resistance:p.vout/p.io,nominal_vout:nominal,requested_ratio:p.vin/p.vout,voltage_ratio_match:Math.abs(p.vout-nominal)<=1e-6*Math.max(p.vout,nominal)}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
function recommend(input,data,engine,technology){const op=operatingPoint(input),p=op.parameters;for(const k of ['ratio','vin','io','fs_mhz','vgs','width_mm','die_mm2','lk_nh','lm_uh'])if(!Number.isFinite(p[k])||p[k]<=0)throw Error(k+' must be positive');for(const k of ['cap_uf','max_caps','max_windings','rc_mohm','rl_mohm','max_drop_percent','max_phase_ripple_percent'])if(!Number.isFinite(p[k])||p[k]<0)throw Error(k+' must be nonnegative');if(![2,4,6,8,16].includes(p.ratio))throw Error('Choose a supported ratio');if(!['width','area'].includes(p.budget_mode)||!['loss','capacitors','magnetics'].includes(p.objective))throw Error('Choose a budget mode and objective');if(!Number.isInteger(p.max_caps)||!Number.isInteger(p.max_windings))throw Error('Component limits must be integers');if(!Number.isFinite(p.utilization)||p.utilization<=0||p.utilization>1)throw Error('Usable die fraction must be in (0,1]');
|
| 13 |
-
const calibrated=p.budget_mode==='width'||Number.isFinite(p.ron_area_mohm_mm2)&&p.ron_area_mohm_mm2>0,Wmax=
|
| 14 |
if(calibrated&&(!Number.isFinite(Wmax)||Wmax<=0))throw Error('Invalid area/width budget');
|
| 15 |
const rows=data.catalog.filter(c=>familyIds(p.ratio).includes(c.id)).map(c=>{const s=specs[c.id],r={id:c.id,name:c.name,short:c.short,native_ratio:p.ratio,reference_match:true,asset:c.asset,allocation_reference_ratio:['buck2','sp2'].includes(c.id)?2:4,status:'excluded',reasons:[]};if(!s){r.status='unmodeled';r.reasons=['No verified loss model for recommendation'];return r}Object.assign(r,{capacitors:s.caps,windings:s.windings,magnetics:s.magnetics},ripplePoint(c.id,p));if(r.phase_ripple_percent>=200)r.reasons.push('Predicted phase-current ripple leaves the assumed CCM region');if(r.phase_ripple_percent>p.max_phase_ripple_percent)r.reasons.push('Predicted phase ripple exceeds '+p.max_phase_ripple_percent+'% of average phase current');if(!engine.valid(c.id,m))r.reasons.push(c.id==='sp2'?'Fixed 2:1 conversion only':'Outside the verified duty range');if(s.windings>p.max_windings)r.reasons.push('Requires '+s.windings+' power windings; limit is '+p.max_windings);if(s.caps>p.max_caps)r.reasons.push('Requires '+s.caps+' flying/clamp capacitors; limit is '+p.max_caps);if(s.caps&&p.cap_uf<=0)r.reasons.push('A positive flying/clamp capacitor budget is required');if(!calibrated)r.reasons.push('Enter positive Ron × area (mΩ·mm²)');if(r.reasons.length)return r;
|
| 16 |
if(!op.voltage_ratio_match)r.reasons.push('Requested Vout does not match Vin/'+p.ratio+' at the cancellation point');if(r.reasons.length)return r;
|
|
@@ -23,5 +28,5 @@ let lo=Math.log(grid[Math.max(0,bestIndex-1)]),hi=Math.log(grid[Math.min(64,best
|
|
| 23 |
if(best.drop_percent>p.max_drop_percent){const full=at(Wmax);if(full.drop_percent<=p.max_drop_percent){let a=best.width_mm,b=Wmax;for(let i=0;i<60;i++){const mid=(a+b)/2;if(at(mid).drop_percent>p.max_drop_percent)a=mid;else b=mid}best=at(b)}else r.reasons.push('Estimated open-loop droop exceeds '+p.max_drop_percent+'% even at full FET budget')}
|
| 24 |
Object.assign(r,best,{used_die_mm2:p.budget_mode==='area'?best.width_mm*p.ron_area_mohm_mm2*1e-3/technology.reference.ron:null,available_width_mm:Wmax,reference_note:'Nominal coupled-inductor cancellation point at '+p.ratio+':1; loss allocation remains fixed at '+(['buck2','sp2'].includes(c.id)?2:4)+':1'});r.status=r.reasons.length?'excluded':'eligible';return r});
|
| 25 |
const eligible=rows.filter(r=>r.status==='eligible');eligible.sort((a,b)=>{if(p.objective==='capacitors'&&a.capacitors!==b.capacitors)return a.capacitors-b.capacitors;if(p.objective==='magnetics'&&a.windings!==b.windings)return a.windings-b.windings;return a.loss-b.loss});eligible.forEach((r,i)=>r.rank=i+1);return {parameters:p,available_width_mm:Wmax,rs_budget:calibrated?technology.reference.ron*12/Wmax:null,calibrated,requested_vout:op.requested_vout,output_current:op.output_current,output_power:op.output_power,load_resistance:op.load_resistance,requested_ratio:op.requested_ratio,voltage_ratio_match:op.voltage_ratio_match,nominal_vout:vo,eligible,rows,winner:eligible[0]??null,native_models:rows.filter(r=>r.reference_match).length,scope:'Coupled-inductor cancellation-point shortlist only. First-order phase ripple is screened with Ldm=Lk+2Lm, balanced complementary 50% effective excitation or the ideal 3L 2:1 midpoint-hold state. Finite capacitor ripple, mismatch, losses and timing errors can break ideal cancellation. Loss ranking remains flat-current FSL/SSL plus gate drive; Coss, ripple-loss corrections, core loss, saturation, layout, startup and control/headroom are not qualified. Fixed per-device allocations; total width optimized. One gate-charge event per device per period assumed. Budgets cover power FETs, flying/clamp capacitors and power windings; drivers/Cin/Cout are outside these budgets.'};}
|
| 26 |
-
const api={recommend,specs,defaults,excitation,familyIds,referenceFamilyIds,ripplePoint,operatingPoint};root.OpenPELSRecommendation=api;if(typeof module!=='undefined')module.exports=api;
|
| 27 |
})(typeof window!=='undefined'?window:globalThis);
|
|
|
|
| 9 |
|
| 10 |
const defaults={ratio:4,vin:3.3,vout:null,voltage_mode:'input_output',load_mode:'current',io:2,pout_w:1.65,fs_mhz:10,vgs:3.3,budget_mode:'area',width_mm:360,die_mm2:1,utilization:.5,ron_area_mohm_mm2:1,cap_uf:4,max_caps:4,max_windings:2,rc_mohm:20,rl_mohm:38,max_drop_percent:10,lk_nh:50,lm_uh:1,max_phase_ripple_percent:5,objective:'loss'};
|
| 11 |
function operatingPoint(input){const p={...defaults,...input};if(!['input_output','output_ratio'].includes(p.voltage_mode))throw Error('Choose a valid voltage-input mode');if(p.vout==null)p.vout=p.vin/p.ratio;if(p.voltage_mode==='output_ratio')p.vin=p.ratio*p.vout;for(const k of ['vin','vout','ratio'])if(!Number.isFinite(p[k])||p[k]<=0)throw Error(k+' must be positive');if(!['current','power'].includes(p.load_mode))throw Error('Choose current or power as the output-load input');if(p.load_mode==='power'){if(!Number.isFinite(p.pout_w)||p.pout_w<=0)throw Error('Output load power must be positive');p.io=p.pout_w/p.vout}if(!Number.isFinite(p.io)||p.io<=0)throw Error('Output load current must be positive');p.pout_w=p.vout*p.io;const nominal=p.vin/p.ratio;return {parameters:p,requested_vout:p.vout,output_current:p.io,output_power:p.pout_w,load_resistance:p.vout/p.io,nominal_vout:nominal,requested_ratio:p.vin/p.vout,voltage_ratio_match:Math.abs(p.vout-nominal)<=1e-6*Math.max(p.vout,nominal)}}
|
| 12 |
+
function availableWidth(p,technology){
|
| 13 |
+
if(p.budget_mode==='width')return p.width_mm;
|
| 14 |
+
if(!Number.isFinite(p.ron_area_mohm_mm2)||p.ron_area_mohm_mm2<=0)return null;
|
| 15 |
+
return technology.reference.ron*p.die_mm2*p.utilization/(p.ron_area_mohm_mm2*1e-3);
|
| 16 |
+
}
|
| 17 |
function recommend(input,data,engine,technology){const op=operatingPoint(input),p=op.parameters;for(const k of ['ratio','vin','io','fs_mhz','vgs','width_mm','die_mm2','lk_nh','lm_uh'])if(!Number.isFinite(p[k])||p[k]<=0)throw Error(k+' must be positive');for(const k of ['cap_uf','max_caps','max_windings','rc_mohm','rl_mohm','max_drop_percent','max_phase_ripple_percent'])if(!Number.isFinite(p[k])||p[k]<0)throw Error(k+' must be nonnegative');if(![2,4,6,8,16].includes(p.ratio))throw Error('Choose a supported ratio');if(!['width','area'].includes(p.budget_mode)||!['loss','capacitors','magnetics'].includes(p.objective))throw Error('Choose a budget mode and objective');if(!Number.isInteger(p.max_caps)||!Number.isInteger(p.max_windings))throw Error('Component limits must be integers');if(!Number.isFinite(p.utilization)||p.utilization<=0||p.utilization>1)throw Error('Usable die fraction must be in (0,1]');
|
| 18 |
+
const calibrated=p.budget_mode==='width'||Number.isFinite(p.ron_area_mohm_mm2)&&p.ron_area_mohm_mm2>0,Wmax=availableWidth(p,technology),fs=p.fs_mhz*1e6,m=1/p.ratio,vo=p.vin*m;
|
| 19 |
if(calibrated&&(!Number.isFinite(Wmax)||Wmax<=0))throw Error('Invalid area/width budget');
|
| 20 |
const rows=data.catalog.filter(c=>familyIds(p.ratio).includes(c.id)).map(c=>{const s=specs[c.id],r={id:c.id,name:c.name,short:c.short,native_ratio:p.ratio,reference_match:true,asset:c.asset,allocation_reference_ratio:['buck2','sp2'].includes(c.id)?2:4,status:'excluded',reasons:[]};if(!s){r.status='unmodeled';r.reasons=['No verified loss model for recommendation'];return r}Object.assign(r,{capacitors:s.caps,windings:s.windings,magnetics:s.magnetics},ripplePoint(c.id,p));if(r.phase_ripple_percent>=200)r.reasons.push('Predicted phase-current ripple leaves the assumed CCM region');if(r.phase_ripple_percent>p.max_phase_ripple_percent)r.reasons.push('Predicted phase ripple exceeds '+p.max_phase_ripple_percent+'% of average phase current');if(!engine.valid(c.id,m))r.reasons.push(c.id==='sp2'?'Fixed 2:1 conversion only':'Outside the verified duty range');if(s.windings>p.max_windings)r.reasons.push('Requires '+s.windings+' power windings; limit is '+p.max_windings);if(s.caps>p.max_caps)r.reasons.push('Requires '+s.caps+' flying/clamp capacitors; limit is '+p.max_caps);if(s.caps&&p.cap_uf<=0)r.reasons.push('A positive flying/clamp capacitor budget is required');if(!calibrated)r.reasons.push('Enter positive Ron × area (mΩ·mm²)');if(r.reasons.length)return r;
|
| 21 |
if(!op.voltage_ratio_match)r.reasons.push('Requested Vout does not match Vin/'+p.ratio+' at the cancellation point');if(r.reasons.length)return r;
|
|
|
|
| 28 |
if(best.drop_percent>p.max_drop_percent){const full=at(Wmax);if(full.drop_percent<=p.max_drop_percent){let a=best.width_mm,b=Wmax;for(let i=0;i<60;i++){const mid=(a+b)/2;if(at(mid).drop_percent>p.max_drop_percent)a=mid;else b=mid}best=at(b)}else r.reasons.push('Estimated open-loop droop exceeds '+p.max_drop_percent+'% even at full FET budget')}
|
| 29 |
Object.assign(r,best,{used_die_mm2:p.budget_mode==='area'?best.width_mm*p.ron_area_mohm_mm2*1e-3/technology.reference.ron:null,available_width_mm:Wmax,reference_note:'Nominal coupled-inductor cancellation point at '+p.ratio+':1; loss allocation remains fixed at '+(['buck2','sp2'].includes(c.id)?2:4)+':1'});r.status=r.reasons.length?'excluded':'eligible';return r});
|
| 30 |
const eligible=rows.filter(r=>r.status==='eligible');eligible.sort((a,b)=>{if(p.objective==='capacitors'&&a.capacitors!==b.capacitors)return a.capacitors-b.capacitors;if(p.objective==='magnetics'&&a.windings!==b.windings)return a.windings-b.windings;return a.loss-b.loss});eligible.forEach((r,i)=>r.rank=i+1);return {parameters:p,available_width_mm:Wmax,rs_budget:calibrated?technology.reference.ron*12/Wmax:null,calibrated,requested_vout:op.requested_vout,output_current:op.output_current,output_power:op.output_power,load_resistance:op.load_resistance,requested_ratio:op.requested_ratio,voltage_ratio_match:op.voltage_ratio_match,nominal_vout:vo,eligible,rows,winner:eligible[0]??null,native_models:rows.filter(r=>r.reference_match).length,scope:'Coupled-inductor cancellation-point shortlist only. First-order phase ripple is screened with Ldm=Lk+2Lm, balanced complementary 50% effective excitation or the ideal 3L 2:1 midpoint-hold state. Finite capacitor ripple, mismatch, losses and timing errors can break ideal cancellation. Loss ranking remains flat-current FSL/SSL plus gate drive; Coss, ripple-loss corrections, core loss, saturation, layout, startup and control/headroom are not qualified. Fixed per-device allocations; total width optimized. One gate-charge event per device per period assumed. Budgets cover power FETs, flying/clamp capacitors and power windings; drivers/Cin/Cout are outside these budgets.'};}
|
| 31 |
+
const api={recommend,specs,defaults,excitation,familyIds,referenceFamilyIds,availableWidth,ripplePoint,operatingPoint};root.OpenPELSRecommendation=api;if(typeof module!=='undefined')module.exports=api;
|
| 32 |
})(typeof window!=='undefined'?window:globalThis);
|
static/compare/style.css
CHANGED
|
@@ -28,7 +28,8 @@ main{max-width:1560px;padding-top:32px}.intro{margin-bottom:26px}.intro p{font-s
|
|
| 28 |
|
| 29 |
.tradeoff-row .score-pro small,.tradeoff-row .score-con small{display:block;font-size:8px;color:#8c9984;margin:3px 0 0 11px}
|
| 30 |
|
| 31 |
-
.sp2-focused #design-fields [data-design-field]
|
|
|
|
| 32 |
.sp2-focused #recommend-design,.sp2-focused #export-recommendation{display:none}
|
| 33 |
|
| 34 |
/* Embedded OpenPELS comparison workspace. */
|
|
|
|
| 28 |
|
| 29 |
.tradeoff-row .score-pro small,.tradeoff-row .score-con small{display:block;font-size:8px;color:#8c9984;margin:3px 0 0 11px}
|
| 30 |
|
| 31 |
+
.sp2-focused #design-fields :is([data-design-field="max_caps"],[data-design-field="max_windings"],[data-design-field="rl_mohm"],[data-design-field="lk_nh"],[data-design-field="lm_uh"],[data-design-field="max_phase_ripple_percent"],[data-design-field="max_drop_percent"],[data-design-field="objective"]){display:none}
|
| 32 |
+
.sp2-focused #tech-settings label:has(:is(#tech-fs_mhz,#tech-width_mm,#tech-cap_uf,#tech-rc_mohm,#tech-rl_mohm)){display:none}
|
| 33 |
.sp2-focused #recommend-design,.sp2-focused #export-recommendation{display:none}
|
| 34 |
|
| 35 |
/* Embedded OpenPELS comparison workspace. */
|
static/openpels-source.zip
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9aa11d6c27a3eb7058c056c937a9545e0959235426ddd6df48492c662c278e4f
|
| 3 |
+
size 24848207
|