Commit Graph

21 Commits

Author SHA1 Message Date
couriersud
0cbbbdc846 netlist: source stream refactoring
* This is an infrastructure change to enable better error reporting
including file/source and line numbers in the future
2020-07-28 20:42:47 +02:00
couriersud
45713f390c netlist: fix a bug in preprocessor if and elif parsing. 2020-07-28 20:41:51 +02:00
couriersud
319be2dfd2 netlist: code maintenance and bug fixes.
* 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
2020-07-01 20:59:04 +02:00
couriersud
ab31af569f netlist: include file refactoring.
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.
2020-06-28 13:14:43 +02:00
couriersud
e949e9c29d netlist: Performance improvement and refactoring. [Couriersud]
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.
2020-06-13 15:49:35 +02:00
couriersud
f9fa6b1c81 netlist: code maintenance. (nw)
- 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
2020-06-08 02:52:39 +02:00
couriersud
37258b7439 netlist: clang-tidy, header order fixes. (nw) 2020-06-01 19:59:54 +02:00
couriersud
10e4f10d41 netlist: split plists.h and fix nvcc compile for 10.2 (nw)
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.
2020-05-25 23:57:49 +02:00
Aaron Giles
cfc3a76d04 netlist: Add support for empty #defines to preprocessor. [Aaron Giles]
Also add detection and reporting of re-definitions.
2020-05-15 13:10:12 +02:00
Aaron Giles
bf43fff5d6 netlist: Added undef support to the preprocessor. [Aaron Giles] 2020-05-10 20:47:54 +02:00
couriersud
53ac38cf35 netlist: add elif processing to preprocessor. [Couriersud] 2020-05-06 22:43:32 +02:00
couriersud
6d35a38bf2 netlist: clang-tidy, srcclean and pedantic warnings fixed. (nw) 2020-04-18 22:23:32 +02:00
couriersud
72f86082aa netlist: clang lint fixes. (nw) 2020-01-31 20:20:53 +01:00
couriersud
fceee50c8b netlist: Parameters evaluated when netlist is created. [Couriersud]
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.
2020-01-29 19:00:10 +01:00
couriersud
f7d8a10da5 netlist: Code maintenance. (nw)
- Fixed some clang lint warnings
- Removed dead code
- Experimental parser code to allow calculations in parameter value.
  This already works for compiled netlists. These changes are
  currently disabled. Updated pong netlist (and CRC/SHA) to work
  with this new code.
2020-01-27 21:47:41 +01:00
couriersud
9e272e4b55 netlist: code maintenance. (nw)
- remove pthrow trampline as proposed by Vas.
- identify throwing code by adding noexcept(false)
- move "connected term" information to setup code.
- srcclean
2020-01-20 21:15:22 +01:00
couriersud
88f702b416 netlist: code maintenance and bug fixes. (nw)
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
2019-11-08 23:52:14 +01:00
couriersud
22e07506cc netlist: more consistent exception handling. (nw)
Still not optimal, but better than what we had previously. No exception
logging comes closer.
2019-11-05 00:08:52 +01:00
couriersud
2cf61b2e4c netlist: code maintenance. (nw)
- more const
- explicitly raise exceptions instead of leaving this to log.fatal()
- correct a number of cppcheck findings.
- dead code removal
- clang lint corrections, e.g. include order
2019-11-04 22:04:11 +01:00
couriersud
60379b658a netlist: code maintenance. (nw)
- Separate code out into pmath.h and pstonum.h.
- Fix VC build error
- optimize pfmtlog.h a bit
2019-11-03 23:19:52 +01:00
couriersud
cac86fb1b4 netlist: code maintenance. (nw)
- Removed code no longer used
- Add noexcept where appropriate
- split pparser.[c|h] into ppreprocessor and ptokenizer
- smaller optimizations, e.g. use of std::size_t
- fix lint warnings
2019-10-29 19:55:53 +01:00