diff options
author | 2016-07-21 11:05:55 +0200 | |
---|---|---|
committer | 2016-07-21 11:05:55 +0200 | |
commit | 1e40d95e8b47d834d1ede706921dc19850aaaff2 (patch) | |
tree | f2e74d4451a527313fdc52f49b10955153f1dbd5 /src/lib/netlist/devices/nld_legacy.cpp | |
parent | 7a69d48edd6e1f59c92271eb7fa217eaf0a714c7 (diff) |
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]
Diffstat (limited to 'src/lib/netlist/devices/nld_legacy.cpp')
-rw-r--r-- | src/lib/netlist/devices/nld_legacy.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/netlist/devices/nld_legacy.cpp b/src/lib/netlist/devices/nld_legacy.cpp index e199a2fd371..3a063094b72 100644 --- a/src/lib/netlist/devices/nld_legacy.cpp +++ b/src/lib/netlist/devices/nld_legacy.cpp @@ -56,7 +56,7 @@ namespace netlist param_int_t m_L_to_H; param_int_t m_H_to_L; - state_var_u8 m_last; + state_var<netlist_sig_t> m_last; }; NETLIB_RESET(nicRSFF) @@ -67,15 +67,15 @@ namespace netlist NETLIB_UPDATE(nicRSFF) { - if (!INPLOGIC(m_S)) + if (!m_S()) { - OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(20)); - OUTLOGIC(m_QQ, 0, NLTIME_FROM_NS(20)); + m_Q.push(1, NLTIME_FROM_NS(20)); + m_QQ.push(0, NLTIME_FROM_NS(20)); } - else if (!INPLOGIC(m_R)) + else if (!m_R()) { - OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(20)); - OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(20)); + m_Q.push(0, NLTIME_FROM_NS(20)); + m_QQ.push(1, NLTIME_FROM_NS(20)); } } @@ -86,16 +86,16 @@ namespace netlist NETLIB_UPDATE(nicDelay) { - netlist_sig_t nval = INPLOGIC(m_I); + netlist_sig_t nval = m_I(); if (nval && !m_last) { // L_to_H - OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(m_L_to_H.Value())); + m_Q.push(1, NLTIME_FROM_NS(static_cast<unsigned>(m_L_to_H()))); } else if (!nval && m_last) { // H_to_L - OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(m_H_to_L.Value())); + m_Q.push(0, NLTIME_FROM_NS(static_cast<unsigned>(m_H_to_L()))); } m_last = nval; } |