Drew Lewis
832c62b579
Refactor DMP solver to use Eigen and implement Determinant Guarded solver ( #450 )
...
This commit refactors the Dartu-Menezes-Pileggi (DMP) effective capacitance
algorithm solver to use the Eigen library, and implements a Determinant Guarded
solver to handle singular and near-singular Jacobians safely and efficiently.
Key changes:
1. Refactored the DMP solver to use Eigen stack-based data structures,
replacing the custom Crout LU decomposition and solver.
2. Extracted the linear solver logic into a dedicated helper function
DmpAlg::solveNewtonStep.
3. Implemented a "Determinant Guarded" solver:
- Manually checks the determinant of the Jacobian (safety guard).
- Throws a DmpError if the determinant is dangerously close to zero (|det| < 1e-12),
safely triggering the lumped capacitance fallback.
- Otherwise, solves using Eigen's highly optimized analytical inverse (fast path).
4. Added documentation in the comments on how to easily swap back to LU
decomposition with partial pivoting (PartialPivLU) if any numerical
precision issues arise in the future.
Benchmark Results (Optimized Release Build, 5,288 DMP calls):
| Test Case | Calls | 1. Original (Crout LU) | 2. Eigen (PartialPivLU) | 3. Eigen (Determinant Guarded) | Speedup (3 vs 1) | Speedup (3 vs 2) |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
| power | 2,608 | 1.8822 ms | 1.6791 ms | 1.2702 ms | +32.5% | +24.4% |
| power_vcd | 2,608 | 1.8729 ms | 1.6704 ms | 1.2768 ms | +31.8% | +23.6% |
| spef_parasitics | 24 | 0.0193 ms | 0.0187 ms | 0.0140 ms | +27.5% | +25.1% |
| mcmm3 | 48 | 0.0728 ms | 0.0756 ms | 0.0817 ms | -12.2% | -8.1% |
| Total DMP Time | 5,288 | 3.8472 ms | 3.4438 ms | 2.6427 ms | +31.3% | +23.3% |
2026-06-18 13:52:14 -07:00
James Cherry
0fe167a80d
sta_internal_bidirect_instance_paths_enabled use load->driver edges
...
Signed-off-by: James Cherry <cherry@CerezoBook.local>
2026-06-15 17:02:58 -07:00
James Cherry
9065d915db
copy() use copy constructors
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-05-05 17:25:09 -07:00
James Cherry
801d621d6b
Dmp delay calc inline algs
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-05-05 17:08:16 -07:00
James Cherry
7fca318611
copy() use copy constructors
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-05-05 16:58:59 -07:00
James Cherry
afa2286edc
copy() use copy constructors
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-05-05 16:35:40 -07:00
James Cherry
1eb2e9b11d
untabify
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-25 14:45:49 -07:00
James Cherry
a1c3077139
message ids
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-23 18:12:40 -07:00
James Cherry
c8b9ffb22d
tidy
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-21 17:30:35 -07:00
James Cherry
6e7ec45bc8
rm extra swig module dcls
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-16 15:46:32 -07:00
James Cherry
12c59878ee
prima non-ccs report dcalc resolves #418
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-16 15:13:28 -07:00
James Cherry
21848bcdd2
clang tidy
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-15 09:38:10 -07:00
James Cherry
63efee64bf
tidy round1
2026-04-13 14:59:05 -07:00
James Cherry
b136ba309a
PrimaDelayCalc::reportGateDelay resolves #418
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-09 15:13:40 -07:00
James Cherry
645f2669c9
report_dcalc prima resolves #418
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-07 10:45:04 -07:00
James Cherry
84150e925b
prima ceff
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-04 09:21:34 -07:00
James Cherry
aedddcecd8
DMP use std::array
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-04 09:21:01 -07:00
James Cherry
2f85fdfee3
Dmp cleanup
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-03 16:46:05 -07:00
James Cherry
e04f36b541
GraphDelayCalc::findInputArcDelay rm Slew
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-03 11:22:38 -07:00
James Cherry
5d40134239
ArnoldiDelayCalc rcmodel
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-03 11:22:38 -07:00
James Cherry
638ffa57d4
cleanup
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-31 16:45:47 -07:00
James Cherry
8c1ebce695
GraphDelayCalc::findInputDriverDelay rm finishDrvrPin
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-31 16:37:38 -07:00
James Cherry
1d4b516239
GraphDelayCalc::findInputArcDelay thread issue
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-31 13:59:59 -07:00
James Cherry
6742692876
string squash
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-28 19:13:35 -07:00
James Cherry
b9e439f41c
delay calc clip delay to 0.0 resolves #405
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-24 18:42:47 -07:00
James Cherry
04f4528c2c
ccs ceff pocv
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-22 19:34:59 -07:00
James Cherry
73c2cca24c
delayAsString
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-18 16:33:15 -07:00
James Cherry
61b2a4b2c3
indent
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-16 16:29:10 -07:00
James Cherry
134b547501
use std::format squash
2026-03-16 15:01:38 -07:00
James Cherry
5fbd2a18b5
Graph::slew/arcDelay rm static
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-16 14:53:02 -07:00
James Cherry
d6e7b4256c
lvf squish
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-13 14:06:35 -07:00
James Cherry
0a5b95a523
CcsCeffDelayCalc::loadDelaySlew
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-13 10:19:07 -07:00
James Cherry
818596f25a
LumpedCapDelayCalc::makeResult resolves #403
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-12 15:53:10 -07:00
James Cherry
981f44db68
update copyright
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-10 14:57:45 -07:00
James Cherry
129d007f76
override
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-09 17:43:03 -07:00
James Cherry
28b9401e31
const
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-08 16:15:24 -07:00
James Cherry
859982bdc7
StdStringSeq -> StringSeq
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-08 15:51:50 -07:00
James Cherry
d7905a3886
delay_calcs use std::string
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-08 14:41:22 -07:00
James Cherry
c2c40f76b1
DmpAlg
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-08 14:03:53 -07:00
James Cherry
c7ba405a14
comment
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-08 13:59:22 -07:00
James Cherry
d8c0e9285b
RiseFall use shortName instead of to_string
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-06 12:02:05 -07:00
James Cherry
741bf4d561
rm using std::
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-02 12:13:13 -08:00
James Cherry
94b8fd8f37
dcalc threshold adjustment
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-03-01 17:33:20 -08:00
James Cherry
a6425a3364
FindMessages criticalError
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-28 14:51:09 -08:00
James Cherry
33e480a6c1
liberty memory management
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-02-04 18:33:04 -07:00
James Cherry
e5ee0fdb24
fmt
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-13 09:36:51 -07:00
James Cherry
4fbe16e5a4
ApiChanges
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-13 09:36:51 -07:00
James Cherry
d42b821c00
rel 3.0
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-13 09:36:45 -07:00
James Cherry
9d401d1c0e
dcalc bfs incr level/hercules_is_int 0.3 correlation
...
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-01-06 14:37:26 -08:00
Logikable
c4b94c3ee5
Add missing system header includes. ( #330 )
...
Signed-off-by: Sean Luchen <seanluchen@google.com>
2025-11-17 09:23:32 -08:00