summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_setup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netlist: Disable dangerous optimization. couriersud2020-08-011-0/+3
| | | | | * This was an over-aggressive optimization. Now prints an info and recommends to comment out if appropriate.
* netlist: Fix an issue during proxy hookup. couriersud2020-07-281-11/+17
| | | | | * Add cd4053 to netlist.lua * Recreated nld_devinc.h
* netlist: source stream refactoring couriersud2020-07-281-11/+15
| | | | | * This is an infrastructure change to enable better error reporting including file/source and line numbers in the future
* netlist: necessary changes towards runtime processing of macro directory couriersud2020-07-281-3/+3
|
* netlist: sub solvers now have their own parameter set. couriersud2020-07-251-10/+17
| | | | | | | | | | * Example: PARAM(Solver.Solver_0.METHOD, "GMRES") * Will use the GMRES solver instead of the default MAT_CR solver. * Same applies to all Solver parameters. * Please use with care. If you change your netlist (e.g. using frontiers) the allocation of nets to solvers and the number of solvers may change. Thus this type of tweaking should only be used after the netlist completely works.
* netlist: code maintenance. couriersud2020-07-161-5/+5
| | | | | | * more handler alignment * dead code removal * remove update calls which do nothing
* netlist: Always take power pin names from logic family. couriersud2020-07-121-1/+1
| | | | | * Default nmos power pins to VCC and GND. * MOS uses VDD/VSS - update gamemachine netlist.
* netlist: fix power pin names for CMOS devices. couriersud2020-07-121-3/+23
| | | | | | | | | * For truthtable cmos devices the power pin names will now be set according to the logic family. * Fix some issues for CD4538 * Change "already connected" warning to info level. Some ICs (CD4538) connect pins internally to GND and the schematics again externally. This will cause this info to be printed. The warning now is a lot more verbose.
* netlist: code maintenance and bug fixes. couriersud2020-07-011-12/+29
| | | | | | | | | | | * 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: add hints for outputs not connected. [Couriersud, Aaron Giles] couriersud2020-06-281-44/+54
| | | | | | | | | | * Logic and analogue outputs can now be flagged as "NC" (not connected). * Example: "HINT(IC13.4, NC)". * This will suppress info messages to be logged. * The HINT must apply to an existing terminal. HINTs for non-existing terminals are treated as fatal errors. * Terminals and logic inputs not connected are still treated as warnings. These need though and a proper fix.
* netlist: Fix parameter value resolution on rom devices. couriersud2020-06-281-1/+8
| | | | * also simplifiy a return. * document parameter value resolution.
* netlist: Fix copy elusion bug on OSX and clang < 8 [AJR, Couriersud] couriersud2020-06-141-11/+4
| | | Solution discussed with AJR in chat.
* nl_setup.cpp: Fix for some compilers not being CWG 1579 compliant (nw) AJR2020-06-131-2/+9
|
* netlist: Performance improvement and refactoring. [Couriersud] couriersud2020-06-131-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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: code maintenance. (nw) couriersud2020-06-081-10/+10
| | | | | | - 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-061-1/+1
|
* netlist: clang-tidy, header order fixes. (nw) couriersud2020-06-011-3/+3
|
* netlist: device factory enhancements. (nw) couriersud2020-06-011-1/+0
| | | | | | | | | 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: split plists.h and fix nvcc compile for 10.2 (nw) couriersud2020-05-251-3/+3
| | | | | | | | | 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: small memory system cleanup. (nw) couriersud2020-05-251-4/+4
|
* netlist: move netlist parsing where it belongs. (nw) couriersud2020-05-251-1/+8
|
* netlist: improve performance. [Couriersud] couriersud2020-05-241-0/+2
| | | | | | | pongf now peaks at 589% compared to 570% before. Amongst a number of improvements in nl_base.h, the 7493 was touched. Also has some code cleanup and hopefully faster compilation due to extern template declarations.
* netlist: move penum into own header file. (nw) couriersud2020-05-241-2/+4
|
* netlist: various clang-tidy-11 fixes. (nw) couriersud2020-05-241-2/+2
|
* netlist: Add tristate support for rom devices. [Couriersud] couriersud2020-05-201-30/+35
| | | | | | | | | 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: simplify factory call structure. (nw) couriersud2020-05-201-6/+4
| | | | | 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 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: Add working 74125 and 74126 implementations. [Couriersud] couriersud2020-05-171-0/+22
| | | | | | | | | | | These tristate buffers natively support tristate outputs. For use cases with fixed enable inputs the devices support a parameter FORCE_TRISTATE_LOGIC which if being set to 1 makes the device behave like a logic output. Added additional syntax and consistency checks for tristate outputs. Updated the example and added dip implementations including documentation.
* netlist: rewrite rom devices from scratch. [Couriersud] couriersud2020-05-171-2/+6
| | | | | | | | | | | | | 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-57/+94
| | | | | | | | | | 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-135/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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: more family/model alignment. (nw) couriersud2020-05-101-32/+60
| | | | Also remove dead code and dead comments.
* netlist: logic devices now support model parameter. [Couriersud] couriersud2020-05-101-18/+32
| | | | | | This a big forward to allow reuse of code. Still a longer way to go but the foundation there. Also brings quite a number of simplifications and dead code removal.
* netlist: provide more information for warning ... [Couriersud] couriersud2020-05-101-0/+39
| | | | on connecting two terminals already on the same net.
* netlist: Fix some tidy warnings. (nw) couriersud2020-05-031-1/+15
| | | moving over to clang-tidy-11 and enabling more warnings.
* netlist: Unknown parameters really should be fatal. [Couriersud] couriersud2020-05-011-6/+22
| | | | Unknown parameters like Solver.ABCD now will cause a fatal error to be generated.
* netlist: Removed more magic numbers from the code. (nw) couriersud2020-05-011-1/+1
|
* netlist: more code maintenance. (nw) couriersud2020-04-281-12/+2
| | | | | | | Make some calls private which were public before. Eliminate functions which would be executed only once. Make terminal reference functions in twoterm.h return const. Clearly identify the use cases which need a non-const ref to terminals.
* netlist: improve const-awareness and tidy changes. (nw) couriersud2020-04-281-17/+17
| | | | Identified a number of code locations which could accept const arguments.
* netlist: More clang-tidy fixes. (nw) couriersud2020-04-281-12/+12
|
* netlist: Fix clang-tidy warnings. (nw) couriersud2020-04-281-27/+26
|
* netlist: improve readability. (nw) couriersud2020-04-251-1/+1
| | | | The purpose here is to make clear what is actually done and to reduce usage of calls to update.
* netlist: Fix a segfault happening only under for certain netlists. couriersud2020-04-221-3/+46
| | | This seems to be a compiler/standard library issues.
* netlist: rename some camel case names. (nw) couriersud2020-04-191-12/+12
|
* netlist: clang-tidy, srcclean and pedantic warnings fixed. (nw) couriersud2020-04-181-2/+2
|
* netlist: Reduce memory allocation calls in non-core code. (nw) couriersud2020-04-101-3/+3
|
* netlist: Fix some clang-tidy-10 warnings. (nw) couriersud2020-04-051-14/+14
|
* netlist: fix log file option in nltool. (nw) couriersud2020-02-171-16/+17
|
* netlist: Code symplification and bugfixes. (nw) couriersud2020-01-311-4/+4
| | | | | - Fixes performance regression and net_splitter struct. - Fixes nltool time measurements - pstream simplification
* netlist: Parameters evaluated when netlist is created. [Couriersud] couriersud2020-01-291-9/+12
| | | | | | | | | | | | 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.