summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pfunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netlist: Add the NE566 as a macro device. [Couriersud] couriersud2020-05-011-2/+43
| | | | | | | | The device can be found in nlm_other.cpp. Removed nld_ne566.* Added SYS_SW, SYS_SW2 and SYS_COMP. These are single switch, alternating switch and a analog comparator with digital outputs. Renamed RES_SWITCH to SYS_SW. Added example ne566.cpp in netlist/examples.
* netlist: Fix clang-tidy warnings. (nw) couriersud2020-04-281-4/+8
|
* netlist: code maintenance and edge case fixes. (nw) couriersud2020-04-201-3/+3
| | | | | | | | | | | | "Edge cases" are compiles were the floting point type used for the core may be different from the one used by solvers, e.g. double/float. This does not happen in MAME, here currently this is always double/double. Since floats are better suited for GPUs whose double performance is limited it was time to review the code. This commit fixes warnings about type conversions and precision loss. In addition there is better support for INT128 and FLOAT128. The MAT solver has seen some minor performance increases.
* netlist: code maintenance on pfunction. (nw) couriersud2020-04-191-8/+8
|
* netlist: added min and max to pfunction. (nw) couriersud2020-02-161-0/+6
|
* netlist: Fix crash in infix function evaluation. (nw) couriersud2020-01-291-1/+1
|
* netlist: clang lint readability fixes. (nw) couriersud2020-01-251-13/+13
|
* netlist: code maintenance. (nw) couriersud2020-01-201-8/+8
| | | | | | - remove pthrow trampline as proposed by Vas. - identify throwing code by adding noexcept(false) - move "connected term" information to setup code. - srcclean
* netlist: maintenance. (nw) couriersud2019-11-111-1/+1
| | | | | | | - Fix automatic header generation - clang lint fixes. - srcclean - remove dead code
* netlist: first steps on the way to calculated parameters. [Couriersud] couriersud2019-11-101-7/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit is a first step towards using formulas in parameters, i.e. MAINCLOCK(clock, 20 * 30) The intention is to improve readability and scalability. Since device registration already provides all necessary information about parameters, the code to create an include file for all devices has been improved. Long term, this will remove the need for device specific header files. In addition going forward devices will accept either no connections or all specified connections, i.e. TTL_7400_NAND(name, chip1.2, chip2.3) or TTL_7400_NAND(name) NET_C(...) NET_C(...) This will allow to remove all duplicate definitions which are currently necessary, i.e. TTL_7400_NAND/TTL_7400_GATE
* netlist: code maintenance and bug fixes. (nw) couriersud2019-11-081-4/+0
| | | | | | | - comment style migration continues. - Fixed a two bugs in the truthtable ignore inputs code - refactored the truthtable code a bit for better readability. - updated netlist specific gitignore.
* netlist: more consistent exception handling. (nw) couriersud2019-11-051-4/+4
| | | | Still not optimal, but better than what we had previously. No exception logging comes closer.
* netlist: code maintenance. (nw) couriersud2019-11-041-2/+2
| | | | | | | | - 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-1/+2
| | | | | | - Separate code out into pmath.h and pstonum.h. - Fix VC build error - optimize pfmtlog.h a bit
* netlist: Completed __float128 support. [Couriersud] couriersud2019-11-031-4/+7
| | | | | | Both compiling the core and the shaders with __float128 now work. The support was added to be ready to deal with academic edge cases. Performance drops to 10% of double - thus disabled by default.
* netlist: add RELTOL/VNTOL solver parameters. Type safety. [Couriersud] couriersud2019-11-021-2/+3
| | | | | | | | | 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: fix clang warnings & srcclean. (nw) couriersud2019-10-311-3/+3
|
* netlist: Compile with float/double floating point. [Couriersud] couriersud2019-10-311-171/+179
| | | | | | | | | | | Added ability to compile using float instead of double. Specifically the the solver as well as the infrastructure now can have their own floating point type. Currently this is only an academic exercise since numerically demanding circuits like kidniki only work with double/double support. Using float here is pushing numerical stability over the limits. The long term design goal is too have the matrix type (double/float) being a parameter.
* netlist: code maintenance. (nw) couriersud2019-10-291-2/+2
| | | | | | | | - Removed code no longer used - Add noexcept where appropriate - split pparser.[c|h] into ppreprocessor and ptokenizer - smaller optimizations, e.g. use of std::size_t - fix lint warnings
* netlist: code maintenance (nw) couriersud2019-10-121-1/+2
| | | | - clang lint and pedantic fixes - mat_cr.h: separate solving linear systems from underlying matrix
* netlist: maintenance and lint fixes. (nw) couriersud2019-10-061-1/+1
|
* netlist code maintenance (nw) couriersud2019-09-211-1/+1
| | | | | - prepare move to c++ streams and later std::string - fix more lint and clang pedantic warnings/errors - fix some bugs
* netlist: Fix MT06827. couriersud2019-04-221-1/+1
| | | | All pstonum calls now need to specify if they want local locale or the "classic" "C" locale.
* netlist: MB3614 again, function controlled VARCLOCK and other couriersud2019-04-071-4/+7
| | | | | | | | | | | improvements. - fix MB3614 parameter - Added VARCLOCK which derives step size from function - optimized function handling in CS and VS - fixed a bug in ppreprocessor - add trunc to pfunction - added opamp_amplification_curve to derive characteristic amplification curve
* (nw) Clean up the mess on master Vas Crabb2019-03-261-16/+16
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-16/+16
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* netlist: fix visibility issues and more issues reported by tidy. (nw) couriersud2019-02-221-1/+1
|
* netlist: more core guidelines work. (nw) couriersud2019-02-091-1/+1
|
* netlist: Refactoring after adding clang-tidy support to netlist makefile couriersud2019-02-071-6/+7
| | | | | | | - convert macros to c++ code. - order of device creation should not depend on std lib. - some state saving cleanup. - added support for clang-tidy to makefile. - modifications triggered by clang-tidy-9.
* netlist: code maintenance and fixing kidniki ... (nw) couriersud2019-02-011-1/+0
| | | to run at acceptable speed again.
* Fix clang-8 warnings. (nw) couriersud2019-01-111-2/+2
|
* Improve type safety on string->numeric conversions. (nw) couriersud2019-01-101-1/+3
| | | | | | | Also fixed an issue with 7497. ./nltool -t 5 -f src/mame/machine/nl_tp1983.cpp -v now runs again.
* More c++ alignment. pstring now behaves like std::string. (nw) couriersud2019-01-061-6/+4
| | | | | This change removes all string extensions like trim, rpad, left, right, ... from pstring and replaces them by function templates. This aligns a lot better with the intentions of the standard library.
* Fix state saving for pfunction lfsr. (nw) couriersud2017-05-281-1/+0
|
* Fix issues identified by Vas and LordKale4: couriersud2017-05-271-2/+1
| | | | | | - made local netlists in Cheeky Mouse static - replace stdlib rand by 16 bit galois lfsr (nw)
* Add rand() function to pfunction expression parser. Use this to simulate couriersud2017-05-271-0/+7
| | | E-B noise in Cheeky Mouse and fix the "cheese" choose. [Couriersud]
* Change pstring to use std::string as storage container. couriersud2017-03-301-2/+2
| | | | | | | | This removes all allocation code from pstring. const_iterator is consequently now based on pstring::const_iterator. Removed pstring_buffer. This was class wasn't a good idea. Vas was right: This change did not impact runtime performance. Startup performance (string intensive) increased. (nw)
* Turn psring iterator into a real forward iterator that works with standard ↵ Vas Crabb2017-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | algorithms. There are a few changes to achieve this: * Rename to const_iterator since it's immutable * Typedef iterator to const_iterator for now as there's no mutable iterator * Add default constrcutor and operator-> required by concept, const-qualify operators * Remove operator+ and operator+= since it's not a random-access iterator (use std::next and std::advance instead) * Return reference/pointer to a proxy rather than a code_t value from opertator*/operator-> The final change is required to meet the requirement that operator* for two equivalent forward iterators return an equivalent reference. The pstring doesn't actually contain a sequence of code_t, so there's no way to return a reference to code_t directly. Instead, a reference to a proxy object aliased on the string storage is returned. The proxy is implicitly convertible to code_t. The most noticeable side effect is that auto c = *s.begin() or for (auto c : s) won't work. You need to do for (auto &c : s) or for (code_t c : s) instead.
* More cppcheck fixes. (nw) Couriersud2017-03-051-4/+4
|
* Reorder include order to comply with best practices. (nw) couriersud2017-02-101-2/+3
|
* Do not derive other classes from std::vector. More cleanup. (nw) couriersud2017-01-271-3/+3
|
* fix for visual studio (nw) smf-2017-01-261-3/+3
|
* Netlist refactoring: couriersud2017-01-251-1/+1
| | | | | - Refactored netlist pmf code. - Small optimization for diode calculations. - Minor refactoring across the board. (nw)
* Added infix notation parsing to the function parser. (nw) couriersud2017-01-251-1/+109
|
* Netlist: couriersud2017-01-171-0/+104
- refactored reverse polish notation evaluator into own source files. - added function parameter to current and voltage sources VS and CS. You can now use those to e.g. produce a sine wave. - Changed code to allow devices to optionally be treated as dynamic or timestepping devices. [Couriersud]