Commit Graph

37 Commits

Author SHA1 Message Date
couriersud
f60ed79ed6 netlist: code maintenance. (nw)
- more doxygen \file annotations
- moved MAINCLOCK back to nl_base.h
- remove some const from simple function parameters
2019-11-10 01:18:57 +01:00
couriersud
db0dbeaea5 netlist: improve readability. (nw)
Renamed cast member of the constants struct to magic to clearly identify
magic numbers.

Introduced nlconst struct inheriting from plib::constants<nl_fptype> to
make code better understandable.
2019-11-02 23:39:24 +01:00
couriersud
77ea61bac7 netlist: add RELTOL/VNTOL solver parameters. Type safety. [Couriersud]
The newly added RELTOL and VNTOL parameters implement Newton convergence
checks comparable following other SPICE implementations.
The ACCURACY solver parameter now is only used for convergence checks in
iterative solvers.

In addition, type safety was significantly improved and a lot of "magic"
numbers are identifiable now.
2019-11-02 22:25:11 +01:00
couriersud
6c075e602c netlist: maintenance and simplifcation. (nw)
- 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
2019-10-31 18:39:09 +01:00
couriersud
beab34006a netlist: code maintenance. (nw)
Simplification, remove some trampolines.
2019-10-30 19:10:40 +01:00
couriersud
a89b7d194d netlist: mame netlist reorganization. [Couriersud]
- moved netlists out of driver code into audio/ or machine/ as
nl_xxx.cpp files.
- identified and documented extended validation
- updated arcade, mess and nl targets
2019-10-13 16:45:30 +02:00
couriersud
6b96f7ba60 netlist: Add power terminals to most logic devices.
This fixes an over simplification. Logic devices implicitly assumed that
GND/VDD actually is connected to GND(i.e. 0V). There is no immediate
benefit from this change. It is a preparation for the future
scalability. Now all power terminals (typically 7/14, 8/16) have to be
explicitly connected to the supply rails.

Also added a validation mode to the netlist core. This is not
intended for running, but solely to better indentify pins which
are not properly connected.
2019-04-21 12:05:44 +02:00
couriersud
6392b345e6 netlist: scalable error messages.
This approach uses functors for logging messages.
2019-04-18 01:18:01 +02:00
couriersud
e7652e14d6 netlist: Improve validation code.
Adjust warning levels and fix a number of topics identified.
2019-04-16 01:49:44 +02:00
couriersud
e4ff0d3322 netlist: Improved MOS transistor model. [Couriersud]
This is a significant improvement to the MOS transistor model. It adds
modelling of the Meyer capacitance model.
This is a somewhat academic addition since the effects occur on a
nanosecond time scale and have a huge impact on performance. I plan to
make the capacitance model selectable. Both on a model level as well as
by introducing a global solver parameter.
The model delivers comparable results to LTSpice.
2019-03-29 19:40:39 +01:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
couriersud
d00de16b41 netlist: analog readability refactoring. (nw)
Change the sign of go (or in other terms a12 and a21 matrix stencil
elements). This should make further optimization of matrix population
easier.
In addition hopefully improve the readability of the code by sacrifying
overloads for more verbose member names.
2019-02-25 22:11:04 +01:00
couriersud
a65390cad5 netlist: Fix relative include paths and a conflict. (nw)
nl_types.h is part of libc++. Any project with a file with the same name
on the include path just fails to compile. Renamed to nltypes.h
2019-02-23 18:54:29 +01:00
couriersud
9d8cb783e3 netlist: more core guidelines work. (nw) 2019-02-09 23:07:27 +01:00
couriersud
5ea6e079f3 netlist: constants are now constexpr functions. (nw) 2019-02-09 00:21:14 +01:00
couriersud
3b899b86e6 netlist: Refactoring after adding clang-tidy support to netlist makefile
- convert macros to c++ code.
- order of device creation should not depend on std lib.
- some state saving cleanup.
- added support for clang-tidy to makefile.
- modifications triggered by clang-tidy-9.
2019-02-07 21:54:11 +01:00
couriersud
6a7c3a8079 netlist: align solver calls. (nw) 2019-02-04 23:17:18 +01:00
couriersud
b952577370 netlist: remove trampoline code. (nw) 2019-02-01 08:45:32 +01:00
couriersud
b4ba8dc552 netlist: code maintenance and fixing kidniki ... (nw)
to run at acceptable speed again.
2019-02-01 02:07:48 +01:00
couriersud
a527525e52 netlist: More run/setup separation. (nw)
Still some distance ahead in properly separating execution and setup.
2019-01-18 00:58:45 +01:00
couriersud
c89439dd23 netlist: refactored netlist creation. (nw)
This is an effort to separate netlist creation from netlist execution.
The primary target is to avoid that code which will only run during
execution is able to call setup code and thus create ugly hacks.
2019-01-15 23:42:16 +01:00
couriersud
0a2d4a256d Fix issues identified by Vas and LordKale4:
- made local netlists in Cheeky Mouse static
- replace stdlib rand by 16 bit galois lfsr

