summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/net_lib.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.
* -unidasm: Allow input piped from stdin by specifying a bare hyphen as the ↵ Vas Crabb2020-11-181-6/+2
| | | | | | | | | | filename. [AJR, Vas Crabb] -netlist: Give devices the C++17 namespace treatment. -Tidied up compiler warning options for 3rdparty. -emu/render.cpp: Exposed a few information view item properties.
* netlist: move to generated header and link support files files. couriersud2020-09-121-119/+2
| | | | | | | | | | | | | * 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: Fix various issues around include directories. couriersud2020-08-251-2/+2
| | | | | | | | | * 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: build system improvements couriersud2020-08-241-128/+3
| | | | * Medium term this will significantly ease adding devices to netlist.
* netlist: in devices folder all DIP devices were removed. couriersud2020-08-231-2/+0
| | | | * NE555 and MC1455P were the last devices with DIP definitions in devices.
* netlist: macro dip definition for 8277,am2847,mm5837. couriersud2020-08-231-3/+1
|
* netlist: Macro DIP definitons for TMS4800, 9314, 9334 couriersud2020-08-231-4/+0
|
* netlist: use macro dips for 74175, 74192, 74193, 74194, 74365. couriersud2020-08-221-7/+0
|
* netlist: remove duplicate device definitions. couriersud2020-08-221-3/+0
|
* netlist: dead code removal. couriersud2020-08-171-7/+134
| | | | | * moved dead code into examples/lostfound.cpp * This work didn't improve performance but still may serve as examples for complex truth table implementations.
* -atarittl: Added netlist for Tank. currently runs at about 0.005% of full ↵ Ryan Holtz2020-08-161-0/+5
| | | | speed, unsure why.
* netlist: Add CD4013 to net_lib.cpp couriersud2020-08-061-0/+1
|
* netlist: Macro-ized 74174 DIPs Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized CD4006 DIPs Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 74393 DIPs Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 74166 DIPs Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 74165 DIPs Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 74164 DIPs Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 74153 DIPs Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 74113 DIPs Aaron Giles2020-08-021-2/+0
|
* netlist: Macro-ized 74107 DIPs Aaron Giles2020-08-021-2/+1
|
* netlist: Macro-ized 9322 DIPs. Aaron Giles2020-08-021-1/+1
|
* netlist: Macro-ized 9310/9316/74161/74163 DIPs Aaron Giles2020-08-021-4/+0
|
* netlist: Macro-ized 7493/7497 DIPs Aaron Giles2020-08-021-2/+0
|
* netlist: Macro-ized 7492 DIP Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 7490 DIP Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 7485 DIP Aaron Giles2020-08-021-1/+0
|
* netlist: Macro-ized 7483 DIP Aaron Giles2020-08-021-1/+0
|
* netlist: Added CD4017/4022 devices. Aaron Giles2020-08-011-0/+2
| | | | * Also contains squashed clang signedness fixes
* netlist: More dip macros and device refactoring Aaron Giles2020-08-011-8/+2
| | | | | | | * Updated 7450, 7473/7473A, 7474, 7475/7477 devices to use DIP macros instead of C++ DIPs. * Reworked 7475/7477 more in the style of 7474, leveraging system signal activation and edge detection.
* netlist: Device refactoring Aaron Giles2020-08-011-7/+0
| | | | | | | * Move DIPs for 82S16, 82S115, and 2102A devices into nlm_proms * Moved 7448 DIP to a macro. Replaced 7442 with truthtable and macro. * Moved 74LS629 DIP into macro. * Expand truthtable to handle 10 outputs.
* netlist: Add CD4011, CD4024, 7407 and CD4053 devices. Aaron Giles2020-07-281-0/+2
|
* netlist: Add 74113 device. Aaron Giles2020-07-101-0/+4
|
* netlist: add 74121 device and refactor 74123 code. couriersud2020-07-101-3/+3
| | | | | | * added 74121 device * migrate dip devices to netlist devices * refactor code to be based on device description structs
* netlist: consolidate 9316-type counters. [Couriersud] couriersud2020-05-221-0/+1
| | | | | | | This needs more attention since for certain compilers there is a considerable performance degregation. It looks like this is only triggered if too many variants are declared in one cpp file and the compiler stops inlining.
* netlist: rewrite rom devices from scratch. [Couriersud] couriersud2020-05-171-3/+1
| | | | | | | | | | | | | 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: Re-do the 74377/8/9 as macros. [Aaron Giles] Aaron Giles2020-05-151-3/+1
|
* netlist: Add 74377/74378/74379 devices to netlist. [Aaron Giles] Aaron Giles2020-05-151-0/+3
|
* netlist: code cleanup and development stage tristate [Couriersud] couriersud2020-05-151-0/+2
| | | | | | | | | | 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-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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: Add two noise sources. [Couriersud] couriersud2020-05-031-0/+2
| | | | | | | | | | | | | | | | | | | The two sources act as voltage sources, though noise may also be injected as conductivy or current noise. SYS_NOISE_MT_U: Mersenne Twister uniform noise SYS_NOISE_MT_N: Mersenne Twister normal noise nld_sys_noise is templated: using NETLIB_NAME(sys_noise_mt_u) = NETLIB_NAME(sys_noise)<plib::mt19937_64, plib::uniform_distribution_t>; Thus the approach is scalable. The implementation is state save aware, and thus reproducible results are guaranteed. An example use case is provided as well, see examples/noise.cpp.
* netlist: Add simple ZDIODE model. [Couriersud] couriersud2020-05-021-0/+1
| | | | | | | | | | | | | The model is driven by three additional model parameters: NBV, IBV, BV. Example code how to define a typical 7.5V Zener diode: ZDIODE(ZD, "D(BV=7.5 IBV=0.01 NBV=3)") or NET_MODEL("A1234 D(BV=7.5 IBV=0.01 NBV=3)") ZDIODE(ZD, "A1234")
* Add 74393 device and unit test. Aaron Giles2020-05-011-0/+2
|
* netlist: Add the NE566 as a macro device. [Couriersud] couriersud2020-05-011-3/+3
| | | | | | | | The device can be found in nlm_other.cpp. Removed nld_ne566.* Added SYS_SW, SYS_SW2 and SYS_COMP. These are single switch, alternating switch and a analog comparator with digital outputs. Renamed RES_SWITCH to SYS_SW. Added example ne566.cpp in netlist/examples.
* Stub implementation of 566 VCO Aaron Giles2020-04-291-0/+2
|
* Netlist: Added 74163 to netlist. [Couriersud] couriersud2020-04-281-0/+2
|
* netlist: use initializer_list. (nw) couriersud2020-03-021-0/+1
| | | | | | - Use initializer_list in object_array_t. - Added constructor which accepts a format string for object names. - Started work on logic_input8 which provides 8 logic outputs.
* netlist: add current controlled voltage source (CCVS). [Couriersud] couriersud2020-01-261-0/+1
|
* netlist: New devices and some fixes. [Couriersud] couriersud2020-01-251-0/+2
| | | | | | | | | - add CD4006 and CD4070 devices - add TL084 opamp model - Clock now supports proxies, i.e. can be connected to analog devices. - Fixed netlists using CLOCK - added some comments - removed a forgotten header file.