summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_base.cpp
Commit message (Collapse)AuthorAgeFilesLines
* netlist: Relicensing of the GPL code to BSD-3 with the blessing of the Olivier Galibert2021-03-091-1/+1
| | | | | | | | | | 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-021-9/+8
|
* netlist: move core_terms to netlist_state. couriersud2020-10-021-3/+5
| | | | | * 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-3/+3
|
* netlist: Fix a net splitting issue with four term devices. couriersud2020-09-301-2/+10
| | | | | | | | | | * 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-1/+0
| | | | * No longer added value.
* netlist: minor code cleanup. couriersud2020-09-251-4/+6
| | | | | | * 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: optimize headers. couriersud2020-09-171-2/+2
| | | | * where possible rely on forward declarations to optimiuze compile time.
* netlist: move to generated header and link support files files. couriersud2020-09-121-2/+6
| | | | | | | | | | | | | * Removed device and macro header files. * All of those can be generated automatically so going forward there is no need for these any longer. * Introduced the modules concept. Modules are netlists for which automatic lib entries are generated. * Going forward you just store them in macro/modules and they will be automatically registered as device elements. * You need to do a "make generated" is src/lib/netlist/build * Some_device.cpp still needs to be added to netlist.lua * Added documentation on how to add devices to netlist. * Please refer to adding_devices.md for more information.
* netlist: Pedantic and clang tidy updates couriersud2020-09-061-1/+1
| | | * also fix an issue with netlist vs build
* netlist: code maintenance and performance optimizations. Couriersud2020-09-051-11/+8
| | | | | | | | | | | * 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: Fix various issues around include directories. couriersud2020-08-251-1/+4
| | | | | | | | | * removed include directory src/lib/netlist from various genie files to avoid potential issues. * Code using netlist should use #include "netlist/*". * Updated includes. * Fixed standalone makefile depend target to properly deal with relative paths.
* netlist: Add NETLIB_DELEGATE_NOOP() couriersud2020-08-221-3/+3
| | | | | * 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: dead code removal. couriersud2020-08-171-1/+0
| | | | | * moved dead code into examples/lostfound.cpp * This work didn't improve performance but still may serve as examples for complex truth table implementations.
* netlist: more include untangling. couriersud2020-08-121-1/+0
| | | | * 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-8/+9
| | | * preparational work for easier device addition.
* netlist: align naming of files within the macro folder. couriersud2020-08-101-3/+3
| | | | * Use a consistent naming scheme. This is a preparational step towards improved parsing performance.
* netlist: more header file separation couriersud2020-08-081-0/+77
|
* netlist: Refactored pokenizer. couriersud2020-08-061-3/+6
| | | | | | | | | * 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-1/+1
| | | | | * 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-0/+12
|
* netlist: further nl_base.h splitting into headers in core subdir. couriersud2020-07-281-0/+21
|
* netlist: separate nl_base.h into separate header files. couriersud2020-07-251-1/+1
| | | | | | * 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: Rewrote scheduler scheduling. couriersud2020-07-251-48/+31
| | | | | | | | | | | | | | * All solver scheduling is now handled by nld_solver. * Previously, for dynamic timestepping the sub solvers would be responsible for their scheduling themselves. - This prevented any attemps to use parallel execution of solvers. * Now the route is free towards experiments to use parallel execution of solvers. * Uses ptimed_queue_linear in solver scheduling * Improved netlist queue implementation (template now) * Added const delegates. * Added subsolver stats * Removed dead code.
* netlist: Potential regression trigger. couriersud2020-07-171-37/+18
| | | | | | | | | * Removed update and NETLIB_UPDATE completely. * Startup initialization order may change. * This may cause regression tests to trigger. This is expected. Logic TTL devices do not have a defined power-up state. That's why reset circuits exist which create a reset signal *after* all power supply lines are stable.
* netlist: comment out empty reset and update calls couriersud2020-07-161-0/+2
|
* netlist: code maintenance. couriersud2020-07-161-9/+5
| | | | | | * more handler alignment * dead code removal * remove update calls which do nothing
* netlist: finished input handler refactoring. couriersud2020-07-121-3/+3
| | | * all inputs now explicitly specify a signal handler.
* netlist: remove soft reset support. couriersud2020-07-051-4/+14
| | | | | | | | * 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.
* netlist: code maintenance and bug fixes. couriersud2020-07-011-1/+2
| | | | | | | | | | | * 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: include file refactoring. couriersud2020-06-281-2/+3
| | | | | | | | 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.
* netlist: fix some clang-tidy warnings. (nw) couriersud2020-06-131-0/+1
|
* netlist: Performance improvement and refactoring. [Couriersud] couriersud2020-06-131-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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: Make fostrm actually write to file. (nw) couriersud2020-06-131-4/+2
| | | | Also fix typos and a tidy warning.
* netlist: prepare path to non-virtual update functions. (nw) couriersud2020-06-081-4/+0
|
* netlist: code maintenance. (nw) couriersud2020-06-081-11/+11
| | | | | | - 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: debugger - use callbacks to access terminals. (nw) couriersud2020-06-011-1/+1
|
* netlist: refactored ppmf.h [Couriersud] couriersud2020-06-011-0/+5
| | | | | | | Make more use of c++. Prepare coexistence of different delegate types. Untangle code. Reduced macro usage.
* netlist: small memory system cleanup. (nw) couriersud2020-05-251-2/+3
|
* netlist: move configuration entries into netlist namespace. (nw) couriersud2020-05-251-4/+4
|
* netlist: improve performance. [Couriersud] couriersud2020-05-241-1/+65
| | | | | | | 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-1/+3
|
* netlist: fix a memory issue. (nw) couriersud2020-05-241-3/+1
| | | + cosmetic changes in nl_base.cpp and build/makefile
* netlist: various clang-tidy-11 fixes. (nw) couriersud2020-05-241-3/+3
|
* netlist: Add tristate support for rom devices. [Couriersud] couriersud2020-05-201-13/+21
| | | | | | | | | 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: Add working 74125 and 74126 implementations. [Couriersud] couriersud2020-05-171-8/+5
| | | | | | | | | | | 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: code cleanup and development stage tristate [Couriersud] couriersud2020-05-151-41/+20
| | | | | | | | | | 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/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-8/+9
| | | | Also remove dead code and dead comments.
* netlist: logic devices now support model parameter. [Couriersud] couriersud2020-05-101-200/+110
| | | | | | 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.