(nw)
2017-05-27 22:17:35 +02:00
couriersud
5c4b7cfef8 Clean up net_t interface and increase readability. (nw) 2017-02-22 02:04:01 +01:00
couriersud
0716d96514 Reworked truthtables a bit.
- Moved 9312 and 74279 to ttl macro library.
- Renamed TTL_9312_* to DM9312. This is more appropriate.
- Fixed a number of warnings from latest ubuntu clang-5.0.
2017-02-17 20:10:15 +01:00
couriersud
ab17457707 Make sure netlist includes are not found directly on include path.
Instead, they have to be prefixed by "netlist/". Removed unneeded link
librariers for nltool and nlwav along the way. (nw)
2017-02-10 21:52:09 +01:00
couriersud
c713f9ed1d Separate include file usage for netlist.
Device implementations (all cpp files in netlist/devices) now should
only include nl_base.h. 
Netlist implementation sources should only include "net_lib.h". 
Refactored netlist.h and netlist.cpp to avoid namespace congestion in
netlist.h.
Fixed VC2015 build. (nw)
2017-01-29 15:47:12 +01:00
couriersud
5c88873a87 Cleanup of includes. (nw) 2017-01-27 15:22:17 +01:00
couriersud
ba03118b09 More netlist refactoring:
- Remove virtual from some destructors and make them protected. 
- Various cleanups.
- Small performance improvement. 
- Fixed some inconsistencies. 
- More c++ refactoring. (nw)
2017-01-25 22:17:48 +01:00
couriersud
4d15501a30 Netlist: code refactoring
Make streams provide binary access only. Use putf8_reader and
putf8_writer to actually access streams. Replace some char * parameters
with pstring where appropriate. Minor code refactoring and move
functionality were it belongs. (nw)
2017-01-20 22:29:23 +01:00
couriersud
1ae3e29ea3 Assume string literals are UTF8 in netlist code.
At the same time, any char pointer has to be explicitly converted to
pstring by specifying an encoding. Not yet optimal, but certainly better
than what was there before. 
Removed unneeded methods from pstring. (nw)
2017-01-20 22:20:36 +01:00
couriersud
167d8405ec Converted warnings and fatal log messages to constants.
Also refactored some code to ease the exercise. (nw)
2017-01-20 22:20:35 +01:00
couriersud
ef8b7ccb6b Core refactoring
- connect_late ==> connect
- register nets where they are created
2017-01-14 16:35:55 +01:00
couriersud
02c3f45bff Fix clang "-Wno-weak-vtables" warnings in netlist source. Refactored
code along the way. (nw)
2017-01-05 01:43:31 +01:00
couriersud
0eefe5f02d cstr() ==> c_str() (nw) 2016-12-30 23:42:24 +01:00
couriersud
1983580e26 Some preparation for future changes on proxies and chip families. (nw) 2016-12-28 13:48:49 +01:00
couriersud
63f4e52dae Moved proxy code into separate file. (nw) 2016-12-28 13:48:48 +01:00