Commit Graph

27 Commits

Author SHA1 Message Date
couriersud
9534a0233c netlist: improve readability. (nw) 2019-03-18 00:01:41 +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
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
75146fd159 netlist: All devices now specify parameters in factory constructor. (nw)
This previously was part of net_lib.cpp and repeatedly caused bugs.
2019-02-01 22:46:43 +01:00
couriersud
b952577370 netlist: remove trampoline code. (nw) 2019-02-01 08:45:32 +01:00
Couriersud
3c49610274 More cppcheck fixes. (nw) 2017-03-05 16:19:59 +01:00
couriersud
572ca8100f Reorder include order to comply with best practices. (nw) 2017-02-10 21:53:02 +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
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
10a4ab4af1 Preparation work for automatically generated include file for devices.
nltool now is able to create all defines from the factory definitions.
This will reduce the number of places needed to touch when adding
devices and always ensure that the parser and statically compiled
netlist code use the same syntax. This will enable us to delete most
device include files, e.g. nld_74107.h. 

Netlist usage to create this header file:
./nltool -c header > src/lib/netlist/devices/nld_devinc.h

This is not yet used in production. It will be enabled after additional
tests.

[Couriersud]
2017-01-16 19:49:43 +01:00
couriersud
c612391f8e Move analog devices into "netlist::analog" namespace. Added
documentation to opamp model. (nw)
2017-01-15 17:56:47 +01:00
couriersud
3cfe098bb2 Introduce a more structured approach to models. (nw) 2017-01-15 17:56:45 +01:00
couriersud
c8c7e9a770 Fix timing issue in CD4538. Add "pow" (power) to the function model.
Minor documentation updates. Slight improvement of gorilla sound. (nw)
2017-01-12 23:20:22 +01:00
couriersud
5b4026d13f - setup_t is owned by netlist_t. Stop being complicated.
- Remove gnd() method. 
- Further simplification.
- Fix potential reset and initialization issues. (nw)
2017-01-12 23:20:21 +01:00
couriersud
ff820d6fa9 Fix regression. (nw) 2017-01-08 17:31:23 +01:00
couriersud
3a4bc804c0 Hook up luigi walking sound in netlist mario sound implementation.
Mario driver now uses netlist audio implementation instead of discrete
implementation. The previous discrete sound emulation has not been
removed yet because it still contains a lot of documentation.
[Couriersud]
2016-12-31 15:21:05 +01:00
Vas Crabb
e2ec57aa48 netlist: add uA741 in 8-, 10- and 14-pin DIP variants 2016-12-23 13:39:39 +11:00
couriersud
1e40d95e8b Netlist updates:
- Removed trampolines (OUTLOGIC, INPLOGIC and friends). 
- Started using doxygen comment and documentation style. Added doxygen
files to documentation folder. 
- Refactored code triggered by doxygen output. 
- Moved internal and support classes into namespace detail. 
- Use an anordered map in parser. 
- -Wconversion fixes - All done now. 
- Fixed -Wold-style-cast warnings in netlist code. 
- Added iterators to pstring. 
- Moved two macros, added more RAII and improved exceptions. Fixed some
bugs in parser code. 
- Fixed a number of bugs in parser code and exception handling. 
[Couriersud]
2016-07-21 11:05:55 +02:00
couriersud
af750f143c Srcclean on netlist files. Avoid the merge massacre. (nw) 2016-06-25 00:20:17 +02:00
couriersud
81880659d2 - More code cleanup.
- Dead code removal and minor refactoring.
- Simplify. Align naming with stl. Fix somed pedantic warnings.
- More STL compatability.
- Remove ATTR_HOT and ATTR_COLD. Refactored netlist_time. 
- Fix long standing workaround which would ignore policy of change-only"
propagation.
- Rewrote for loops to use auto : semantics.
- Truthtable cleanup. (nw)
- Get rid of nl_math. Remove nl_util.h and moved contents to
plib/putil.h.
- Fix standalone build. Refactor ptypes.h. 
[Couriersud]
2016-06-07 21:44:15 +02:00
balr0g
b277908905 - Minor cosmetic refactoring. Added a "uninitialised array" template to
allow in-place creation (for increased locality) of netlist classes.
Main use is in truthtable class.
- Remove PLIB_NAMESPACE macros.
- Remove namespace macros. Use explicit namespace declarations.
- Moved device definitions into cpp files.
- Moved more device definitions into cpp files.
- New prefix "nlid" for include files flags purely internal include
files not to be leaked into userland. 
- Fix factory code.
2016-06-07 21:40:30 +02:00
couriersud
332534cdf5 Continuing work to move object initialization from start to constructor.
Removed family_t. All of this can be determined at runtime from object
as well. As part of this, the "template" to write devices has changed.
Converted a number of devices to use the new template. [Couriersud]
2016-05-16 12:50:50 +02:00
couriersud
ccf66bee16 Align object registration syntax. (nw) 2016-05-10 00:47:21 +02:00
couriersud
576189b169 Converted most subdevices to unique_ptr. This is a temporary measure
until the device initialisation is moved into the constructor. Started
converting constructors of devices to be passed name and netlist. (nw)
2016-05-02 21:56:57 +02:00
Miodrag Milanovic
7c19aac60e Rename *.c -> *.cpp in our source (nw) 2015-11-08 12:56:12 +01:00