summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/prg
Commit message (Collapse)AuthorAgeFilesLines
* netlist: Check for mismatched number of parameters passed to device macros ↵ FlykeSpice2026-04-201-1/+1
| | | | | | at compile time. (#15224) * netlist/nl_setup.cpp: Use C++20 __VA_OPT__ to simplify device registration code. * netlist/build/create_devinc.py: Generate check for correct number of arguments.
* netlist: gtrak10 performance and other improvements and fixes (#10032) couriersud2022-07-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | - added support parameter FORCE_TRISTATE_LOGIC on mk28000 - add system device SYS_PULSE to generate pulse based on input changes parameters are delay, pulse width, input polarity and output polarity - add USE_SPEED_HACKS define to gtrak10 to enable the use of the above Brings gtrak10 from 18% to 120%. - Improved interlaced video support in fixfreq.cpp Added two interlace modes: progressive and interlaced which can be selected in machine configuration. - more clang format work - rename link to connection - introduced typed aliases. This information may be used later to rewrite netlists. - added a three terminal base device This will allow the analog code to be more easily comparable to literature about MNA (Modal node analysis). BJT code is now a lot better readable. - fix doxygen consistency - added an example for a cmos inverter based on NMOS/PMOS fets. - TRUTHTABLE_START was renamed to TRUTH_TABLE - truth tables are now enclosed in braces - netlists are now enclosed in braces - TRUTHTABLE_END() and NETLIST_END() removed from files - Fixed static solver script - Add file path to includes in nltool
* netlist: static solver work and improve code readability (#9841) couriersud2022-05-302-379/+462
| | | | | | | | | | | - nltool: Added support for building individual static solver files. - Added pre-built documentation files for nltool and nlwav. - plib: Extended typed_version to have patchlevel as well. - plib: Compile more of ppmf.h with nvcc. - create_devinc.py: Add include guards to the generated files. - makefile: Recreate generated files when python code has changed. - Reduced nld_base.h usage in the core. - <oved extern template class declarations to where they belong. - Generally improved code readability and fixed a lot of issues cspell reported.
* netlist: palloc now uses c++17 alignment aware operator new. (#9834) couriersud2022-05-271-1/+1
| | | | | | | | | - Added more documentation to palloc.h - Made the use of allocation arenas more transparent throughout code - palloc now uses c++17 alignment aware operator new. This required further changes to the arena_deleter object to track alignment and size of allocated objects to avoid the use of alignment and size of base classes in case a unique_ptr was cast to a unique_ptr of the base class.
* netlist: Address comments from PR #9794, partially fix issue #9801 (#9805) couriersud2022-05-232-3/+3
| | | | | - added cstddef to includes in ppmf.h - more explicit comments in ppmf.h - Fixed more typos and improved readiability
* netlist: More c++, less macros, added support for cspell (#9794) couriersud2022-05-222-1/+5
| | | | | | | | | | | | | | | | | - More c++, less macros * Significantly reduced the use of unused_var and replaced it with [[maybe_unused]] * use enum class in ppmf.h - Changes to testing code in ptest.h * Catch exceptions in more places * The verbosity of the output can now be controlled * Display of test stats totals - added support for cspell - fixed various typos - fixed SUBTARGET=nl build - fixed more file permissions - srcclean and add fix_permissions target to netlist makefile
* netlist: Improved PPMF target support and test coverage. (#9752) couriersud2022-05-151-4/+4
| | | | | | | | | | This addresses most of the issues described in #8590. * Fixed standalone Visual Studio 2019 builds, including support for clang toolchain. * Added static stub to PMF to support MSVC ABI. * Better aligned ppmf syntax with MAME's delegate syntax. * Add tests/test_ppmf*.cpp testing examples given in #8590. Also worked around issues some versions of Apple clang have with 5aaae19230bd39dda6766641672f57276a3f9ea1.
* netlist: Fixed standalone nltool building with nvcc. (#9731) couriersud2022-05-111-1/+1
| | | | nvcc 11.3 (latest cuda tools) has an issue with some auto x(some variable) declarations.
* Drop unnecessary executable permissions (#9257) Julian Sikorski2022-02-031-0/+0
|
* netlist: Relicensing of the GPL code to BSD-3 with the blessing of the Olivier Galibert2021-03-092-6/+6
| | | | | | | | | | 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-282-2/+2
| | | 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: move to generated header and link support files files. couriersud2020-09-121-2/+2
| | | | | | | | | | | | | * Removed device and macro header files. * All of those can be generated automatically so going forward there is no need for these any longer. * Introduced the modules concept. Modules are netlists for which automatic lib entries are generated. * Going forward you just store them in macro/modules and they will be automatically registered as device elements. * You need to do a "make generated" is src/lib/netlist/build * Some_device.cpp still needs to be added to netlist.lua * Added documentation on how to add devices to netlist. * Please refer to adding_devices.md for more information.
* netlist: add listmodels command to nltool. Couriersud2020-09-091-1/+47
| | | * nltool --help is your friend.
* netlist: code maintenance and performance optimizations. Couriersud2020-09-052-75/+63
| | | | | | | | | | | * 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-252-15/+15
| | | | | | | | | * 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-282-5/+6
| | | | | | | | 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-281-3/+1
| | | | | | * decrease use of reinterpret_cast. * change some defaults for better ttl game optimization. * various code cleanup.
* 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-132-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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-082-24/+26
| | | | | | - 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-062-11/+14
|
* netlist: clang-tidy, header order fixes. (nw) couriersud2020-06-012-9/+9
|
* netlist: split plists.h and fix nvcc compile for 10.2 (nw) couriersud2020-05-252-5/+4
| | | | | | | | | 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-082-16/+28
| | | | | | | - nlwav: remove m_channels completely - nltool: add more comments to static_solvers.cpp - clang make: add -Wunused-private-field Also updated static_solvers.cpp.
* Fix clang nltool build [-Werror,-Wunused-private-field] (nw) AJR2020-05-071-2/+2
|
* netlist: nlwav - new functionality. [Couriersud] couriersud2020-05-052-67/+230
| | | | | | | | | | | | | 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 two nlwav bugs. (nw) couriersud2020-05-051-21/+34
| | | | First one corrupted wav files produced on windows. The second one produced wrong sample integration results.
* netlist: Removed more magic numbers from the code. (nw) couriersud2020-05-011-1/+1
|
* 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
|