summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/netlist.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netlist: source stream refactoring couriersud2020-07-281-9/+13
| | | | | * This is an infrastructure change to enable better error reporting including file/source and line numbers in the future
* netlist.cpp: Fix a crash if an exception happened during validation. couriersud2020-07-281-1/+2
|
* speaker.cpp: Add new option -speaker_report <n> to help devs tune volume (#6995) Aaron Giles2020-07-271-4/+6
| | | * Add new option speaker_report to report clipping and other statistics after each session. This replaces the previous compile-time define and offers more detail.
* netlist: remove soft reset support. couriersud2020-07-051-4/+18
| | | | | | | | * 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.
* various devices and drivers: removed superfluous semicolons (nw) Ivan Vangelista2020-06-291-1/+1
|
* netlist: include file refactoring. couriersud2020-06-281-7/+10
| | | | | | | | 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 vs2019 build Frank Palazzolo2020-06-261-1/+1
|
* srcclean and cleanup (nw) Vas Crabb2020-06-211-3/+3
|
* netlist: Fix copy elusion bug on OSX and clang < 8 [AJR, Couriersud] couriersud2020-06-141-14/+6
| | | Solution discussed with AJR in chat.
* netlist: Performance improvement and refactoring. [Couriersud] couriersud2020-06-131-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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: fix win32 compile (nw) couriersud2020-06-101-4/+6
| | | ... and all targets without INT128 support.
* netlist: code maintenance. (nw) couriersud2020-06-081-19/+18
| | | | | | - 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: remove more macro usage, fix win float exceptions. (nw) couriersud2020-06-061-6/+2
|
* netlist: Reduce macro usage and make use of pstring utf8. (nw) couriersud2020-06-061-0/+10
|
* netlist: move multiparameter streaming into nl_interface.h (nw) couriersud2020-06-011-246/+136
|
* netlist: device factory enhancements. (nw) couriersud2020-06-011-143/+71
| | | | | | | | | Factory elements can now pass additional parameters to device constructors. This makes the design of interface objects like analog callbacks easier. The change also allowed to remove some "deep" calls into the core from the MAME interface in netlist.h
* netlist: debugger - use callbacks to access terminals. (nw) couriersud2020-06-011-2/+41
|
* netlist: small memory system cleanup. (nw) couriersud2020-05-251-5/+5
|
* netlist: move configuration entries into netlist namespace. (nw) couriersud2020-05-251-4/+4
|
* netlist: Better integretation of INT128. (nw) couriersud2020-05-241-6/+6
| | | | Also some minor optimisations bringing pong and breakout to previous performance.
* netlist: Fix OSX compile. (nw) couriersud2020-05-221-3/+3
|
* netlist: simplify factory call structure. (nw) couriersud2020-05-201-3/+6
| | | | | This change will make it a lot easier to add enhanced functionality to the factory infrastructure. Using integral constants also improves linking stability.
* netlist: improve timing accuracy for sound devices. [Couriersud] couriersud2020-05-201-38/+117
| | | Better alignment between netlist_time and attotime
* netlist: improve typesafety for source locations. (nw) couriersud2020-05-171-3/+3
| | | | | | 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: code cleanup and development stage tristate [Couriersud] couriersud2020-05-151-20/+16
| | | | | | | | | | 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-42/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* appease vs2019_clang with llvm 10.0 smf-2020-04-251-3/+3
|
* netlist: rename some camel case names. (nw) couriersud2020-04-191-4/+4
|
* netlist: nltool usage and static compile changes. [Couriersud] couriersud2020-04-181-0/+8
| | | | | | | | | | | | | | | | | | | | | 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-3/+5
| | | | | | | | | | | | | | | | | | | 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-5/+5
|
* netlist: Parameters evaluated when netlist is created. [Couriersud] couriersud2020-01-291-5/+5
| | | | | | | | | | | | Parameters are now passed to the netlist core as strings. During netlist creation they are evaluated as functions. This opens the path to parameters on subdevice level. Examples: PARAM(device.XY, (1+2*0.005)) RES(R1, 2.05*RES_K(1)+1) In addition the commit contains dead code removal.
* srcclean, manual adjustments (nw) Vas Crabb2020-01-261-2/+2
|
* netlist: fix overclocking. (nw) couriersud2020-01-161-68/+72
|
* netlist: Increase resolution to 100 pico seconds. [Couriersud] couriersud2020-01-151-25/+43
| | | | | | | | Increase the time resolution from 1 nano second to 100 pico seconds. Make sure that icount and netlist internal time are better synched by tracking the remainder of the division. Fixed the netlist sound device. There is a one sample overflow every 13 seconds at 48000 Hz due to integer truncation which is now ignored. Added more doxygen documentation.
* netlist: Code maintenance. (nw) couriersud2020-01-121-21/+20
| | | | | | | | | 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.
* srcclean and indentation cleanup (nw) Vas Crabb2019-11-241-1/+1
|
* netlist: more code maintenance. (nw) couriersud2019-11-161-3/+11
| | | | | | - refactor error messages. - Fix some drivers to cope with outputted added my the mame driver for video and sound. - Fix validation.
* 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: Proxy and power terminal hack removal. [Couriersud] couriersud2019-11-141-0/+3
| | | | | | | | | | | | | | | | | | - Devices ttlhigh and ttlhow are no longer automatically created. - All logic input devices (e.g. TTL_INPUT, LOGIC_INPUT) now need to have their power terminals (VCC, GND) connected. This opens the route for more appropriate proxy devices but comes at a cost. If the connections are omitted your circuit will not work as expected. Example: LOGIC_INPUT(I_SD0, 1, "AY8910PORT") NET_C(VCC, I_SD0.VCC) NET_C(GND, I_SD0.GND) - Updated all netlists. - Removed proxy information from terminal objects. This was replaced by a lookup hash whose life-span does not exceed netlest setup. These changes enable the removal of a number of hacks from the source going forward.
* netlist: code maintenance. (nw) couriersud2019-11-131-67/+67
| | | | | | - move memory pool to netlist_state_t removing one static allocation. - add memory allocation stats to verbose output - nl_assert no longer throws, first step to remove NL_EXCEPT macro.
* Make many device_execute_interface functions noexcept, including the ↵ AJR2019-11-091-2/+2
| | | | | | | | "information" overrides. This also covers several time-related functions in attotime, running_machine and emu_timer. (nw) m6805: Calculate min_cycles and max_cycles once at device_start time (Nw) attotime: Add as_khz and as_mhz (nw)
* netlist: Minor optimizations. (nw) couriersud2019-11-051-2/+2
|
* netlist: more consistent exception handling. (nw) couriersud2019-11-051-4/+8
| | | | Still not optimal, but better than what we had previously. No exception logging comes closer.
* netlist: Completed __float128 support. [Couriersud] couriersud2019-11-031-2/+2
| | | | | | Both compiling the core and the shaders with __float128 now work. The support was added to be ready to deal with academic edge cases. Performance drops to 10% of double - thus disabled by default.
* netlist: code maintenance and bugfixes. (nw) couriersud2019-11-011-0/+2
| | | | - fixed a bug in the parray constructor - replaced NL_NOEXCEPT with noexcept where appropriate
* netlist: Compile with float/double floating point. [Couriersud] couriersud2019-10-311-3/+2
| | | | | | | | | | | Added ability to compile using float instead of double. Specifically the the solver as well as the infrastructure now can have their own floating point type. Currently this is only an academic exercise since numerically demanding circuits like kidniki only work with double/double support. Using float here is pushing numerical stability over the limits. The long term design goal is too have the matrix type (double/float) being a parameter.
* netlist: maintenance and simplifcation. (nw) couriersud2019-10-311-14/+14
| | | | | | | - 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
* Spring cleaning: Vas Crabb2019-11-011-1/+1
| | | | | | | | | | | | * Changed emu_fatalerror to use util::string_format semantics * Fixed some incorrectly marked up stuff in build scripts * Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now) * Fixed memory leaks in Xbox USB * There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it * Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave) * Got rid of device_slot_card_interface as it wasn't providing value * Added a helper template to reduce certain kinds of boilerplate in slots/buses * Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
* netlist: code maintenance. (nw) couriersud2019-10-301-1/+1
| | | | Simplification, remove some trampolines.