summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/nl_config.h')
-rw-r--r--src/lib/netlist/nl_config.h152
1 files changed, 77 insertions, 75 deletions
diff --git a/src/lib/netlist/nl_config.h b/src/lib/netlist/nl_config.h
index bbd32490c30..65c8052a95d 100644
--- a/src/lib/netlist/nl_config.h
+++ b/src/lib/netlist/nl_config.h
@@ -1,89 +1,82 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*!
- *
- * \file nl_config.h
- *
- */
+
+/// \file nl_config.h
+///
#ifndef NLCONFIG_H_
#define NLCONFIG_H_
#include "plib/pconfig.h"
-//============================================================
-// SETUP
-//============================================================
-
+/// \addtogroup compiledefine
+/// @{
//============================================================
// GENERAL
//============================================================
-/*! Make use of a memory pool for performance related objects.
- *
- * Set to 1 to compile netlist with memory allocations from a
- * linear memory pool. This is based of the assumption that
- * due to enhanced locality there will be less cache misses.
- * Your mileage may vary.
- *
- */
+/// \brief Make use of a memory pool for performance related objects.
+///
+/// Set to 1 to compile netlist with memory allocations from a
+/// linear memory pool. This is based of the assumption that
+/// due to enhanced locality there will be less cache misses.
+/// Your mileage may vary.
+///
+
#ifndef NL_USE_MEMPOOL
#define NL_USE_MEMPOOL (1)
#endif
-/*! Enable queue statistics.
- *
- * Queue statistics come at a performance cost. Although
- * the cost is low, we disable them here since they are
- * only needed during development.
- *
- */
+/// \brief Enable queue statistics.
+///
+/// Queue statistics come at a performance cost. Although
+/// the cost is low, we disable them here since they are
+/// only needed during development.
+///
+
#ifndef NL_USE_QUEUE_STATS
#define NL_USE_QUEUE_STATS (0)
#endif
-/*! Store input values in logic_terminal_t.
- *
- * Set to 1 to store values in logic_terminal_t instead of
- * accessing them indirectly by pointer from logic_net_t.
- * This approach is stricter and should identify bugs in
- * the netlist core faster.
- * By default it is disabled since it is not as fast as
- * the default approach. It is up to 10% slower.
- *
- */
+/// \brief Store input values in logic_terminal_t.
+///
+/// Set to 1 to store values in logic_terminal_t instead of
+/// accessing them indirectly by pointer from logic_net_t.
+/// This approach is stricter and should identify bugs in
+/// the netlist core faster.
+/// By default it is disabled since it is not as fast as
+/// the default approach. It is up to 10% slower.
+///
+
#ifndef NL_USE_COPY_INSTEAD_OF_REFERENCE
#define NL_USE_COPY_INSTEAD_OF_REFERENCE (0)
#endif
-/*! Use the truthtable implementation of 7448 instead of the coded device
- *
- * 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.
- */
+/// \brief Use the truthtable implementation of 7448 instead of the coded device
+///
+/// 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.
#ifndef NL_USE_TRUTHTABLE_7448
#define NL_USE_TRUTHTABLE_7448 (0)
#endif
-/*! Use the truthtable implementation of 74107 instead of the coded device
- *
- * FIXME: The truthtable implementation of 74107 (JK-Flipflop)
- * is included for educational purposes to demonstrate how
- * to implement state holding devices as truthtables.
- * It will completely nuke performance for pong.
- */
+/// \brief Use the truthtable implementation of 74107 instead of the coded device
+///
+/// FIXME: The truthtable implementation of 74107 (JK-Flipflop)
+/// is included for educational purposes to demonstrate how
+/// to implement state holding devices as truthtables.
+/// It will completely nuke performance for pong.
#ifndef NL_USE_TRUTHTABLE_74107
#define NL_USE_TRUTHTABLE_74107 (0)
#endif
-/*! Use the __float128 type for matrix calculations.
- *
- * Defaults to PUSE_FLOAT128
- */
+/// \brief Use the __float128 type for matrix calculations.
+///
+/// Defaults to \ref PUSE_FLOAT128
#ifndef NL_USE_FLOAT128
#define NL_USE_FLOAT128 PUSE_FLOAT128
@@ -93,6 +86,9 @@
// DEBUGGING
//============================================================
+/// \brief Enable compile time debugging code
+///
+
#ifndef NL_DEBUG
#define NL_DEBUG (false)
//#define NL_DEBUG (true)
@@ -102,37 +98,43 @@
// Time resolution
//============================================================
-// Use nano-second resolution - Sufficient for now
+/// \brief Resolution as clocks per second for timing
+///
+/// Uses nano-second resolution - Sufficient for now
static constexpr const auto NETLIST_INTERNAL_RES = 1000000000;
+
+// FIXME: Belongs into MAME netlist.h
static constexpr const auto NETLIST_CLOCK = NETLIST_INTERNAL_RES;
-/*! Floating point types used
- *
- * nl_fptype is the floating point type used throughout the
- * netlist core.
- *
- * Don't change this! Simple analog circuits like pong
- * work with float. Kidniki just doesn't work at all.
- *
- * FIXME: More work needed. Review magic numbers.
- *
- */
+/// @}
+
+/// \brief Floating point types used
+///
+/// nl_fptype is the floating point type used throughout the
+/// netlist core.
+///
+/// Don't change this! Simple analog circuits like pong
+/// work with float. Kidniki just doesn't work at all.
+///
+/// FIXME: More work needed. Review magic numbers.
+///
+///
using nl_fptype = double;
namespace netlist
{
- /*! Specific constants depending on floating type
- *
- * @tparam FT floating point type: double/float
- */
+ /// \brief Specific constants depending on floating type
+ ///
+ /// @tparam FT floating point type: double/float
+ ///
template <typename FT>
struct fp_constants
{ };
- /*! Specific constants for long double floating point type
- */
+ /// \brief Specific constants for long double floating point type
+ ///
template <>
struct fp_constants<long double>
{
@@ -146,8 +148,8 @@ namespace netlist
static inline constexpr const char * suffix() noexcept { return "L"; }
};
- /*! Specific constants for double floating point type
- */
+ /// \brief Specific constants for double floating point type
+ ///
template <>
struct fp_constants<double>
{
@@ -161,8 +163,8 @@ namespace netlist
static inline constexpr const char * suffix() noexcept { return ""; }
};
- /*! Specific constants for float floating point type
- */
+ /// \brief Specific constants for float floating point type
+ ///
template <>
struct fp_constants<float>
{
@@ -177,8 +179,8 @@ namespace netlist
};
#if (NL_USE_FLOAT128)
- /*! Specific constants for __float128 floating point type
- */
+ /// \brief Specific constants for __float128 floating point type
+ ///
template <>
struct fp_constants<__float128>
{