summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/core
Commit message (Collapse)AuthorAgeFilesLines
* Revert "netlist: Remove redundant usages of fatal logger (#15218)" Vas Crabb2026-04-142-0/+3
| | | | | | | | | | This reverts commit 7689ad57e746a33dfeae9299821992e15dd63ea9. The nl_exception doesn't inherently log anything, and whatever catches it may send its log output to a different place to the netlist devices' loggers if it end up logging the message. All the error conditions are supposed to be sent to the netlist devices' own loggers to ensure you have visibility.
* netlist: Remove redundant usages of fatal logger (#15218) FlykeSpice2026-04-132-3/+0
| | | | | * netlist: Remove redundant usages of fatal logger * nl_factory.h: Fix Wunused compiling error
* netlist: include file work (#10096) couriersud2022-07-168-58/+79
| | | | | | - move code to more appropriate locations - apply clang-format to modified files - fixed some cspell errors - Applied emu.h rule.
* netlist: gtrak10 performance and other improvements and fixes (#10032) couriersud2022-07-052-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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: fix bug, prepare for future changes and improve readability (#9947) couriersud2022-06-2015-604/+839
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * netlist: fix bug, prepare for future changes and improve readability - fix a bug where a net processing error may trigger a nullptr access - applied some clang-tidy recommendations - add no_return to plib::terminate - properly encapsulate dynamic_cast usage - more review of noexcept - added a clang-format file. Over time, all source files will be processed with clang-format - Used clang format on a number of files - Rewrote 74174 - all device constructors now use a struct to pass data on to base classes. Neither netlist state nor the name are intended to be used in a constructor. After the base class was constructed, they can be accessed by state() and name(). - The device construction macros can now be removed. Changes to the core will not need to be reflected in constructors. - Change truth table macros so that going forward NETLIST_END and TRUTH_TABLE_END can be replaced by a closing curly brace. netlists can than use curly braces enclosed blocks. - more clang-format - removed some macros completely - all derived classes from base_device_t now don't use macros any longer. - as a result, delegator_t was removed. This class was only used to support macros :-(
* netlist: fix bugs and more cpp instead of macros (#9897) couriersud2022-06-1014-244/+337
| | | | | | | | | | | | | | | | | * netlist: fix bugs and more cpp instead of macros - C-style comments converted to c++ - Fix crash in state saving code when an abort queue processing event is pending. - Fix a bug where a net could be twice in the queue. - Convert more macros to c++ - fixed SUBTARGET=nl build - fixed potential bugs which would allow a terminal to belong to more than one net. This is not possible even for a short time. - moved some member function definitions out-of-class. - moved code out-of-class - added constexpr where appropriate - fixed mamenl build - Cleanup and indentation
* netlist: static solver work and improve code readability (#9841) couriersud2022-05-3013-66/+119
| | | | | | | | | | | - 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-278-22/+21
| | | | | | | | | - 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-2310-41/+44
| | | | | - 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-226-23/+17
| | | | | | | | | | | | | | | | | - 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: Fixes to address PR #9752 and issue #8590 / EMSCRIPTEN (#9773) couriersud2022-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netlist: pointer to member function code - Address PR #9752 and issue #8590 - change comments in ppmf.h - add support for function desciptors (IA64) - sizeof(size_t) may be different on build targets make plib::hash use uint64 to ensure consistent static solver hashes across platforms (EMSCRIPTEN) - Moved constructor and member functions outside the class declaration with the exception of "call" member functions. - Updated comment on accessing RDX - Added more test cases * Removed execution bit on certain files I have separated out the raw processing code into `ppmf.cpp`. I have also taken first steps to clean the abi identification. The code submitted now supports: a) The unknown virtual inheritance case with specific code for MSVC for simple (i.e. scalar, void, reference, pointer) return types using the optimized code. This is the test case only supported under MSVC and which should return 7. Please have a look at the code. Basically m_vptr_offset is an index into a pointer table. It needs to be multiplied by `sizeof(void *)`. b) If you enable PPMF_EXPERIMENTAL complex return type member functions for MSVC will also use the optimized code path. This is explained in detail in the code in ppmf, including caveats and possible solutions. c) Enabling PPMF_USE_MAME_DELEGATES will use `src/lib/util/delegate.h` as a replacement for `ppmf.h`. This allows to run the same tests (`nltool -c tests` from standalone build) as for the ppmf code. d) The code now also supports `clang-cl` e) sizeof(size_t) may be different on build targets. Make plib::hash use uint64 to ensure consistent static solver hashes across platforms. This fixes loading static solvers (if enabled) on EMSCRIPTEN.
* netlist: Improved PPMF target support and test coverage. (#9752) couriersud2022-05-152-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-3/+5
| | | | nvcc 11.3 (latest cuda tools) has an issue with some auto x(some variable) declarations.
* netlist: standalone makefile and prototype modifications (#9708) couriersud2022-05-084-432/+422
| | | | | | - update netlist makefile to more recent compilers - prototypes for NETLISTs in macros are now created create_devinc.py - apply ctidy recommendations - Python None in create_device.py
* netlist: more c++, less macros (#9706) couriersud2022-05-071-12/+4
| | | | - Reduce the use of macros by converting defines into c++ constants. - more minor code clean up.
* netlist: Relicensing of the GPL code to BSD-3 with the blessing of the Olivier Galibert2021-03-0916-16/+16
| | | | | | | | | | 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.
* netlist: simplify code. couriersud2020-10-022-8/+6
|
* netlist: move core_terms to netlist_state. couriersud2020-10-022-20/+22
| | | | | * These are used during creation and reset only. No need to maintain them on net_t level.
* netlist: Convert driver filenames to lower case. couriersud2020-09-301-1/+3
|
* netlist: Fix a net splitting issue with four term devices. couriersud2020-09-302-4/+17
| | | | | | | | | | * Under cirtum circumstances the splitter would create "ghost" solvers consisting of terminals already used in another and complete solver. This may impact all netlist which use opamps and thus is committed early in the cycle. * This commit adds functionality to instruct the splitter code to include terminals which will not create matrix elements into the parsing of net groups for solvers.
* netlist: Remove "extended validation mode" couriersud2020-09-281-21/+1
| | | | * No longer added value.
* Disable SOUND_DEBUG for non-debug builds, and srcclean Vas Crabb2020-09-271-2/+2
|
* netlist: minor code cleanup. couriersud2020-09-257-74/+81
| | | | | | * a number of minor fixes leading to an increase of 570% to 588% on pongf. * admittedly micro optimization. * Includes some comments why certain decisions have been taken.
* netlist: clearly identify void * casts. couriersud2020-09-241-2/+2
|
* netlist: Improve queue handling documentation in code. couriersud2020-09-242-4/+43
| | | | | | | * Document that for performance reasons pushes to queue are allowed even if they may not change state and are filtered out during process. * Provide alternative code path. This is currently not used.
* netlist: code refactoring couriersud2020-09-245-15/+15
| | | | | | * use default move and copy constructors * various minor edits like adding noexcept * removed a lot of inline keywords - you can't beat the compiler
* netlist: optimize headers. couriersud2020-09-171-19/+0
| | | | * where possible rely on forward declarations to optimiuze compile time.
* netlist: add listmodels command to nltool. Couriersud2020-09-091-0/+8
| | | * nltool --help is your friend.
* netlist: Implement voltage dependent timing for CD4006 couriersud2020-09-091-0/+15
|
* netlist: code maintenance and performance optimizations. Couriersud2020-09-053-27/+22
| | | | | | | | | | | * 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: more standalone makefile changes couriersud2020-08-241-3/+2
| | | | | | | | | | | | * On windows a simple make is now enough to build. * Devices, macro and tests folders now included with wildcard. * No more makefile changes if a device is added. * Moved nld_devinc.h to generated folder * Added to python scripts to create nld_devinc.h and lib_entries.hxx * TEST MODE: these two files are created automatically but are not used currently. Once I get feedback that the python scripts work in different environments I will remove header files from devices and macro and start using these files in production.
* netlist: clang tidy include order fixes. couriersud2020-08-242-2/+2
|
* netlist: build system improvements couriersud2020-08-241-11/+2
| | | | * Medium term this will significantly ease adding devices to netlist.
* netlist: References to subdevices should be symbolic. couriersud2020-08-231-1/+0
| | | | | * Exposing sub-device members is not best practice. * The need for sub-devices is a clear indication that a netlist language implementation would be a better solution.
* netlist: fix clang build. couriersud2020-08-222-7/+6
|
* netlist: Add NETLIB_DELEGATE_NOOP() couriersud2020-08-223-5/+6
| | | | | * This should be used for inputs which do not need a handler. * Examples are data inputs which are only accessed on a clock change.
* netlist: commit missing files in last commit. couriersud2020-08-122-0/+353
|
* netlist: more include untangling. couriersud2020-08-121-0/+7
| | | | * nl_base.h now basically only includes files from core. * all headers in core compile on their own.
* netlist: improve parsing performance couriersud2020-08-121-0/+19
| | | * preparational work for easier device addition.
* netlist: more header file separation couriersud2020-08-087-131/+437
|
* netlist: Refactored pokenizer. couriersud2020-08-061-0/+16
| | | | | | | | | * Separated tokenizing and reading of tokens. * This enables caching of parsing results on the token level. * Implemented caching of token stream. * Overall this significantly improves parsing performance (~10x) * Next step towards a bare-bone nltool which does not depend on macro devices.
* netlist: source stream refactoring couriersud2020-07-281-2/+3
| | | | | * This is an infrastructure change to enable better error reporting including file/source and line numbers in the future
* netlist: further nl_base.h splitting into headers in core subdir. couriersud2020-07-2810-109/+1157
|
* netlist: separate nl_base.h into separate header files. couriersud2020-07-255-0/+1115
| | | | | | * This clean-up exercise will hopefully make it easier to navigate the core code. Another long term goal is to further straighten the object model.
* netlist: code maintenance and bug fixes. couriersud2020-07-011-0/+323
* 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