summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Removed some unnecessary backslash line continuations. (#12047) amameuser2024-02-211-1/+1
| | | | | | * Removed unnecessary preprocessor line continuations from C++ code. * Use parentheses to avoid need for line continuations in expressions in Python code. * Removed line continuations at the end of lists in makefiles. * cpu/m68000: Regenerated C++ source files.
* netlist: include file work (#10096) couriersud2022-07-161-3/+3
| | | | | | - move code to more appropriate locations - apply clang-format to modified files - fixed some cspell errors - Applied emu.h rule.
* netlist: fix bug, prepare for future changes and improve readability (#9947) couriersud2022-06-202-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-102-9/+10
| | | | | | | | | | | | | | | | | * 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-303-8/+204
| | | | | | | | | | | - 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: Address comments from PR #9794, partially fix issue #9801 (#9805) couriersud2022-05-234-4/+4
| | | | | - 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-223-12/+39
| | | | | | | | | | | | | | | | | - 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-192-1/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+431
| | | | | | | | | | 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.
* -ui: Made zoom controls a bit more intuitive. Vas Crabb2021-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The UI controls are described as zoom in/out, but they had the opposite effect on the palette and tile viewers. That has been changed to make them consistent with the tilemap viewer. * Made the default zoom key not act as a toggle. People are familiar with the function of Ctrl+0/=/- in web browsers, so making them behave similarly in MAME should make it more approachable. Also added the default zoom key to the relevant documentation page. * Implemented the default zoom key for the palette and tile viewers. * In the tilemap viewer, if the view is in default expand to fit mode, zoom in/out starting from the actual zoom ratio. Once again, this behaves more like the zoom controls in a web browser displaying an image so it should be more intuitive. * Made more messages from the tilemap viewer localisable. -util/zippath.cpp: Fixed MT08074. * There were multiple issues at play here. After #8443 was applied, is_root was simply never returning true on Windows, as OSD_WINDOWS isn't actually defined outside libosd and libocore. This caused phantom parent items to appear in disk roots on Windows, but it meant that the check in zippath_resolve would always fail so the trailing backslash would be trimmed. Fixing the macro test in is_root meant the trailing backslash from C:\ would no longer be trimmed, which caused the stat in zippath_resolve to fail. -bigbord2.cpp: Hooked up floppy DRQ that had somehow got lost. -Reduced tag map lookups in several drivers and devices. -util/coretmpl.h: Removed an overload of bitswap that can be avoided using if constexpr. -Added doxygen comments to some classes, and fixed several doxygen warnings. -util, osd: Test for _WIN32 rather than WIN32. * In C++17 mode, WIN32 is no longer a predefined macro, although various things in 3rdparty define it to maintain legacy support. We're better off moving forward anyway for when WIN32 disappears entirely. (WIN32 is not a reserved name, while _WIN32 is, starting with an underscore follwed by an uppercase letter.)
* netlist: Relicensing of the GPL code to BSD-3 with the blessing of the Olivier Galibert2021-03-092-2/+2
| | | | | | | | | | 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: catch parenthesis count mismatch in formulas. couriersud2020-10-031-1/+6
|
* netlist: code maintenance and performance optimizations. Couriersud2020-09-051-0/+19
| | | | | | | | | | | * 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: build system improvements couriersud2020-08-241-2/+2
| | | | * Medium term this will significantly ease adding devices to netlist.
* netlist: further nl_base.h splitting into headers in core subdir. couriersud2020-07-281-1/+1
|
* netlist: unit test macros now have a "P" prefix. couriersud2020-07-101-12/+13
| | | | | * will allow to use both googletest and Catch frameworks. * on unexpected std::exception include what() in error message.
* netlist: pfunction now supports unary minus operators. couriersud2020-07-051-13/+24
|
* netlist: Add basic unit testing support. couriersud2020-07-051-0/+43
* 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.