summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/prg/nltool.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-01-27 21:47:41 +0100
committer couriersud <couriersud@gmx.org>2020-01-27 21:47:41 +0100
commitf7d8a10da53e07747ab4f11d5c7b4827869e5763 (patch)
tree1ae8c2b3a06a6abd253814bd159cb151dd6cc20a /src/lib/netlist/prg/nltool.cpp
parent8c2bb6236774977e848c62fad35eb665a6d8e58b (diff)
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.
Diffstat (limited to 'src/lib/netlist/prg/nltool.cpp')
-rw-r--r--src/lib/netlist/prg/nltool.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp
index 6fd7c03b446..0f9d1088076 100644
--- a/src/lib/netlist/prg/nltool.cpp
+++ b/src/lib/netlist/prg/nltool.cpp
@@ -218,8 +218,24 @@ public:
for (auto & r : roms)
setup().register_source(plib::make_unique<netlist_data_folder_t>(r));
+#if 0
using a = plib::psource_str_t<plib::psource_t>;
+#if USE_EVAL
+ const pstring content =
+ "#define RES_R(res) (res) \n"
+ "#define RES_K(res) ((res) * 1e3) \n"
+ "#define RES_M(res) ((res) * 1e6) \n"
+ "#define CAP_U(cap) ((cap) * 1e-6) \n"
+ "#define CAP_N(cap) ((cap) * 1e-9) \n"
+ "#define CAP_P(cap) ((cap) * 1e-12) \n"
+ "#define IND_U(ind) ((ind) * 1e-6) \n"
+ "#define IND_N(ind) ((ind) * 1e-9) \n"
+ "#define IND_P(ind) ((ind) * 1e-12) \n";
+ setup().add_include(plib::make_unique<a>("netlist/devices/net_lib.h", content));
+#else
setup().add_include(plib::make_unique<a>("netlist/devices/net_lib.h",""));
+#endif
+#endif
for (auto & i : includes)
setup().add_include(plib::make_unique<netlist_data_folder_t>(i));