summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_base.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netlist: more code maintenance. (nw) couriersud2020-04-281-12/+0
| | | | | | | Make some calls private which were public before. Eliminate functions which would be executed only once. Make terminal reference functions in twoterm.h return const. Clearly identify the use cases which need a non-const ref to terminals.
* netlist: improve const-awareness and tidy changes. (nw) couriersud2020-04-281-9/+9
| | | | Identified a number of code locations which could accept const arguments.
* netlist: More clang-tidy fixes. (nw) couriersud2020-04-281-1/+1
|
* netlist: Fix clang-tidy warnings. (nw) couriersud2020-04-281-3/+3
|
* netlist: unify solver calls. (nw) couriersud2020-04-251-11/+3
| | | | | | Calls to the solver used different paths. These changes unify these calls and provide a common call for discontinuous state changes on analog components (change_state).
* netlist: improve readability. (nw) couriersud2020-04-251-1/+1
| | | | The purpose here is to make clear what is actually done and to reduce usage of calls to update.
* netlist: rename some camel case names. (nw) couriersud2020-04-191-8/+9
|
* netlist: simplify object structure a bit. (nw) couriersud2020-04-191-8/+7
|
* netlist: clang-tidy, srcclean and pedantic warnings fixed. (nw) couriersud2020-04-181-1/+1
|
* netlist: nltool usage and static compile changes. [Couriersud] couriersud2020-04-181-3/+1
| | | | | | | | | | | | | | | | | | | | | This commit simplifies the creation of static solvers. For this to happen the following changes were made: - nltool does no longer support the "-f netlist_file.cpp" option. All parts of netlist which used the option now expect the file to be specified after all other options. Before: nltool -t 10 -f somenetlist.cpp Now : nltool -t 10 somenetlist.cpp - The static compile command now supports an "--output" option to specify the file to be created and accepts multiple input files. To be create the static solver file for MAME use the script provided or: ./nltool --cmd static --output=src/lib/netlist/generated/static_solvers.cpp src/mame/audio/nl_*.cpp src/mame/machine/nl_*.cpp - Updated documentation and examples provided by nltool --help
* netlist: improve performance up to 65% on audio netlists. [Couriersud] couriersud2020-04-131-5/+16
| | | | | | | | | | | | | | | | | | | This commit introduces precompiled static solver code. Due to additional optimizations the compiler can use because the detail calculation steps for the solution are known e.g. the kidniki netlist sees a 100% speed increase. In all environments (windows/*nix/osx) the source for the static solver code can be created using bash src/lib/netlist/nl_create_mame_solvers.sh This will create src/lib/netlist/generated/static_solvers.cpp which is compiled into the mame binary. The script is just a temporary workaround. The intention is that nltool whill be able to create this file with one call. There are other improvements in this commit speeding up the processing of timestep and dynamic calculations.
* netlist: Reduce memory allocation calls in non-core code. (nw) couriersud2020-04-101-1/+1
|
* netlist: Fix some clang-tidy-10 warnings. (nw) couriersud2020-04-051-6/+6
|
* netlist: change output impedance to more realistic values. (nw) couriersud2020-02-171-2/+5
|
* netlist: Parameters evaluated when netlist is created. [Couriersud] couriersud2020-01-291-4/+0
| | | | | | | | | | | | Parameters are now passed to the netlist core as strings. During netlist creation they are evaluated as functions. This opens the path to parameters on subdevice level. Examples: PARAM(device.XY, (1+2*0.005)) RES(R1, 2.05*RES_K(1)+1) In addition the commit contains dead code removal.
* netlist: Code maintenance. (nw) couriersud2020-01-271-2/+18
| | | | | | | | | - Fixed some clang lint warnings - Removed dead code - Experimental parser code to allow calculations in parameter value. This already works for compiled netlists. These changes are currently disabled. Updated pong netlist (and CRC/SHA) to work with this new code.
* netlist: clang lint readability fixes. (nw) couriersud2020-01-251-25/+15
|
* netlist: code maintenance. (nw) couriersud2020-01-201-8/+7
| | | | | | - remove pthrow trampline as proposed by Vas. - identify throwing code by adding noexcept(false) - move "connected term" information to setup code. - srcclean
* netlist: clang tidy fixes. (nw) couriersud2020-01-191-1/+1
|
* netlist: Code maintenance. (nw) couriersud2020-01-121-8/+7
| | | | | | | | | Introduce an additional absolute time type netlist_time_ext to identify whether absolute or relative time is used in the netlist code. Extend ptime code to allow operations between ptime derived types with different internal types. In addition rewrote main queue serve loops. Adds a very small performance increase.
* netlist: Force invalidation of save states. [Couriersud] couriersud2019-12-301-4/+21
| | | | | | | | Added netlist version information. This is used to enforce the invalidation of save states when the major/minor netlist version changes. This catches edge cases for which neither the size or names of saved items changes during releases.
* netlist: more code maintenance. (nw) couriersud2019-11-161-0/+1
| | | | | | - refactor error messages. - Fix some drivers to cope with outputted added my the mame driver for video and sound. - Fix validation.
* netlist: maintenance and bug fixes, remove DUMMY_INPUT. [Couriersud] couriersud2019-11-151-6/+6
| | | | | | | | | | - Removed DUMMY_INPUT. NC (not connected) pins should now use NC_PIN. If a NC_PIN is actually connected, an error will be logged and validation will fail. - Enabled "extended" validation. This will catch now if power terminals are not connected. - Added const and noexcept where appropriate. - Removed dead code. - Fixed the 7414 Schmitt-Trigger device to use nld_power_pins
* netlist: Proxy and power terminal hack removal. [Couriersud] couriersud2019-11-141-1/+0
| | | | | | | | | | | | | | | | | | - Devices ttlhigh and ttlhow are no longer automatically created. - All logic input devices (e.g. TTL_INPUT, LOGIC_INPUT) now need to have their power terminals (VCC, GND) connected. This opens the route for more appropriate proxy devices but comes at a cost. If the connections are omitted your circuit will not work as expected. Example: LOGIC_INPUT(I_SD0, 1, "AY8910PORT") NET_C(VCC, I_SD0.VCC) NET_C(GND, I_SD0.GND) - Updated all netlists. - Removed proxy information from terminal objects. This was replaced by a lookup hash whose life-span does not exceed netlest setup. These changes enable the removal of a number of hacks from the source going forward.
* netlist: code maintenance. (nw) couriersud2019-11-131-31/+40
| | | | | | - move memory pool to netlist_state_t removing one static allocation. - add memory allocation stats to verbose output - nl_assert no longer throws, first step to remove NL_EXCEPT macro.
* netlist: maintenance. (nw) couriersud2019-11-111-11/+0
| | | | | | | - Fix automatic header generation - clang lint fixes. - srcclean - remove dead code
* netlist: code maintenance. (nw) couriersud2019-11-101-31/+19
| | | | | | - more doxygen \file annotations - moved MAINCLOCK back to nl_base.h - remove some const from simple function parameters
* netlist: maintenance. (nw) couriersud2019-11-081-16/+10
| | | | | - switch to VS 2019 community and fix standalone build. - more migration to C++ comment style. - add some more doxygen markup.
* netlist: code and documentation maintenance fixes. [Couriersud] couriersud2019-11-071-1/+1
| | | | | | | | | - "nltool -c docheader" now scans sources and creates usage focussed doxy documentation for devices. Very early stage, but works. For an example, please see ne555 source. - Started migrating to pure C++, i.e. "//" comments. - Various documentation fixes. - Added cppcheck configuration to netlist/build - Some smaller code changes.
* netlist: Minor optimizations. (nw) couriersud2019-11-051-10/+8
|
* netlist: code maintenance. (nw) couriersud2019-11-041-7/+21
| | | | | | | | - more const - explicitly raise exceptions instead of leaving this to log.fatal() - correct a number of cppcheck findings. - dead code removal - clang lint corrections, e.g. include order
* netlist: code maintenance. (nw) couriersud2019-11-031-2/+0
| | | | | | - Separate code out into pmath.h and pstonum.h. - Fix VC build error - optimize pfmtlog.h a bit
* netlist: improve readability. (nw) couriersud2019-11-021-16/+16
| | | | | | | Renamed cast member of the constants struct to magic to clearly identify magic numbers. Introduced nlconst struct inheriting from plib::constants<nl_fptype> to make code better understandable.
* netlist: add RELTOL/VNTOL solver parameters. Type safety. [Couriersud] couriersud2019-11-021-16/+16
| | | | | | | | | The newly added RELTOL and VNTOL parameters implement Newton convergence checks comparable following other SPICE implementations. The ACCURACY solver parameter now is only used for convergence checks in iterative solvers. In addition, type safety was significantly improved and a lot of "magic" numbers are identifiable now.
* netlist: code maintenance and bugfixes. (nw) couriersud2019-11-011-11/+11
| | | | - fixed a bug in the parray constructor - replaced NL_NOEXCEPT with noexcept where appropriate
* netlist: maintenance and simplifcation. (nw) couriersud2019-10-311-4/+4
| | | | | | | - solver: align matrix population along the various solvers - solver: delete dead code - renamed nl_double to nl_fptype and use nl_fptype where previously double has been used. - renamed param_double_t to param_fp_t
* netlist: code maintenance. (nw) couriersud2019-10-301-11/+12
| | | | Simplification, remove some trampolines.
* Netlist: code maintenance and improvements. [Couriersud] couriersud2019-10-181-19/+42
| | | | | | | | - Added support for line markers to the preprocessor and parser. - Added support for include processing to the preprocessor. - Moved sources base type to plib to be used for preprocessor includes. This enables to include e.g. from rom memory regions. - Renamed some defines
* Netlist: code maintenance and bug fixes. (nw) couriersud2019-10-171-861/+749
| | | | | | | - solver now uses dynamic allocation on systems larger than 512x512 - fixed osx build - moved nl_lists.h classes to plists.h - fixed netlist makefile clint section - readability and typos
* Netlist: code maintenance and bug fixes. [Couriersud] couriersud2019-10-151-19/+9
| | | | | | | | | | | | - optimized the core queue dispatching logic. Minor performance increase. - fixed a number of bugs in parray. Now parray<double, 0> will be purely dynamic allocation with the number of elements passed in the constructor. - Added noexpr where appropriate. - Simplified the queue Checked with gcc-7 (ubuntu), gcc-9, clang-10, macosx clang 10, mingw cross compile on linux.
* netlist: Use unique_ptr where possible. (nw) couriersud2019-10-151-17/+38
| | | Also improve code readability.
* netlist: More unique_ptr use. GMRES update, new preconditioner (nw) couriersud2019-10-061-5/+5
|
* netlist: more lint corrections. (nw) couriersud2019-09-281-7/+5
| | | | - fixed lint corrections - added NOLINT where needed
* netlist: switch to c++ streams. (nw) couriersud2019-09-251-1/+1
| | | | Removed the home-brew implementation pstreams and replaced those with c++ streams.
* netlist code maintenance (nw) couriersud2019-09-211-16/+17
| | | | | - prepare move to c++ streams and later std::string - fix more lint and clang pedantic warnings/errors - fix some bugs
* netlist code maintenance. (nw) couriersud2019-09-171-1/+1
| | | | | | - remove a lot of c library use and instead use c++ - improved pstring compatibility to std::string - prepare removal of pstream
* netlist: GCC 9 fixes (nw) arbee2019-05-161-2/+2
|
* netlist: Fix cmos power pins and gcc-9 error. couriersud2019-05-061-6/+8
| | | | | | CMOS 40xx and 4316 power pins fixed. Also fixed gcc-9 error. clang++ complains about unreachable code in nl_base.cpp line 480 even if double parantheses are used. Assigning the define to a local variable and testing this local variable works. Weird.
* netlist: fix pedantic clang warnings. (nw) couriersud2019-05-011-1/+2
|
* netlist: add more defines to nltool -v --version output couriersud2019-05-011-3/+4
| | | | | | - breakout: update notes - 9316: switch to output array - ppmf: fix a warning - nlid_system.h: remove useless brackets.