summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/prg/nltool.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netlist: Relicensing of the GPL code to BSD-3 with the blessing of the Olivier Galibert2021-03-091-4/+4
| | | | | | | | | | 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.
* Update "2020" text to "2021" (#7713) Stiletto2021-01-281-1/+1
| | | Update "2020" text to "2021".
* netlist: more clang lint fixes. couriersud2020-10-021-2/+2
|
* netlist: Remove "extended validation mode" couriersud2020-09-281-4/+0
| | | | * No longer added value.
* netlist: emscripten can not use specialization efficiently. couriersud2020-09-171-0/+4
| | | | * Consequently prefer to save on compile time and size.
* netlist: add listmodels command to nltool. Couriersud2020-09-091-1/+47
| | | * nltool --help is your friend.
* netlist: code maintenance and performance optimizations. Couriersud2020-09-051-72/+57
| | | | | | | | | | | * 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-251-10/+10
| | | | | | | | | * 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: Fix some documentation issues. couriersud2020-08-221-1/+13
|
* netlist: Make new documentation items appear in doxygen output. couriersud2020-08-061-7/+11
|
* netlist: source stream refactoring couriersud2020-07-281-24/+20
| | | | | * This is an infrastructure change to enable better error reporting including file/source and line numbers in the future
* netlist: add 74121 device and refactor 74123 code. couriersud2020-07-101-1/+1
| | | | | | * added 74121 device * migrate dip devices to netlist devices * refactor code to be based on device description structs
* netlist: unit test macros now have a "P" prefix. couriersud2020-07-101-2/+2
| | | | | * will allow to use both googletest and Catch frameworks. * on unexpected std::exception include what() in error message.
* netlist: remove soft reset support. couriersud2020-07-051-0/+2
| | | | | | | | * 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: Add basic unit testing support. couriersud2020-07-051-2/+11
| | | | | | | | | * Add google test syntax compatible unit testing support. This is a very limited subset of the google test framework and not intended ever to be a replacement. Adding a dependency to google test for the functionality required was considered to be an overkill. * nltool -c tests runs unit tests if linked in. This is *not* the case for the version of nltool compiled with TOOLS=1. * Added unit tests for plib::pfunction.
* netlist: add progress indicator to nltool. couriersud2020-07-041-2/+42
| | | | When running a netlist "--progress" may be used to display a progress indicator.
* netlist: code maintenance and bug fixes. couriersud2020-07-011-1/+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-281-4/+5
| | | | | | | | 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.
* Fix nltool build on CWG 1579-noncompliant compilers (nw) AJR2020-06-181-1/+1
|
* netlist: fix some clang-tidy warnings. (nw) couriersud2020-06-131-4/+4
|
* netlist: Performance improvement and refactoring. [Couriersud] couriersud2020-06-131-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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-131-1/+4
| | | | | Use a more condensed matrix format for go, gt and Id matrices. In addition, optimize the static compilation code.
* netlist: code maintenance. (nw) couriersud2020-06-081-13/+13
| | | | | | - 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: Enable utf7 filenames on windows. (nw) couriersud2020-06-061-9/+12
|
* netlist: clang-tidy, header order fixes. (nw) couriersud2020-06-011-7/+7
|
* netlist: split plists.h and fix nvcc compile for 10.2 (nw) couriersud2020-05-251-1/+1
| | | | | | | | | plists.h was splitted into plists.h, pmulti_threading.h and ptimed_queue.h. In addition removed plists.h from a number of files it wasn't used in. Certain minor adjustment needed to be made for cuda toolkit 10.1 and 10.2.
* netlist: move configuration entries into netlist namespace. (nw) couriersud2020-05-251-7/+7
|
* netlist: Add tristate support for rom devices. [Couriersud] couriersud2020-05-201-14/+36
| | | | | | | | | 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: improve typesafety for source locations. (nw) couriersud2020-05-171-4/+4
| | | | | | During object creation netlist tracks the source files which provide object creation. This is later used e.g. by nltool to create documentation from source.
* netlist: rewrite rom devices from scratch. [Couriersud] couriersud2020-05-171-33/+10
| | | | | | | | | | | | | Thanks to Aaron Giles who made me think about a different approach. This is a rewrite from scratch for rom devices. It uses a generic template to implement rom devices which is used together with a description struct to define a rom device. This leads to highly efficient code since all information is available at compile time. This is also a step forward to support tristate outputs. All rom devices covered by this approach have tristate or open collector outputs and thus all code changes to support tristate outputs can now be made consistently in one file.
* netlist: code cleanup and development stage tristate [Couriersud] couriersud2020-05-151-1/+2
| | | | | | | | | | 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: Extended functionality and code cleanup. [Couriersud] couriersud2020-05-121-39/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - working macro level parameters - simplified code significantly - fixed a number of hidden issue - dead code removal It is now possible to define netlist level parameters using: static NETLIST_START(chip) DEFPARAM(parameter, 123) RES(R1, $(@.parameter)) .... NETLIST_END() NETLIST_START(main) chip(X1) PARAM(X1.parameter, 1000) ... NETLIST_END() This will pass on 1000 to R1 as a parameter. "@." will resolve to the current namespace. In this case it is X1, thus "X1.parameter. This is during parsing. During evalution, i.e. device creation, $(X1.parameter) is evaluated to 1000. This also means, that global parameters are possible and accessible ... DEFPARAM(P, 234) ... RES(R1, $(P)) or going forward RES(R1, 1000) CAP(C1, 1.0 / $(R1.R)) This opens up the path to more possibilities ... static NETLIST_START(DM9456_DIP) DEFPARAM(MODEL, "74XX") DM9456_GATE(X1) DM9456_GATE(X2) PARAM(X1.MODEL, $(@.MODEL)) PARAM(X2.MODEL, $(@.MODEL)) ... NETLIST_END() NETLIST_START(main) DM9456_DIP(X1) PARAM(X1.MODEL, "LS74XX") ... NETLIST_END() The code also has been prepared to allow something along the lines of LIBENTRY_MODEL(DM74LS00_DIP, DM7400_DIP, "LS74XX") to define a LS version on top of an DM7400_DIP bare TTL implementation. This however will need more efforts to existing devices to honour some timing adjustment in the model definition. It will already honour different output specifications between LS series and bare TTL if connected to analog components.
* netlist: bug fixes and maintenace. (nw) couriersud2020-05-081-8/+24
| | | | | | | - nlwav: remove m_channels completely - nltool: add more comments to static_solvers.cpp - clang make: add -Wunused-private-field Also updated static_solvers.cpp.
* netlist: nlwav - new functionality. [Couriersud] couriersud2020-05-051-6/+1
| | | | | | | | | | | | | nlwav now supports 16 and 32 bit integer format (wav16s, wav32s) as well as 32 bit float format (wav32f). The "wav" format is no longer supported. Added support for high and low pass filtering the wav output. Dynamic volume adjustment (use "-a 0") --hpboost can suppress spikes at the beginning of the file (<10ms) The addition of the float format simplifies debugging significantly since it covers the whole dynamic format. Added nlwav to the local VS 2019 build.
* netlist: Fix "--cmd=listdevices". [Couriersud] couriersud2020-04-281-5/+0
| | | Broken for quite a while this is now working again.
* netlist: More clang-tidy fixes. (nw) couriersud2020-04-281-35/+36
|
* netlist: Fix clang-tidy warnings. (nw) couriersud2020-04-281-1/+1
|
* netlist: rename some camel case names. (nw) couriersud2020-04-191-3/+3
|
* netlist: clang-tidy, srcclean and pedantic warnings fixed. (nw) couriersud2020-04-181-12/+8
|
* netlist: nltool usage and static compile changes. [Couriersud] couriersud2020-04-181-30/+156
| | | | | | | | | | | | | | | | | | | | | 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-1/+25
| | | | | | | | | | | | | | | | | | | 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-7/+7
|
* netlist: Fix some clang-tidy-10 warnings. (nw) couriersud2020-04-051-4/+4
|
* williams.cpp: Improve williams2 color display. [Couriersud] couriersud2020-03-051-5/+1
| | | | | | | | | | | | | | | | Change color levels for williams2 hardware to better color display. Output levels are computed in netlist. These levels are aligned to LTspice modelling I did. Also improved the modelling to do what the actual hardware for mysticm did: Color decoding depends on W13..W11. These are actually flip screen versions of V13..V11. Fixed treatment on Bit0 although not used by the game code. Added R,G,B gain and offset sliders for the williams2 hardware. MAME only supports one setting for all channels. This is not good enough to come close to video recordings found on youtube. Minor changes to nltool to better measure time taken to run a simulation.
* netlist: fix log file option in nltool. (nw) couriersud2020-02-171-11/+1
|
* netlist: Code symplification and bugfixes. (nw) couriersud2020-01-311-32/+34
| | | | | - Fixes performance regression and net_splitter struct. - Fixes nltool time measurements - pstream simplification
* netlist: Code maintenance. (nw) couriersud2020-01-271-0/+16
| | | | | | | | | - 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-17/+13
|
* netlist: code maintenance. (nw) couriersud2020-01-201-13/+13
| | | | | | - 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-8/+4
|