summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/solver
Commit message (Collapse)AuthorAgeFilesLines
* netlist: Relicensing of the GPL code to BSD-3 with the blessing of the Olivier Galibert2021-03-0915-15/+15
| | | | | | | | | | copyright owners. Much thanks for that Couriersud, the main creator and contributor, but also to Jonathan Gevaryahu and Sergey Svishchev. There are small remnants in machine/NL_*, specifially breakout, pong doubles and rebound that are also copyrighted by the DICE team, whoever that means. They're not critical since they only concern these drivers and not an important core subsystem.
* ATTR_UNUSED, do you welcome C++17 in your heart and mind? Olivier Galibert2021-01-221-2/+2
|
* netlist: fix VS build. couriersud2020-10-031-1/+1
|
* netlist: simplify code. couriersud2020-10-021-1/+1
|
* netlist: move core_terms to netlist_state. couriersud2020-10-022-22/+22
| | | | | * These are used during creation and reset only. No need to maintain them on net_t level.
* netlist: more clang lint fixes. couriersud2020-10-021-2/+2
|
* netlist: Fix a net splitting issue with four term devices. couriersud2020-09-301-4/+8
| | | | | | | | | | * Under cirtum circumstances the splitter would create "ghost" solvers consisting of terminals already used in another and complete solver. This may impact all netlist which use opamps and thus is committed early in the cycle. * This commit adds functionality to instruct the splitter code to include terminals which will not create matrix elements into the parsing of net groups for solvers.
* netlist: applied some clang tidy recommendations couriersud2020-09-304-4/+4
|
* netlist: implement stricter validation. couriersud2020-09-281-1/+48
| | | | | | | | | | | * Devices like BJTs and FETs which are defined but not used will now cause an error. * An unused device will create an additional solver with a singular matrix. - This is adding unnecessary performance overhead. - It complicates debugging because the unused device will cause an arithmetic signal if used with --fperr (nltool). * Fixed all validation errors.
* netlist: Remove "extended validation mode" couriersud2020-09-281-4/+1
| | | | * No longer added value.
* netlist: Fix 128 bit integer support. couriersud2020-09-242-4/+4
|
* netlist: code refactoring. couriersud2020-09-203-9/+7
| | | | | - rename mat_cr.h to pmatrix_cr.h - Optimization to the gmres solver. - Simplifcation of vector operation code
* netlist: emscripten can not use specialization efficiently. couriersud2020-09-171-0/+2
| | | | * Consequently prefer to save on compile time and size.
* netlist: Pedantic and clang tidy updates couriersud2020-09-062-6/+6
| | | * also fix an issue with netlist vs build
* netlist: code maintenance and performance optimizations. Couriersud2020-09-052-5/+5
| | | | | | | | | | | * rename some misleading type names * remove callback_t and replace by better scalable approach * hide implementations details * move sources classes from putil.h to psources.h * reduce code complexity * improve parsing performance, parsing netlists now is twice as fast. * fix issues around multi-byte string support * moved psplit into pstrutil.h
* netlist: Fix various issues around include directories. couriersud2020-08-253-12/+12
| | | | | | | | | * removed include directory src/lib/netlist from various genie files to avoid potential issues. * Code using netlist should use #include "netlist/*". * Updated includes. * Fixed standalone makefile depend target to properly deal with relative paths.
* netlist: References to subdevices should be symbolic. couriersud2020-08-231-1/+1
| | | | | * Exposing sub-device members is not best practice. * The need for sub-devices is a clear indication that a netlist language implementation would be a better solution.
* netlist: Minor optimization to remove sqrt from inner loop. Aaron Giles2020-08-021-9/+9
|
* netlist: source stream refactoring couriersud2020-07-281-2/+2
| | | | | * This is an infrastructure change to enable better error reporting including file/source and line numbers in the future
* netlist: further nl_base.h splitting into headers in core subdir. couriersud2020-07-282-2/+2
|
* netlist: sub solvers now have their own parameter set. couriersud2020-07-2510-78/+122
| | | | | | | | | | * Example: PARAM(Solver.Solver_0.METHOD, "GMRES") * Will use the GMRES solver instead of the default MAT_CR solver. * Same applies to all Solver parameters. * Please use with care. If you change your netlist (e.g. using frontiers) the allocation of nets to solvers and the number of solvers may change. Thus this type of tweaking should only be used after the netlist completely works.
* netlist: Fix scheduling bug. couriersud2020-07-253-4/+4
|
* netlist: include GMRES solver in build. couriersud2020-07-251-2/+2
| | | | | | | * The GMRES solver for larger matrices (>>100) can outperform Gaussian elimination. Including it so it gets wider attention. * As far as I know netlist is the only SPICE-like circuit simulation providing a GMRES solver.
* netlist: Fix format string in gcr code. couriersud2020-07-251-1/+1
|
* netlist: Fix clang unused variable warning. couriersud2020-07-251-0/+3
|
* netlist: separate nl_base.h into separate header files. couriersud2020-07-252-3/+0
| | | | | | * This clean-up exercise will hopefully make it easier to navigate the core code. Another long term goal is to further straighten the object model.
* netlist: Rewrote scheduler scheduling. couriersud2020-07-255-75/+177
| | | | | | | | | | | | | | * All solver scheduling is now handled by nld_solver. * Previously, for dynamic timestepping the sub solvers would be responsible for their scheduling themselves. - This prevented any attemps to use parallel execution of solvers. * Now the route is free towards experiments to use parallel execution of solvers. * Uses ptimed_queue_linear in solver scheduling * Improved netlist queue implementation (template now) * Added const delegates. * Added subsolver stats * Removed dead code.
* netlist: nld_matrix_solver is now owned by nld_solver. couriersud2020-07-2513-47/+52
|
* netlist: include timestamp in newton-raphson loop warnings. couriersud2020-07-181-2/+2
|
* netlist: Potential regression trigger. couriersud2020-07-172-11/+0
| | | | | | | | | * Removed update and NETLIB_UPDATE completely. * Startup initialization order may change. * This may cause regression tests to trigger. This is expected. Logic TTL devices do not have a defined power-up state. That's why reset circuits exist which create a reset signal *after* all power supply lines are stable.
* netlist: prepare road towards trapezoidal integration. couriersud2020-07-171-1/+1
| | | | | * This is a long term transition goal. Documented in source (see NL_USE_BACKWARD_EULER).
* netlist: finished input handler refactoring. couriersud2020-07-124-4/+15
| | | * all inputs now explicitly specify a signal handler.
* netlist: emit a warning every 100 invocations of nr resolution. couriersud2020-07-122-3/+7
|
* netlist: improve dealing with non-convergence situations. couriersud2020-07-113-40/+125
| | | | | | | | | | | | | | | | | | * No changes for well-behaved netlists. * Netlists reporting "newton loops exceeded" messages should now report a lot less of these messages. * In case newton-raphson does not converge, netlist will reset the state back to the beginning of the timestep. It will than use a number of very small timesteps to hopefully deal with the non-convergence due to a too big timesteps. Afterwards solving continues using dynamic timestepping until the time-slice is complete. * This is a lot better than the previous approach. * This is meant as a performance optimization helper. Ideally, your netlists never produce "newton loops exceeded" messages. * Any events for connected analog and digital inputs will happen after the timeslice is complete. Thus this approach - as the previous one - are not suited for high-frequency (such as video outputs) situations. In these case, only dynamic timestepping or reducing the fixed timestep are a suitable solution.
* netlist: remove soft reset support. couriersud2020-07-051-1/+1
| | | | | | | | * Electronic circuits and base components like resistors or capacitors do not have a reset line. You can use them to create reset circuits. There is thus no point to support soft reset, the equivalent to pressing the reset button. * Fixed some bugs around reset and start up logic. * This also fixes the "scramble F3" crash.
* netlist: code maintenance and bug fixes. couriersud2020-07-012-0/+2
| | | | | | | | | | | * palloc.h/pmatrix2d.h: Fix static_assert warnings at the origin. * Rework hints to broaden their use and fix NC hint. * 74377: use NC hint * plists.h: Fix debugging in MSVC * Include cleanup: Move everything not needed by netlists from nl_setup.h into core/setup.h * Fix some clang tidy warnings * srcclean
* netlist: include file refactoring. couriersud2020-06-2814-24/+25
| | | | | | | | The purpose of this ongoing exercise is to remove unnecessary dependencies in header files. netlist implementations should only have access to what they need. The same applies to device implementations. Core stuff will be moved to the core subdirectory going forward.
* netlist: code maintenance couriersud2020-06-284-12/+23
| | | | | | * decrease use of reinterpret_cast. * change some defaults for better ttl game optimization. * various code cleanup.
* netlist: Performance improvement and refactoring. [Couriersud] couriersud2020-06-1314-349/+364
| | | | | | | | | | | | | | | | | | | | | | | | Kidniki now achieves up to 910% when run with static solvers and with nltool. That is significant better than the 860% we have seen previously. This increase is driven by using a global memory pool in the solver code. In addition the following refactoring and code maintenance work is included. Please excuse the large commit, some of this took interfered with other work and the detail development steps were ugly. - gsl support: This commit adds pgsl.h which implements a very limited number of the functionality of the gsl header described in the c++ core guidelines. - clang-tidy fixes - A significant refactoring of palloc.h. Aligned hints were removed, they added complexity without a significant performance gain. Vector operations should better be done on special spans/views. The code has been tested on linux with g++-7, g++-9, clang-11. On Windows mingw-10 and VS2019, OSX clang-11.
* netlist: Improve static solver performance by 5%. [Couriersud] couriersud2020-06-133-8/+61
| | | | | Use a more condensed matrix format for go, gt and Id matrices. In addition, optimize the static compilation code.
* netlist: allow selection of base arena for pmempool_arena. (nw) couriersud2020-06-081-2/+2
|
* netlist: code maintenance. (nw) couriersud2020-06-083-48/+21
| | | | | | - more c++14, use enable_if_t instead of enable_if - cleaned up the use of memory allocation arenas - reduce MACRO usage, use std::conditional where possible
* netlist: clang-tidy, header order fixes. (nw) couriersud2020-06-011-1/+1
|
* netlist: small memory system cleanup. (nw) couriersud2020-05-251-1/+1
|
* netlist: move penum into own header file. (nw) couriersud2020-05-241-3/+4
|
* netlist: Add tristate support for rom devices. [Couriersud] couriersud2020-05-201-1/+0
| | | | | | | | | Rom and prom devices now properly support tristate outputs. Native OC output still on the todo list. In addition this commit fixes a number of bugs around dealing with macro level parameters and improves documentation by adding a parameter table. Also srcclean.
* netlist: code cleanup and development stage tristate [Couriersud] couriersud2020-05-152-5/+5
| | | | | | | | | | Code cleanup to better separate the following stages: - parsing - setup - run In addition preliminary native tristate support was added. Not yet production ready, please don't use it.
* netlist: more family/model alignment. (nw) couriersud2020-05-105-8/+0
| | | | Also remove dead code and dead comments.
* netlist: Fix some tidy warnings. (nw) couriersud2020-05-031-0/+1
| | | moving over to clang-tidy-11 and enabling more warnings.
* netlist: Fix some edge cases in static compile. (nw) couriersud2020-04-281-4/+7
| | | Comes with a new version of static_solvers.cpp