summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_system.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netlist: Add the NE566 as a macro device. [Couriersud] couriersud2020-05-011-1/+3
| | | | | | | | 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: use initializer_list. (nw) couriersud2020-03-021-0/+3
| | | | | | - Use initializer_list in object_array_t. - Added constructor which accepts a format string for object names. - Started work on logic_input8 which provides 8 logic outputs.
* netlist: Code maintenance. (nw) couriersud2020-01-121-1/+1
| | | | | | | | | 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: maintenance and bug fixes, remove DUMMY_INPUT. [Couriersud] couriersud2019-11-151-1/+1
| | | | | | | | | | - 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: first steps on the way to calculated parameters. [Couriersud] couriersud2019-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. (nw) couriersud2019-11-101-3/+3
| | | | | | - more doxygen \file annotations - moved MAINCLOCK back to nl_base.h - remove some const from simple function parameters
* netlist: code and documentation maintenance fixes. [Couriersud] couriersud2019-11-071-50/+7
| | | | | | | | | - "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: Support for float, double and long double solvers. [Couriersud] couriersud2019-11-021-1/+1
| | | | | | | | | | | | | - Added new solver parameter FPTYPE. This determines in which floating point domain the linear system is solved. May be one of "FLOAT", "DOUBLE" or "LONGDOUBLE" - Added option "--fperr" to nltool. This enables floating point exceptions. This helps debugging the code under gdb. The purpose of this going forward is to have more choice in optimization. Non-dynamic systems should be just fine in the float domain. Dynamic systems (i.e. diodes, bjts, mosfets) should in general work with double. Certain edge cases may require long double resolution.
* netlist: maintenance and simplifcation. (nw) couriersud2019-10-311-1/+1
| | | | | | | - 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: Use unique_ptr where possible. (nw) couriersud2019-10-151-1/+1
| | | Also improve code readability.
* netlist: MB3614 again, function controlled VARCLOCK and other couriersud2019-04-071-14/+1
| | | | | | | | | | | 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-58/+37
| | | | | | | | | | | | | 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-37/+58
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* netlist: Fix relative include paths and a conflict. (nw) couriersud2019-02-231-2/+2
| | | | nl_types.h is part of libc++. Any project with a file with the same name on the include path just fails to compile. Renamed to nltypes.h
* netlist: align solver calls. (nw) couriersud2019-02-041-13/+4
|
* netlist: Refactoring and some functionality enhancements. (nw) couriersud2019-02-041-0/+23
| | | | | | | | | | - Removed dead code. - nltool now adds a define NLTOOL_VERSION. This can be tested in netlists. It is used in kidniki to ensure I stop committing debug parameters. - Optimized the proposal for no-deactivate hints. - Documented in breakout that hints were manually optimized. - Minor optimizations in the order of 2% enhancement.
* netlist: All devices now specify parameters in factory constructor. (nw) couriersud2019-02-011-11/+13
| | | | This previously was part of net_lib.cpp and repeatedly caused bugs.
* netlist: remove trampoline code. (nw) couriersud2019-02-011-2/+2
|
* netlist: code maintenance and fixing kidniki ... (nw) couriersud2019-02-011-37/+0
| | | to run at acceptable speed again.
* Move information where it belongs ... into the drivers. (nw) couriersud2019-01-101-11/+11
|
* Fix state saving for pfunction lfsr. (nw) couriersud2017-05-281-1/+1
|
* Netlist code refactoring: couriersud2017-04-091-1/+2
| | | | | | | | | | | | | | | | | | | - more use of c++ features - some CRTP in pfmtlog - demangled code for truthtables - use more constexpr - rewrite main loop - use default constructors and assignment operators were applicable. - optimized 7448 and 9316 All of this has decreased startup time by approx. 25% to 30%. Complex netlists like pong or kidniki are parsed, analyzed and constructed in around 15 ms. Run performance has increased by about 5%. All in all not to bad. A game like pong uses a clock of 7 MHz (after division by 2). Thats 14 MHz clock invocations. Running at over 200%, 28 MHz. On a 3.9 GHz Machine about 140 cycles/clock change. [Couriersud]
* Clean up net_t interface and increase readability. (nw) couriersud2017-02-221-2/+2
|
* Make sure netlist includes are not found directly on include path. couriersud2017-02-101-2/+2
| | | | Instead, they have to be prefixed by "netlist/". Removed unneeded link librariers for nltool and nlwav along the way. (nw)
* More netlist refactoring: couriersud2017-01-251-2/+2
| | | | | | | | - Remove virtual from some destructors and make them protected. - Various cleanups. - Small performance improvement. - Fixed some inconsistencies. - More c++ refactoring. (nw)
* Netlist: couriersud2017-01-171-72/+3
| | | | | | | | | - 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]
* Improve readability and remove some trampolines. (nw) couriersud2017-01-121-0/+35
|
* Fix timing issue in CD4538. Add "pow" (power) to the function model. couriersud2017-01-121-0/+4
| | | Minor documentation updates. Slight improvement of gorilla sound. (nw)
* - setup_t is owned by netlist_t. Stop being complicated. couriersud2017-01-121-0/+5
| | | | | | - Remove gnd() method. - Further simplification. - Fix potential reset and initialization issues. (nw)
* Moved proxy code into separate file. (nw) couriersud2016-12-281-32/+0
|
* Netlist updates: couriersud2016-07-211-13/+13
| | | | | | | | | | | | | | | - Removed trampolines (OUTLOGIC, INPLOGIC and friends). - Started using doxygen comment and documentation style. Added doxygen files to documentation folder. - Refactored code triggered by doxygen output. - Moved internal and support classes into namespace detail. - Use an anordered map in parser. - -Wconversion fixes - All done now. - Fixed -Wold-style-cast warnings in netlist code. - Added iterators to pstring. - Moved two macros, added more RAII and improved exceptions. Fixed some bugs in parser code. - Fixed a number of bugs in parser code and exception handling. [Couriersud]
* Netlist improvements: couriersud2016-07-011-1/+1
| | | | | | | | | | | | | | | | | | | - nltool now accepts -Ddefine=value to pass on to netlists - improved option handling and added "dummy" options to add grouping and examples in help output. - improved --cmd=listdevices output - Fix dynamic timestepping. This will work with breakout using real capacitor modelling instead of delay devices. Really slow, but very useful to calibrate timings. - Fix an awful bug in timing for delay devices. - Switched to clang 3.8 and made code compile with -Weverything -Werror -Wno-old-style-cast -Wno-padded -Wno-weak-vtables -Wno-missing-variable-declarations -Wno-conversion -Wno-c++98-compat -Wno-float-equal -Wno-cast-align -Wno-global-constructors -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-format-nonliteral -Wno-weak-template-vtables This was a helpful exercise since it brought forward some serious issues with implicit constructors. [Couriersud]
* Srcclean on netlist files. Avoid the merge massacre. (nw) couriersud2016-06-251-1/+0
|
* Merge netlist_dev branch, all code_refactoring: (nw) couriersud2016-06-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Object model optimisation. Merge remote-tracking branch 'origin/master' into netlist_dev Fix a merge issue. #if ==> #elif. Ouch. Default PHAS_PMF_INTERNAL=0 for 32bit windows mingw. Change UINT8 to uint_[fast|least|8_t. Move state_var so it can be used by base devices as well. Remove last traces of ATTR_ALIGN. Refactored netlist_time into a template. Removed implicit double assignment to netlist. Doomed to produce bugs. Instead, use netlist_time::from_double. Switch to using proper (i.e. bool type) param_logic_t. Formally differentiate between logic inputs (e.g. switches) and int inputs (e.g. resistor ladders or selection switches). Added parameter USE_DEACTIVATE to truthtable devices. Added more constexpr to netlist_time. Fixed some ifdef code paths. - More c++. - Simplify main processing loop. As a nice side-effect that squeezed out some cycles. - More cycle squeezing. - Removed pvector_t. - Use std::sort. - Refactored netlist state manager. - Introduction of state_var object template to be used on device state members. - Changed remaining save occurrences to state_var. - Rewrote nltool's listdevices command. This allowed removal of one member from devices which served solely for listdevices. - Remove hashmap_t. Fix kidniki regression.
* - More code cleanup. couriersud2016-06-071-20/+5
| | | | | | | | | | | | | | - Dead code removal and minor refactoring. - Simplify. Align naming with stl. Fix somed pedantic warnings. - More STL compatability. - Remove ATTR_HOT and ATTR_COLD. Refactored netlist_time. - Fix long standing workaround which would ignore policy of change-only" propagation. - Rewrote for loops to use auto : semantics. - Truthtable cleanup. (nw) - Get rid of nl_math. Remove nl_util.h and moved contents to plib/putil.h. - Fix standalone build. Refactor ptypes.h. [Couriersud]
* - Minor cosmetic refactoring. Added a "uninitialised array" template to balr0g2016-06-071-161/+177
| | | | | | | | | | | allow in-place creation (for increased locality) of netlist classes. Main use is in truthtable class. - Remove PLIB_NAMESPACE macros. - Remove namespace macros. Use explicit namespace declarations. - Moved device definitions into cpp files. - Moved more device definitions into cpp files. - New prefix "nlid" for include files flags purely internal include files not to be leaked into userland. - Fix factory code.
* Moved all parameter definitions in constructors. (nw) couriersud2016-05-251-10/+14
|
* Added == operator to netlist_time couriersud2016-05-211-1/+7
|
* All netlist devices now follow new syntax. Removed dead code. All sub couriersud2016-05-211-160/+1
| | | | devices are now forced to be initialized in the constructor. Device setup now completely in constructor. Removed start call. [Couriersud]
* More memory timebombs removed. (nw) couriersud2016-05-211-3/+0
|
* Continuing work to move object initialization from start to constructor. couriersud2016-05-161-24/+6
| | | | | Removed family_t. All of this can be determined at runtime from object as well. As part of this, the "template" to write devices has changed. Converted a number of devices to use the new template. [Couriersud]
* Align object registration syntax. (nw) couriersud2016-05-101-12/+12
|
* Rename connect_direct to connect_post_start to reflect usage. (nw) couriersud2016-05-101-1/+1
|
* Converted most subdevices to unique_ptr. This is a temporary measure couriersud2016-05-021-11/+11
| | | | | until the device initialisation is moved into the constructor. Started converting constructors of devices to be passed name and netlist. (nw)
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-1/+1
|
* netlist: couriersud2016-03-271-0/+1
| | | | | - more code optimization - hide matrix_solver_t implementation - use netlist_time for time deltas
* Netlist: code maintenance couriersud2016-03-231-1/+1
| | | | | | | | - rename netlist_analog_t to analog_t - straighten object model - reduce access to member variables - use pvector<analog_net_t::list_t> for groups. - simple coverity fixes.
* netlist: rename plist_t to pvector_t to clarify origin. couriersud2016-03-141-2/+2
|
* netlist updates: couriersud2016-03-141-1/+1
| | | | | | | | | | - First steps to move towards c++11. - Base plist on std::vector - Replace pstack with std::stack - Remove pnamed_list - use c++ "for each" in a number of places - Fixed two "time bombs" [couriersud]
* nw, more PVS-Studio fixes therealmogminer@gmail.com2015-11-091-2/+0
|