Merge remote-tracking branch 'origin/netlist_dev'

This commit is contained in:
couriersud 2016-06-25 00:57:02 +02:00
commit ca4485d760
92 changed files with 190 additions and 282 deletions

View File

@ -680,8 +680,6 @@ public:
, m_feedback(*this, "FB") // clock part
, m_Q(*this, "Q")
{
connect_late(m_feedback, m_Q);
m_inc = netlist::netlist_time::from_nsec(1);

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
class diode
{
public:

View File

@ -28,7 +28,6 @@ namespace netlist
{
namespace devices
{
// -----------------------------------------------------------------------------
// nld_Q - Base classes
// -----------------------------------------------------------------------------

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
// ----------------------------------------------------------------------------------------
// nld_VCCS
// ----------------------------------------------------------------------------------------

View File

@ -32,7 +32,6 @@ namespace netlist
{
namespace devices
{
// ----------------------------------------------------------------------------------------
// nld_VCCS
// ----------------------------------------------------------------------------------------
@ -206,7 +205,6 @@ public:
, m_OP2(*this, "_OP2")
, m_ON2(*this, "_ON2")
{
m_OP2.m_otherterm = &m_ON2;
m_ON2.m_otherterm = &m_OP2;

View File

@ -42,7 +42,6 @@ namespace netlist
{
namespace devices
{
/*
* Type = 0: Impedance changer
* 1; Idealized opamp

View File

@ -36,7 +36,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(OPAMP)
{
NETLIB_CONSTRUCTOR(OPAMP)
@ -49,7 +48,6 @@ NETLIB_OBJECT(OPAMP)
, m_VL(*this, "VL")
, m_VREF(*this, "VREF")
{
m_type = m_model.model_value("TYPE");
if (m_type == 1)

View File

@ -15,7 +15,6 @@ namespace netlist
{
namespace devices
{
// ----------------------------------------------------------------------------------------
// SWITCH
// ----------------------------------------------------------------------------------------

View File

@ -31,7 +31,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(switch1)
{
NETLIB_CONSTRUCTOR(switch1)

View File

@ -14,7 +14,6 @@ namespace netlist
{
namespace devices
{
// ----------------------------------------------------------------------------------------
// generic_diode
// ----------------------------------------------------------------------------------------

View File

@ -98,7 +98,6 @@ namespace netlist
{
namespace devices
{
// -----------------------------------------------------------------------------
// nld_twoterm
// -----------------------------------------------------------------------------
@ -417,7 +416,6 @@ public:
, m_R(*this, "R", 0.1)
, m_V(*this, "V", 0.0)
{
register_subalias("P", m_P);
register_subalias("N", m_N);
}

View File

@ -19,7 +19,7 @@ LTO = -flto=4 -fuse-linker-plugin -flto-partition=balanced -Wodr
CDEFS = -DPSTANDALONE=1 -DPTR64=1
#-Werror
#CFLAGS = $(LTO) -g -O3 -std=c++98 -Doverride="" -march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra -Wno-long-long -Wno-unused-parameter -Wno-unused-result -Wno-variadic-macros -I..
#LDFLAGS = $(LTO) -g -O3 -std=c++98
#LDFLAGS = $(LTO) -g -O3 -std=c++98
CFLAGS = $(LTO) -g -O3 -std=c++11 -march=native -I.. -Wall -Wpedantic -Wsign-compare -Wextra -Wno-unused-parameter
LDFLAGS = $(LTO) -g -O3 -std=c++11 -lpthread -ldl
@ -34,15 +34,15 @@ NLOBJ = $(OBJ)
POBJ = $(OBJ)/plib
OBJDIRS = $(OBJ) \
$(OBJ)/analog \
$(OBJ)/solver \
$(OBJ)/devices \
$(OBJ)/plib \
$(OBJ)/devices \
$(OBJ)/macro \
$(OBJ)/tools \
$(OBJ)/prg \
$(OBJ)/analog \
$(OBJ)/solver \
$(OBJ)/devices \
$(OBJ)/plib \
$(OBJ)/devices \
$(OBJ)/macro \
$(OBJ)/tools \
$(OBJ)/prg \
OBJS = $(POBJS) $(NLOBJS)
@ -110,7 +110,7 @@ SOURCES = $(patsubst $(OBJ)%, $(SRC)%, $(ALL_OBJS:.o=.cpp))
# all
#-------------------------------------------------
all: maketree $(TARGETS)
all: maketree $(TARGETS)
#-------------------------------------------------
# clean

View File

@ -71,7 +71,6 @@ namespace netlist
{
namespace devices
{
void initialize_factory(factory_list_t &factory)
{
ENTRY(R, RES, "R")

View File

@ -10,11 +10,8 @@
namespace netlist
{
namespace devices
{
NETLIB_OBJECT(CD4020_sub)
{
NETLIB_CONSTRUCTOR(CD4020_sub)

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(CD4066_GATE)
{
NETLIB_CONSTRUCTOR(CD4066_GATE)

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(74107Asub)
{
NETLIB_CONSTRUCTOR(74107Asub)
@ -78,7 +77,6 @@ namespace netlist
, m_1(*this, "1")
, m_2(*this, "2")
{
register_subalias("1", m_1.m_J);
register_subalias("2", m_1.m_sub.m_QQ);
register_subalias("3", m_1.m_sub.m_Q);

View File

@ -17,7 +17,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(74123)
{
NETLIB_CONSTRUCTOR_EX(74123, int dev_type = 74123)

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
/* FIXME: timing is not 100% accurate, Strobe and Select inputs have a
* slightly longer timing.
* Convert this to sub-devices at some time.
@ -46,7 +45,6 @@ namespace netlist
, m_A(*this, "A")
, m_B(*this, "B")
{
register_subalias("C0", m_sub.m_C[0]);
register_subalias("C1", m_sub.m_C[1]);
register_subalias("C2", m_sub.m_C[2]);
@ -71,7 +69,6 @@ namespace netlist
, m_A(*this, "14") // m_2.m_B
, m_B(*this, "2") // m_2.m_B
{
register_subalias("1", m_1.m_G);
register_subalias("3", m_1.m_C[3]);
register_subalias("4", m_1.m_C[2]);

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(74175_sub)
{
NETLIB_CONSTRUCTOR(74175_sub)

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(74192_subABCD)
{
NETLIB_CONSTRUCTOR(74192_subABCD)

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(74193)
{
NETLIB_CONSTRUCTOR(74193)

View File

@ -12,7 +12,6 @@ namespace netlist
{
namespace devices
{
NETLIB_TRUTHTABLE(74279A, 3, 1);
NETLIB_TRUTHTABLE(74279B, 4, 1);

View File

@ -12,7 +12,6 @@ namespace netlist
{
namespace devices
{
#if (USE_TRUTHTABLE_7448 && USE_TRUTHTABLE)
NETLIB_TRUTHTABLE(7448, 7, 7, 0);

View File

@ -28,11 +28,11 @@
/*
* FIXME: Using truthtable is a lot slower than the explicit device
* in breakout. Performance drops by 20%. This can be fixed by
* setting param USE_DEACTIVATE for the device.
* in breakout. Performance drops by 20%. This can be fixed by
* setting param USE_DEACTIVATE for the device.
*/
#define USE_TRUTHTABLE_7448 (0)
#define USE_TRUTHTABLE_7448 (0)
#define TTL_7448(name, cA0, cA1, cA2, cA3, cLTQ, cBIQ, cRBIQ) \
NET_REGISTER_DEV(TTL_7448, name) \

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(7450)
{
NETLIB_CONSTRUCTOR(7450)
@ -39,7 +38,6 @@ namespace netlist
, m_1(*this, "1")
, m_2(*this, "2")
{
register_subalias("1", m_1.m_A);
register_subalias("2", m_2.m_A);
register_subalias("3", m_2.m_B);

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(7474sub)
{
NETLIB_CONSTRUCTOR(7474sub)
@ -68,7 +67,6 @@ namespace netlist
, m_1(*this, "1")
, m_2(*this, "2")
{
register_subalias("1", m_1.m_CLRQ);
register_subalias("2", m_1.m_D);
register_subalias("3", m_1.sub.m_CLK);
@ -152,7 +150,7 @@ namespace netlist
NETLIB_RESET(7474_dip)
{
// m_1.do_reset();
// m_1.do_reset();
//m_2.do_reset();
}

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(7483)
{
NETLIB_CONSTRUCTOR(7483)

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(7490)
{
NETLIB_CONSTRUCTOR(7490)

View File

@ -12,8 +12,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(7493ff)
{
NETLIB_CONSTRUCTOR(7493ff)

View File

@ -46,7 +46,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(SN74LS629clk)
{
NETLIB_CONSTRUCTOR(SN74LS629clk)

View File

@ -11,7 +11,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(82S16)
{
NETLIB_CONSTRUCTOR(82S16)

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(9310_subABCD)
{
NETLIB_CONSTRUCTOR(9310_subABCD)

View File

@ -27,7 +27,6 @@ namespace netlist
{
namespace devices
{
#if (USE_TRUTHTABLE)
/* The truthtable implementation is a lot faster than
* the carefully crafted code :-(

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(9316_subABCD)
{
NETLIB_CONSTRUCTOR(9316_subABCD)

View File

@ -12,7 +12,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(nicRSFF)
{
NETLIB_CONSTRUCTOR(nicRSFF)

View File

@ -33,7 +33,6 @@ namespace netlist
{
namespace devices
{
} //namespace devices
} // namespace netlist

View File

@ -16,13 +16,11 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(log)
{
NETLIB_CONSTRUCTOR(log)
, m_I(*this, "I")
{
pstring filename = plib::pfmt("{1}.log")(this->name());
m_strm = plib::make_unique<plib::pofilestream>(filename);
}

View File

@ -16,7 +16,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(MM5837_dip)
{
NETLIB_CONSTRUCTOR(MM5837_dip)

View File

@ -16,7 +16,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(NE555)
{
NETLIB_CONSTRUCTOR(NE555)
@ -31,7 +30,6 @@ namespace netlist
, m_last_out(*this, "m_last_out", false)
, m_ff(*this, "m_ff", false)
{
register_subalias("GND", m_R3.m_N); // Pin 1
register_subalias("CONT", m_R1.m_N); // Pin 5
register_subalias("DISCH", m_RDIS.m_P); // Pin 7

View File

@ -12,7 +12,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT_DERIVED(r2r_dac, twoterm)
{
NETLIB_CONSTRUCTOR_DERIVED(r2r_dac, twoterm)

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
// ----------------------------------------------------------------------------------------
// netlistparams
// ----------------------------------------------------------------------------------------

View File

@ -13,7 +13,6 @@ namespace netlist
{
namespace devices
{
template<unsigned m_NI, unsigned m_NO>
class netlist_factory_truthtable_t : public netlist_base_factory_truthtable_t
{

View File

@ -17,8 +17,8 @@
#include "nl_factory.h"
#include "plib/plists.h"
#define NETLIB_TRUTHTABLE(cname, nIN, nOUT) \
class NETLIB_NAME(cname) : public nld_truthtable_t<nIN, nOUT> \
#define NETLIB_TRUTHTABLE(cname, nIN, nOUT) \
class NETLIB_NAME(cname) : public nld_truthtable_t<nIN, nOUT> \
{ \
public: \
template <class C> \
@ -34,16 +34,15 @@ namespace netlist
{
namespace devices
{
template<unsigned bits>
struct need_bytes_for_bits
{
enum { value =
bits <= 8 ? 1 :
bits <= 16 ? 2 :
bits <= 32 ? 4 :
8
};
enum { value =
bits <= 8 ? 1 :
bits <= 16 ? 2 :
bits <= 32 ? 4 :
8
};
};
template<unsigned bits> struct uint_for_size;
@ -361,9 +360,9 @@ namespace netlist
}
/* FIXME: check width */
state_var_u32 m_ign;
state_var_s32 m_active;
truthtable_t * m_ttp;
state_var_u32 m_ign;
state_var_s32 m_active;
truthtable_t * m_ttp;
plib::pstring_vector_t m_desc;
};

View File

@ -14,7 +14,6 @@ namespace netlist
{
namespace devices
{
NETLIB_OBJECT(vdd_vss)
{
NETLIB_CONSTRUCTOR(vdd_vss)

View File

@ -22,7 +22,6 @@ namespace netlist
{
namespace devices
{
// -----------------------------------------------------------------------------
// netlistparams
// -----------------------------------------------------------------------------
@ -50,7 +49,6 @@ namespace netlist
, m_Q(*this, "Q")
, m_freq(*this, "FREQ", 7159000.0 * 5)
{
m_inc = netlist_time::from_hz(m_freq.Value()*2);
}
@ -92,7 +90,6 @@ namespace netlist
, m_Q(*this, "Q")
, m_freq(*this, "FREQ", 7159000.0 * 5.0)
{
m_inc = netlist_time::from_hz(m_freq.Value()*2);
connect_late(m_feedback, m_Q);
@ -312,7 +309,6 @@ namespace netlist
, m_func(*this, "FUNC", "")
, m_Q(*this, "Q")
{
for (int i=0; i < m_N; i++)
m_I.push_back(plib::make_unique<analog_input_t>(*this, plib::pfmt("A{1}")(i)));
@ -471,7 +467,7 @@ namespace netlist
protected:
NETLIB_RESETI() { }
NETLIB_RESETI() { }
NETLIB_UPDATEI()
{

View File

@ -79,13 +79,13 @@ NETLIST_START(TTL_7402_DIP)
s2.A, /* A2 |5 10| Y3 */ s3.Q,
s2.B, /* B2 |6 9| B3 */ s3.B,
GND.I, /* GND |7 8| A3 */ s3.A
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
/*
* DM7404: Hex Inverting Gates
*
*
* Y = A
* +---++---+
* | A || Y |
@ -117,7 +117,7 @@ NETLIST_START(TTL_7404_DIP)
s3.A, /* A3 |5 10| Y5 */ s5.Q,
s3.Q, /* Y3 |6 9| A4 */ s4.A,
GND.I, /* GND |7 8| Y4 */ s4.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -156,7 +156,7 @@ NETLIST_START(TTL_7408_DIP)
s2.B, /* B2 |5 10| B3 */ s3.B,
s2.Q, /* Y2 |6 9| A3 */ s3.A,
GND.I, /* GND |7 8| Y3 */ s3.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -193,7 +193,7 @@ NETLIST_START(TTL_7410_DIP)
s2.C, /* C2 |5 10| B3 */ s3.B,
s2.Q, /* Y2 |6 9| A3 */ s3.A,
GND.I, /* GND |7 8| Y3 */ s3.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -230,7 +230,7 @@ NETLIST_START(TTL_7411_DIP)
s2.C, /* C2 |5 10| B3 */ s3.B,
s2.Q, /* Y2 |6 9| A3 */ s3.A,
GND.I, /* GND |7 8| Y3 */ s3.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -297,7 +297,7 @@ NETLIST_START(TTL_7420_DIP)
s1.D, /* D1 |5 10| B2 */ s2.B,
s1.Q, /* Y1 |6 9| A2 */ s2.A,
GND.I, /* GND |7 8| Y2 */ s2.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -334,12 +334,12 @@ NETLIST_START(TTL_7425_DIP)
DIPPINS( /* +--------------+ */
s1.A, /* A1 |1 ++ 14| VCC */ VCC.I,
s1.B, /* B1 |2 13| D2 */ s2.D,
X.I, /* X1 |3 12| C2 */ s2.C,
X.I, /* X1 |3 12| C2 */ s2.C,
s1.C, /* C1 |4 7425 11| X2 */ X.I,
s1.D, /* D1 |5 10| B2 */ s2.B,
s1.Q, /* Y1 |6 9| A2 */ s2.A,
GND.I, /* GND |7 8| Y2 */ s2.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -377,7 +377,7 @@ NETLIST_START(TTL_7427_DIP)
s2.C, /* C2 |5 10| B3 */ s3.B,
s2.Q, /* Y2 |6 9| A3 */ s3.A,
GND.I, /* GND |7 8| Y3 */ s3.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -417,7 +417,7 @@ NETLIST_START(TTL_7430_DIP)
s1.E, /* E |5 10| NC */ NC.I,
s1.F, /* F |6 9| NC */ NC.I,
GND.I, /* GND |7 8| Y */ s1.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()
@ -456,7 +456,7 @@ NETLIST_START(TTL_7432_DIP)
s2.B, /* B2 |5 10| B3 */ s3.B,
s2.Q, /* Y2 |6 9| A3 */ s3.A,
GND.I, /* GND |7 8| Y3 */ s3.Q
/* +--------------+ */
/* +--------------+ */
)
NETLIST_END()

View File

@ -15,8 +15,8 @@
NET_REGISTER_DEV(TTL_7400_GATE, name)
#define TTL_7400_NAND(name, cA, cB) \
NET_REGISTER_DEV(TTL_7400_NAND, name) \
NET_CONNECT(name, A, cA) \
NET_REGISTER_DEV(TTL_7400_NAND, name) \
NET_CONNECT(name, A, cA) \
NET_CONNECT(name, B, cB)
#define TTL_7400_DIP(name) \
@ -50,8 +50,8 @@
NET_REGISTER_DEV(TTL_7408_GATE, name)
#define TTL_7408_AND(name, cA, cB) \
NET_REGISTER_DEV(TTL_7408_AND, name) \
NET_CONNECT(name, A, cA) \
NET_REGISTER_DEV(TTL_7408_AND, name) \
NET_CONNECT(name, A, cA) \
NET_CONNECT(name, B, cB)
#define TTL_7408_DIP(name) \
@ -166,8 +166,8 @@
NET_REGISTER_DEV(TTL_7437_GATE, name)
#define TTL_7437_NAND(name, cA, cB) \
NET_REGISTER_DEV(TTL_7437_NAND, name) \
NET_CONNECT(name, A, cA) \
NET_REGISTER_DEV(TTL_7437_NAND, name) \
NET_CONNECT(name, A, cA) \
NET_CONNECT(name, B, cB)
#define TTL_7437_DIP(name) \

View File

@ -18,7 +18,6 @@
namespace netlist
{
#if (NL_USE_MEMPOOL)
static plib::mempool p(65536, 8);
@ -29,8 +28,8 @@ void * object_t::operator new (size_t size)
void object_t::operator delete (void * mem)
{
if (mem)
p.free(mem);
if (mem)
p.free(mem);
}
#else
void * object_t::operator new (size_t size)
@ -40,8 +39,8 @@ void * object_t::operator new (size_t size)
void object_t::operator delete (void * mem)
{
if (mem)
::operator delete(mem);
if (mem)
::operator delete(mem);
}
#endif
@ -204,7 +203,6 @@ netlist_t::netlist_t(const pstring &aname)
netlist_t::~netlist_t()
{
m_nets.clear();
m_devices.clear();
@ -268,7 +266,7 @@ void netlist_t::reset()
if (m_mainclock != nullptr)
m_mainclock->m_Q.net().set_time(netlist_time::zero());
//if (m_solver != nullptr)
// m_solver->do_reset();
// m_solver->do_reset();
// Reset all nets once !
for (auto & n : m_nets)
@ -566,7 +564,7 @@ family_setter_t::family_setter_t(core_device_t &dev, const logic_family_desc_t *
// FIXME: move somewhere central
struct do_nothing_deleter{
template<typename T> void operator()(T*){}
template<typename T> void operator()(T*){}
};
@ -583,9 +581,9 @@ net_t::net_t(netlist_t &nl, const pstring &aname, core_terminal_t *mr)
{
m_railterminal = mr;
if (mr != nullptr)
nl.m_nets.push_back(std::shared_ptr<net_t>(this, do_nothing_deleter()));
nl.m_nets.push_back(std::move(plib::owned_ptr<net_t>(this, false)));
else
nl.m_nets.push_back(std::shared_ptr<net_t>(this));
nl.m_nets.push_back(std::move(plib::owned_ptr<net_t>(this, true)));
}
net_t::~net_t()
@ -812,7 +810,7 @@ void core_terminal_t::set_net(net_t *anet)
m_net = anet;
}
void core_terminal_t::clear_net()
void core_terminal_t::clear_net()
{
m_net = nullptr;
}
@ -952,7 +950,6 @@ nl_double param_model_t::model_value(const pstring &entity)
namespace devices
{
// ----------------------------------------------------------------------------------------
// mainclock
// ----------------------------------------------------------------------------------------
@ -966,4 +963,3 @@ nl_double param_model_t::model_value(const pstring &entity)
} //namespace devices
} // namespace netlist

View File

@ -173,9 +173,9 @@
using netlist_sig_t = std::uint_least32_t;
//============================================================
// MACROS / New Syntax
//============================================================
//============================================================
// MACROS / New Syntax
//============================================================
#define NETLIB_NAME(chip) nld_ ## chip
@ -202,14 +202,14 @@ class NETLIB_NAME(name) : public device_t
public: template <class CLASS> NETLIB_NAME(cname)(CLASS &owner, const pstring name, __VA_ARGS__) \
: device_t(owner, name)
#define NETLIB_DYNAMIC() \
#define NETLIB_DYNAMIC() \
public: virtual bool is_dynamic() const override { return true; }
#define NETLIB_TIMESTEP() \
#define NETLIB_TIMESTEP() \
public: virtual bool is_timestep() const override { return true; } \
public: virtual void step_time(const nl_double step) override
#define NETLIB_UPDATE_AFTER_PARAM_CHANGE() \
#define NETLIB_UPDATE_AFTER_PARAM_CHANGE() \
public: virtual bool needs_update_after_param_change() const override { return true; }
#define NETLIB_FAMILY(family) , m_famsetter(*this, family)
@ -411,10 +411,10 @@ namespace netlist
pstring m_name;
public:
void * operator new (size_t size, void *ptr) { return ptr; }
void operator delete (void *ptr, void *) { }
void * operator new (size_t size);
void operator delete (void * mem);
void * operator new (size_t size, void *ptr) { return ptr; }
void operator delete (void *ptr, void *) { }
void * operator new (size_t size);
void operator delete (void * mem);
};
struct netlist_ref
@ -662,7 +662,7 @@ namespace netlist
bool is_logic() const;
bool is_analog() const;
void toggle_new_Q() { m_new_Q ^= 1; }
void toggle_new_Q() { m_new_Q ^= 1; }
void push_to_queue(const netlist_time delay) NOEXCEPT;
void reschedule_in_queue(const netlist_time delay) NOEXCEPT;
@ -693,7 +693,7 @@ namespace netlist
state_var<netlist_time> m_time;
state_var_s32 m_active;
state_var_u8 m_in_queue; /* 0: not in queue, 1: in queue, 2: last was taken */
state_var_u8 m_in_queue; /* 0: not in queue, 1: in queue, 2: last was taken */
private:
plib::linkedlist_t<core_terminal_t> m_list_active;
@ -714,7 +714,7 @@ namespace netlist
virtual ~logic_net_t() { };
netlist_sig_t Q() const { return m_cur_Q; }
netlist_sig_t new_Q() const { return m_new_Q; }
netlist_sig_t new_Q() const { return m_new_Q; }
void initial(const netlist_sig_t val) { m_cur_Q = m_new_Q = val; }
void set_Q(const netlist_sig_t newQ, const netlist_time delay) NOEXCEPT
@ -739,7 +739,7 @@ namespace netlist
/* internal state support
* FIXME: get rid of this and implement export/import in MAME
*/
netlist_sig_t &Q_state_ptr() { return m_cur_Q; }
netlist_sig_t &Q_state_ptr() { return m_cur_Q; }
protected:
private:
@ -1038,13 +1038,13 @@ namespace netlist
// queue_t
// -----------------------------------------------------------------------------
class queue_t : public timed_queue<net_t *, netlist_time>,
class queue_t : public timed_queue<net_t *, netlist_time>,
public object_t,
public netlist_ref,
public plib::state_manager_t::callback_t
{
public:
queue_t(netlist_t &nl);
explicit queue_t(netlist_t &nl);
protected:
@ -1070,7 +1070,7 @@ namespace netlist
P_PREVENT_COPYING(netlist_t)
public:
netlist_t(const pstring &aname);
explicit netlist_t(const pstring &aname);
virtual ~netlist_t();
pstring name() const { return m_name; }
@ -1155,7 +1155,7 @@ namespace netlist
std::vector<plib::owned_ptr<core_device_t>> m_devices;
/* sole use is to manage lifetime of net objects */
std::vector<std::shared_ptr<net_t>> m_nets;
std::vector<plib::owned_ptr<net_t>> m_nets;
/* sole use is to manage lifetime of family objects */
std::vector<std::pair<pstring, std::unique_ptr<logic_family_desc_t>>> m_family_cache;
@ -1168,12 +1168,12 @@ namespace netlist
nperfcount_t m_perf_inp_active;
private:
plib::state_manager_t m_state;
plib::state_manager_t m_state;
/* mostly rw */
netlist_time m_time;
queue_t m_queue;
nperftime_t m_stat_mainloop;
nperftime_t m_stat_mainloop;
/* mostly ro */
devices::NETLIB_NAME(mainclock) * m_mainclock;

View File

@ -75,18 +75,18 @@
// GENERAL
//============================================================
#define NL_USE_MEMPOOL (0)
#define USE_TRUTHTABLE (1)
#define NL_USE_MEMPOOL (0)
#define USE_TRUTHTABLE (1)
//============================================================
// Solver defines
//============================================================
#define USE_MATRIX_GS (0)
#define USE_GABS (1)
#define USE_MATRIX_GS (0)
#define USE_GABS (1)
// savings are eaten up by effort
// FIXME: Convert into solver parameter
#define USE_LINEAR_PREDICTION (0)
#define USE_LINEAR_PREDICTION (0)
#define NETLIST_GMIN_DEFAULT (1e-9)

View File

@ -14,7 +14,6 @@
namespace netlist
{
// ----------------------------------------------------------------------------------------
// net_device_t_base_factory
// ----------------------------------------------------------------------------------------

View File

@ -20,7 +20,6 @@
namespace netlist
{
// -----------------------------------------------------------------------------
// net_dev class factory
// -----------------------------------------------------------------------------

View File

@ -44,8 +44,8 @@ namespace netlist
clear();
}
std::size_t capacity() const { return m_list.size(); }
bool empty() const { return (m_end == &m_list[1]); }
std::size_t capacity() const { return m_list.size(); }
bool empty() const { return (m_end == &m_list[1]); }
void push(const Time t, Element o) NOEXCEPT
{
@ -116,9 +116,9 @@ namespace netlist
// save state support & mame disasm
const entry_t *listptr() const { return &m_list[1]; }
std::size_t size() const { return m_end - &m_list[1]; }
const entry_t & operator[](const std::size_t index) const { return m_list[ 1 + index]; }
const entry_t *listptr() const { return &m_list[1]; }
std::size_t size() const { return m_end - &m_list[1]; }
const entry_t & operator[](const std::size_t index) const { return m_list[ 1 + index]; }
private:

View File

@ -399,7 +399,7 @@ core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, device_objec
return term;
}
param_t *setup_t::find_param(const pstring &param_in, bool required)
param_t *setup_t::find_param(const pstring &param_in, bool required) const
{
const pstring param_in_fqn = build_fqn(param_in);

View File

@ -63,7 +63,6 @@
#define NETLIST_START(name) \
void NETLIST_NAME(name)(netlist::setup_t &setup) \
{
#define NETLIST_END() }
#define LOCAL_SOURCE(name) \
@ -105,13 +104,12 @@ void NETLIST_NAME(name)(netlist::setup_t &setup) \
desc.family = x;
#define TRUTHTABLE_END() \
netlist::devices::tt_factory_create(setup, desc); \
netlist::devices::tt_factory_create(setup, desc); \
}
namespace netlist
{
// -----------------------------------------------------------------------------
// truthtable desc
// -----------------------------------------------------------------------------
@ -173,7 +171,7 @@ namespace netlist
using link_t = std::pair<pstring, pstring>;
setup_t(netlist_t &netlist);
explicit setup_t(netlist_t &netlist);
~setup_t();
netlist_t &netlist() { return m_netlist; }
@ -210,7 +208,7 @@ namespace netlist
bool device_exists(const pstring name) const;
param_t *find_param(const pstring &param_in, bool required = true);
param_t *find_param(const pstring &param_in, bool required = true) const;
void start_devices();
void resolve_inputs();

View File

@ -11,7 +11,6 @@
#include "palloc.h"
namespace plib {
//============================================================
// Exceptions
//============================================================

View File

@ -17,7 +17,6 @@
#include "pstring.h"
namespace plib {
//============================================================
// exception base
//============================================================
@ -41,7 +40,7 @@ private:
template<typename T, typename... Args>
T *palloc(Args&&... args)
{
return new T(std::forward<Args>(args)...);
return new T(std::forward<Args>(args)...);
}
template<typename T>
@ -58,7 +57,7 @@ void pfree_array(T *ptr) { delete [] ptr; }
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
template<typename BC, typename DC, typename... Args>
@ -79,8 +78,15 @@ public:
: m_ptr(p), m_is_owned(owned)
{ }
owned_ptr(const owned_ptr &r) = delete;
owned_ptr & operator =(const owned_ptr &r) = delete;
owned_ptr & operator =(owned_ptr &r) = delete;
owned_ptr & operator =(owned_ptr &&r)
{
m_is_owned = r.m_is_owned;
m_ptr = r.m_ptr;
r.m_is_owned = false;
r.m_ptr = nullptr;
return *this;
}
owned_ptr(owned_ptr &&r)
{
m_is_owned = r.m_is_owned;
@ -92,17 +98,17 @@ public:
template<typename DC>
owned_ptr(owned_ptr<DC> &&r)
{
SC *dest_ptr = &dynamic_cast<SC &>(*r.get());
bool o = r.is_owned();
m_ptr = static_cast<SC *>(r.get());
m_is_owned = r.is_owned();
r.release();
m_is_owned = o;
m_ptr = dest_ptr;
}
~owned_ptr()
{
if (m_is_owned)
if (m_is_owned && m_ptr != nullptr)
delete m_ptr;
m_is_owned = false;
m_ptr = nullptr;
}
template<typename DC, typename... Args>
static owned_ptr Create(Args&&... args)
@ -110,7 +116,7 @@ public:
owned_ptr a;
DC *x = new DC(std::forward<Args>(args)...);
a.m_ptr = static_cast<SC *>(x);
return a;
return std::move(a);
}
template<typename... Args>
@ -118,7 +124,7 @@ public:
{
owned_ptr a;
a.m_ptr = new SC(std::forward<Args>(args)...);
return a;
return std::move(a);
}
void release()
{
@ -128,8 +134,9 @@ public:
bool is_owned() const { return m_is_owned; }
#if 1
template<typename DC>
owned_ptr<DC> & operator =(owned_ptr<DC> &r)
owned_ptr & operator =(owned_ptr<DC> &&r)
{
m_is_owned = r.m_is_owned;
m_ptr = r.m_ptr;
@ -137,6 +144,7 @@ public:
r.m_ptr = nullptr;
return *this;
}
#endif
SC * operator ->() const { return m_ptr; }
SC & operator *() const { return *m_ptr; }
SC * get() const { return m_ptr; }

View File

@ -7,8 +7,6 @@
namespace plib {
namespace chrono {
#if defined(__x86_64__) && !defined(_clang__) && !defined(_MSC_VER) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6))
fast_ticks::type fast_ticks::per_second()

View File

@ -42,8 +42,8 @@ namespace chrono {
"rdtscp;"
"shl $32, %%rdx;"
"or %%rdx, %%rax;"
: "=a"(v) /* outputs */
: /* inputs */
: "=a"(v) /* outputs */
: /* inputs */
: "%rcx", "%rdx" /* clobbers */
);
return v;
@ -66,8 +66,8 @@ namespace chrono {
"rdtsc;"
"shl $32, %%rdx;"
"or %%rdx, %%rax;"
: "=a"(v) /* outputs */
: /* inputs */
: "=a"(v) /* outputs */
: /* inputs */
: "%rdx" /* clobbers */
);
return v;

View File

@ -87,7 +87,6 @@ typedef __int128_t INT128;
#endif
namespace plib {
/*
* The following class was derived from the MAME delegate.h code.
* It derives a pointer to a member function.

View File

@ -13,7 +13,6 @@
#endif
namespace plib {
dynlib::dynlib(const pstring libname)
: m_isLoaded(false), m_lib(nullptr)
{
@ -43,7 +42,7 @@ dynlib::dynlib(const pstring libname)
dynlib::dynlib(const pstring path, const pstring libname)
: m_isLoaded(false), m_lib(nullptr)
{
// printf("win: loading <%s>\n", libname.cstr());
// printf("win: loading <%s>\n", libname.cstr());
#ifdef WIN32
if (libname != "")
m_lib = LoadLibrary(libname.cstr());

View File

@ -14,7 +14,6 @@
#include "pstring.h"
namespace plib {
// ----------------------------------------------------------------------------------------
// pdynlib: dynamic loading of libraries ...
// ----------------------------------------------------------------------------------------
@ -22,7 +21,7 @@ namespace plib {
class dynlib
{
public:
dynlib(const pstring libname);
explicit dynlib(const pstring libname);
dynlib(const pstring path, const pstring libname);
~dynlib();

View File

@ -17,7 +17,6 @@
#include "palloc.h"
namespace plib {
pfmt::pfmt(const pstring &fmt)
: m_str(m_str_buf), m_allocated(0), m_arg(0)
{
@ -141,4 +140,3 @@ void pfmt::format_element(const char *f, const char *l, const char *fmt_spec, .
}
}

View File

@ -15,7 +15,6 @@
#include "ptypes.h"
namespace plib {
template <typename T>
struct ptype_treats
{
@ -154,8 +153,8 @@ protected:
class pfmt : public pformat_base<pfmt>
{
public:
pfmt(const pstring &fmt);
pfmt(const char *fmt);
explicit pfmt(const pstring &fmt);
explicit pfmt(const char *fmt);
virtual ~pfmt();
operator pstring() const { return m_str; }
@ -245,7 +244,7 @@ template <plog_level::e L, bool build_enabled = true>
class plog_channel : public pfmt_writer_t<build_enabled>
{
public:
plog_channel(plog_dispatch_intf *b) : pfmt_writer_t<build_enabled>(), m_base(b) { }
explicit plog_channel(plog_dispatch_intf *b) : pfmt_writer_t<build_enabled>(), m_base(b) { }
virtual ~plog_channel() { }
protected:
@ -270,7 +269,7 @@ class plog_base
{
public:
plog_base(plog_dispatch_intf *proxy)
explicit plog_base(plog_dispatch_intf *proxy)
: debug(proxy),
info(proxy),
verbose(proxy),

View File

@ -19,14 +19,13 @@
#include "pstring.h"
namespace plib {
/* ----------------------------------------------------------------------------------------
* uninitialised_array_t:
* fixed size array allowing to override constructor and initialize
* members by placement new.
* fixed size array allowing to override constructor and initialize
* members by placement new.
*
* Use with care. This template is provided to improve locality of storage
* in high frequency applications. It should not be used for anything else.
* Use with care. This template is provided to improve locality of storage
* in high frequency applications. It should not be used for anything else.
* ---------------------------------------------------------------------------------------- */
template <class C, std::size_t N>
@ -96,8 +95,8 @@ public:
{
LC* p;
public:
constexpr iter_t(LC* x) noexcept : p(x) {}
iter_t(const iter_t &rhs) noexcept = default;
explicit constexpr iter_t(LC* x) noexcept : p(x) {}
explicit iter_t(const iter_t &rhs) noexcept = default;
iter_t(iter_t &&rhs) noexcept = default;
iter_t& operator++() noexcept {p = p->next();return *this;}
iter_t operator++(int) noexcept {iter_t tmp(*this); operator++(); return tmp;}

View File

@ -8,7 +8,6 @@
#include "poptions.h"
namespace plib {
/***************************************************************************
Options
***************************************************************************/
@ -59,7 +58,6 @@ namespace plib {
options::options()
{
}
options::options(option *o[])

View File

@ -17,7 +17,6 @@
#include "putil.h"
namespace plib {
/***************************************************************************
Options
***************************************************************************/
@ -111,7 +110,7 @@ class options
public:
options();
options(option *o[]);
explicit options(option *o[]);
~options();

View File

@ -18,14 +18,13 @@
#include "pstream.h"
namespace plib {
class ptokenizer
{
P_PREVENT_COPYING(ptokenizer)
public:
virtual ~ptokenizer() {}
ptokenizer(pistream &strm)
explicit ptokenizer(pistream &strm)
: m_strm(strm), m_lineno(1), m_px(0), m_string('"')
{}

View File

@ -8,7 +8,6 @@
#include "pstate.h"
namespace plib {
state_manager_t::state_manager_t()
{
}

View File

@ -20,7 +20,6 @@
// ----------------------------------------------------------------------------------------
namespace plib {
class state_manager_t
{
public:
@ -30,7 +29,7 @@ public:
datatype_t(std::size_t bsize, bool bptr, bool bintegral, bool bfloat)
: size(bsize), is_ptr(bptr), is_integral(bintegral), is_float(bfloat), is_custom(false)
{}
datatype_t(bool bcustom)
explicit datatype_t(bool bcustom)
: size(0), is_ptr(false), is_integral(false), is_float(false), is_custom(bcustom)
{}
@ -84,12 +83,12 @@ public:
~entry_t() { }
pstring m_name;
const datatype_t m_dt;
const void * m_owner;
callback_t * m_callback;
const std::size_t m_count;
void * m_ptr;
pstring m_name;
const datatype_t m_dt;
const void * m_owner;
callback_t * m_callback;
const std::size_t m_count;
void * m_ptr;
template<typename T>
T *resolved()

View File

@ -14,7 +14,6 @@
#include "palloc.h"
namespace plib {
// -----------------------------------------------------------------------------
// pistream: input stream
// -----------------------------------------------------------------------------

View File

@ -17,7 +17,6 @@
#include "pfmtlog.h"
namespace plib {
// -----------------------------------------------------------------------------
// pstream: things common to all streams
// -----------------------------------------------------------------------------
@ -31,7 +30,7 @@ public:
static const pos_type SEEK_EOF = (pos_type) -1;
pstream(const unsigned flags) : m_flags(flags)
explicit pstream(const unsigned flags) : m_flags(flags)
{
}
virtual ~pstream()
@ -99,7 +98,7 @@ class pistream : public pstream
P_PREVENT_COPYING(pistream)
public:
pistream(const unsigned flags) : pstream(flags) {}
explicit pistream(const unsigned flags) : pstream(flags) {}
virtual ~pistream() {}
bool eof() const { return ((flags() & FLAG_EOF) != 0) || bad(); }
@ -134,7 +133,7 @@ class postream : public pstream
P_PREVENT_COPYING(postream)
public:
postream(unsigned flags) : pstream(flags) {}
explicit postream(unsigned flags) : pstream(flags) {}
virtual ~postream() {}
/* this digests linux & dos/windows text files */
@ -230,7 +229,7 @@ class pofilestream : public postream
P_PREVENT_COPYING(pofilestream)
public:
pofilestream(const pstring &fname);
explicit pofilestream(const pstring &fname);
virtual ~pofilestream();
void close();
@ -281,7 +280,7 @@ class pifilestream : public pistream
P_PREVENT_COPYING(pifilestream)
public:
pifilestream(const pstring &fname);
explicit pifilestream(const pstring &fname);
virtual ~pifilestream();
void close();
@ -324,7 +323,7 @@ class pimemstream : public pistream
public:
pimemstream(const void *mem, const pos_type len);
pimemstream(const pomemstream &ostrm);
explicit pimemstream(const pomemstream &ostrm);
virtual ~pimemstream();
protected:
@ -364,7 +363,7 @@ class pstream_fmt_writer_t : public plib::pfmt_writer_t<>
P_PREVENT_COPYING(pstream_fmt_writer_t)
public:
pstream_fmt_writer_t(postream &strm) : m_strm(strm) {}
explicit pstream_fmt_writer_t(postream &strm) : m_strm(strm) {}
virtual ~pstream_fmt_writer_t() { }
protected:

View File

@ -380,19 +380,19 @@ private:
// custom specialization of std::hash can be injected in namespace std
namespace std
{
template<> struct hash<pstring>
{
typedef pstring argument_type;
typedef std::size_t result_type;
result_type operator()(argument_type const& s) const
{
const pstring::mem_t *string = s.cstr();
result_type result = 5381;
for (pstring::mem_t c = *string; c != 0; c = *string++)
result = ((result << 5) + result ) ^ (result >> (32 - 5)) ^ c;
return result;
}
};
template<> struct hash<pstring>
{
typedef pstring argument_type;
typedef std::size_t result_type;
result_type operator()(argument_type const& s) const
{
const pstring::mem_t *string = s.cstr();
result_type result = 5381;
for (pstring::mem_t c = *string; c != 0; c = *string++)
result = ((result << 5) + result ) ^ (result >> (32 - 5)) ^ c;
return result;
}
};
}
#endif /* PSTRING_H_ */

View File

@ -15,7 +15,6 @@
namespace plib
{
template<typename T> struct is_integral : public std::is_integral<T> { };
template<typename T> struct numeric_limits : public std::numeric_limits<T> { };

View File

@ -156,6 +156,3 @@ namespace plib
return pstring(buf);
}
} // namespace plib

View File

@ -49,11 +49,11 @@ namespace plib
template <class C>
struct indexed_compare
{
indexed_compare(const C& target): m_target(target) {}
indexed_compare(const C& target): m_target(target) {}
bool operator()(int a, int b) const { return m_target[a] < m_target[b]; }
bool operator()(int a, int b) const { return m_target[a] < m_target[b]; }
const C& m_target;
const C& m_target;
};
// ----------------------------------------------------------------------------------------

View File

@ -26,17 +26,17 @@ class tool_options_t : public plib::options
public:
tool_options_t() :
plib::options(),
opt_ttr (*this, "t", "time_to_run", 1.0, "time to run the emulation (seconds)"),
opt_name(*this, "n", "name", "", "netlist in file to run; default is first one"),
opt_logs(*this, "l", "logs", "", "colon separated list of terminals to log"),
opt_file(*this, "f", "file", "-", "file to process (default is stdin)"),
opt_type(*this, "y", "type", "spice", "spice:eagle", "type of file to be converted: spice,eagle"),
opt_cmd (*this, "c", "cmd", "run", "run:convert:listdevices:static", "run|convert|listdevices|static"),
opt_inp(*this, "i", "input", "", "input file to process (default is none)"),
opt_verb(*this, "v", "verbose", "be verbose - this produces lots of output"),
opt_quiet(*this, "q", "quiet", "be quiet - no warnings"),
opt_version(*this, "", "version", "display version and exit"),
opt_help(*this, "h", "help", "display help and exit")
opt_ttr (*this, "t", "time_to_run", 1.0, "time to run the emulation (seconds)"),
opt_name(*this, "n", "name", "", "netlist in file to run; default is first one"),
opt_logs(*this, "l", "logs", "", "colon separated list of terminals to log"),
opt_file(*this, "f", "file", "-", "file to process (default is stdin)"),
opt_type(*this, "y", "type", "spice", "spice:eagle", "type of file to be converted: spice,eagle"),
opt_cmd (*this, "c", "cmd", "run", "run:convert:listdevices:static", "run|convert|listdevices|static"),
opt_inp(*this, "i", "input", "", "input file to process (default is none)"),
opt_verb(*this, "v", "verbose", "be verbose - this produces lots of output"),
opt_quiet(*this, "q", "quiet", "be quiet - no warnings"),
opt_version(*this, "", "version", "display version and exit"),
opt_help(*this, "h", "help", "display help and exit")
{}
plib::option_double opt_ttr;
@ -118,6 +118,8 @@ public:
}
}
netlist::setup_t &setup() { return *m_setup; }
tool_options_t *m_opts;
protected:
@ -143,11 +145,13 @@ void usage(tool_options_t &opts)
struct input_t
{
#if 0
input_t()
: m_param(nullptr), m_value(0.0)
{
}
input_t(netlist::netlist_t *netlist, const pstring &line)
#endif
input_t(const netlist::setup_t &setup, const pstring &line)
{
char buf[400];
double t;
@ -155,7 +159,7 @@ struct input_t
if ( e!= 3)
throw netlist::fatalerror_e(plib::pfmt("error {1} scanning line {2}\n")(e)(line));
m_time = netlist::netlist_time::from_double(t);
m_param = netlist->setup().find_param(buf, true);
m_param = setup.find_param(buf, true);
}
void setparam()
@ -183,9 +187,9 @@ struct input_t
};
std::vector<input_t> *read_input(netlist::netlist_t *netlist, pstring fname)
static std::vector<input_t> read_input(const netlist::setup_t &setup, pstring fname)
{
std::vector<input_t> *ret = plib::palloc<std::vector<input_t>>();
std::vector<input_t> ret;
if (fname != "")
{
plib::pifilestream f(fname);
@ -194,8 +198,8 @@ std::vector<input_t> *read_input(netlist::netlist_t *netlist, pstring fname)
{
if (l != "")
{
input_t inp(netlist, l);
ret->push_back(inp);
input_t inp(setup, l);
ret.push_back(inp);
}
}
}
@ -220,7 +224,7 @@ static void run(tool_options_t &opts)
nt.read_netlist(opts.opt_file(), opts.opt_name());
std::vector<input_t> *inps = read_input(&nt, opts.opt_inp());
std::vector<input_t> inps = read_input(nt.setup(), opts.opt_inp());
double ttr = opts.opt_ttr();
t.stop();
@ -234,16 +238,15 @@ static void run(tool_options_t &opts)
unsigned pos = 0;
netlist::netlist_time nlt = netlist::netlist_time::zero();
while (pos < inps->size() && (*inps)[pos].m_time < netlist::netlist_time::from_double(ttr))
while (pos < inps.size() && inps[pos].m_time < netlist::netlist_time::from_double(ttr))
{
nt.process_queue((*inps)[pos].m_time - nlt);
(*inps)[pos].setparam();
nlt = (*inps)[pos].m_time;
nt.process_queue(inps[pos].m_time - nlt);
inps[pos].setparam();
nlt = inps[pos].m_time;
pos++;
}
nt.process_queue(netlist::netlist_time::from_double(ttr) - nlt);
nt.stop();
plib::pfree(inps);
t.stop();

View File

@ -13,13 +13,13 @@ class nlwav_options_t : public plib::options
public:
nlwav_options_t() :
plib::options(),
opt_inp(*this, "i", "input", "", "input file"),
opt_out(*this, "o", "output", "", "output file"),
opt_amp(*this, "a", "amp", 10000.0, "amplification after mean correction"),
opt_verb(*this, "v", "verbose", "be verbose - this produces lots of output"),
opt_inp(*this, "i", "input", "", "input file"),
opt_out(*this, "o", "output", "", "output file"),
opt_amp(*this, "a", "amp", 10000.0, "amplification after mean correction"),
opt_verb(*this, "v", "verbose", "be verbose - this produces lots of output"),
opt_quiet(*this,"q", "quiet", "be quiet - no warnings"),
opt_version(*this, "", "version", "display version and exit"),
opt_help(*this, "h", "help", "display help and exit")
opt_version(*this, "", "version", "display version and exit"),
opt_help(*this, "h", "help", "display help and exit")
{}
plib::option_str opt_inp;
plib::option_str opt_out;

View File

@ -18,7 +18,6 @@ namespace netlist
{
namespace devices
{
/* FIXME: these should become proper devices */
struct solver_parameters_t

View File

@ -30,7 +30,6 @@ namespace netlist
{
namespace devices
{
//#define nl_ext_double _float128 // slow, very slow
//#define nl_ext_double long double // slightly slower
#define nl_ext_double nl_double

View File

@ -15,7 +15,6 @@ namespace netlist
{
namespace devices
{
class matrix_solver_direct1_t: public matrix_solver_direct_t<1,1>
{
public:

View File

@ -15,7 +15,6 @@ namespace netlist
{
namespace devices
{
class matrix_solver_direct2_t: public matrix_solver_direct_t<2,2>
{
public:

View File

@ -19,7 +19,6 @@ namespace netlist
{
namespace devices
{
//#define nl_ext_double _float128 // slow, very slow
//#define nl_ext_double long double // slightly slower
#define nl_ext_double double

View File

@ -27,7 +27,6 @@ namespace netlist
{
namespace devices
{
template <unsigned m_N, unsigned storage_N>
class matrix_solver_GCR_t: public matrix_solver_t
{

View File

@ -23,7 +23,6 @@ namespace netlist
{
namespace devices
{
template <unsigned m_N, unsigned storage_N>
class matrix_solver_GMRES_t: public matrix_solver_direct_t<m_N, storage_N>
{

View File

@ -43,7 +43,6 @@ namespace netlist
{
namespace devices
{
//#define nl_ext_double _float128 // slow, very slow
//#define nl_ext_double long double // slightly slower
#define nl_ext_double nl_double

View File

@ -21,7 +21,6 @@ namespace netlist
{
namespace devices
{
template <unsigned m_N, unsigned storage_N>
class matrix_solver_SOR_t: public matrix_solver_direct_t<m_N, storage_N>
{

View File

@ -22,7 +22,6 @@ namespace netlist
{
namespace devices
{
template <unsigned m_N, unsigned storage_N>
class matrix_solver_SOR_mat_t: public matrix_solver_direct_t<m_N, storage_N>
{

View File

@ -50,7 +50,6 @@ namespace netlist
{
namespace devices
{
//#define nl_ext_double _float128 // slow, very slow
//#define nl_ext_double long double // slightly slower
#define nl_ext_double nl_double

View File

@ -59,7 +59,6 @@ namespace netlist
{
namespace devices
{
void terms_t::add(terminal_t *term, int net_other, bool sorted)
{
if (sorted)

View File

@ -32,7 +32,6 @@ namespace netlist
{
namespace devices
{
class NETLIB_NAME(solver);

View File

@ -284,7 +284,7 @@ CIRCUIT_LAYOUT( breakout )
CHIP("J3", 7402)
CHIP("J4", 9312)
CHIP("J5", 7448)
#if USE_TRUTHTABLE_7448
#if USE_TRUTHTABLE_7448
PARAM(J5.USE_DEACTIVATE, 0) // only use this if compiled with 7448 as a truthtable
#endif
CHIP("J6", 9310)