Commit Graph

22 Commits

Author SHA1 Message Date
Couriersud
3c49610274 More cppcheck fixes. (nw) 2017-03-05 16:19:59 +01:00
couriersud
572ca8100f Reorder include order to comply with best practices. (nw) 2017-02-10 21:53:02 +01:00
couriersud
6d2354264a Do not derive other classes from std::vector. More cleanup. (nw) 2017-01-27 15:22:18 +01:00
couriersud
5c88873a87 Cleanup of includes. (nw) 2017-01-27 15:22:17 +01:00
couriersud
4d15501a30 Netlist: code refactoring
Make streams provide binary access only. Use putf8_reader and
putf8_writer to actually access streams. Replace some char * parameters
with pstring where appropriate. Minor code refactoring and move
functionality were it belongs. (nw)
2017-01-20 22:29:23 +01:00
couriersud
02c3f45bff Fix clang "-Wno-weak-vtables" warnings in netlist source. Refactored
code along the way. (nw)
2017-01-05 01:43:31 +01:00
couriersud
d0970c215f Add a preliminary parser for RINF netlist format. (nw) 2016-08-10 23:08:35 +02:00
couriersud
20a584b348 Various netlist fixes:
- minor include cleanup
- fix a memory hole (caused by assign operators)
- more C++.
2016-08-06 19:22:28 +02:00
couriersud
1e40d95e8b 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]
2016-07-21 11:05:55 +02:00
couriersud
011dbbe713 Moved two macros, added more RAII and improved exceptions. Fixed some
bugs in parser code. (nw)
2016-07-09 00:13:18 +02:00
couriersud
caafc0f782 Netlist improvements:
- nltool now accepts -Ddefine=value to pass on to netlists
- improved option handling and added "dummy" options to add grouping and
  examples in help output.
- improved --cmd=listdevices output
- Fix dynamic timestepping. This will work with breakout using real
  capacitor modelling instead of delay devices. Really slow, but very
  useful to calibrate timings.
- Fix an awful bug in timing for delay devices.
- Switched to clang 3.8 and made code compile with
  -Weverything -Werror -Wno-old-style-cast -Wno-padded -Wno-weak-vtables
  -Wno-missing-variable-declarations -Wno-conversion -Wno-c++98-compat
  -Wno-float-equal -Wno-cast-align -Wno-global-constructors
  -Wno-c++98-compat-pedantic -Wno-exit-time-destructors
  -Wno-format-nonliteral -Wno-weak-template-vtables
  This was a helpful exercise since it brought forward some 
  serious issues with implicit constructors. 
[Couriersud]
2016-07-01 02:09:14 +02:00
couriersud
404e589cff Merge netlist_dev branch, all code_refactoring: (nw)
Object model optimisation. 
    Merge remote-tracking branch 'origin/master' into netlist_dev
    Fix a merge issue. 
    #if ==> #elif. Ouch. 
    Default PHAS_PMF_INTERNAL=0 for 32bit windows mingw. 
    Change UINT8 to uint_[fast|least|8_t. 
    Move state_var so it can be used by base devices as well. 
    Remove last traces of ATTR_ALIGN. 
    Refactored netlist_time into a template.
    Removed implicit double assignment to netlist. Doomed to produce
bugs.
    Instead, use netlist_time::from_double.
    Switch to using proper (i.e. bool type) param_logic_t. 
    Formally differentiate between logic inputs (e.g. switches) and int
    inputs (e.g. resistor ladders or selection switches). 
    Added parameter USE_DEACTIVATE to truthtable devices.
    Added more constexpr to netlist_time.
    Fixed some ifdef code paths.
    - More c++.
    - Simplify main processing loop. As a nice side-effect that squeezed
out some cycles.
    - More cycle squeezing.
    - Removed pvector_t.
    - Use std::sort.
    - Refactored netlist state manager.
    - Introduction of state_var object template to be used on device
state
    members.
    - Changed remaining save occurrences to state_var.
    - Rewrote nltool's listdevices command. This allowed removal of one
    member from devices which served solely for listdevices.
    - Remove hashmap_t. Fix kidniki regression.
2016-06-16 00:01:47 +02:00
couriersud
81880659d2 - More code cleanup.
- Dead code removal and minor refactoring.
- Simplify. Align naming with stl. Fix somed pedantic warnings.
- More STL compatability.
- Remove ATTR_HOT and ATTR_COLD. Refactored netlist_time. 
- Fix long standing workaround which would ignore policy of change-only"
propagation.
- Rewrote for loops to use auto : semantics.
- Truthtable cleanup. (nw)
- Get rid of nl_math. Remove nl_util.h and moved contents to
plib/putil.h.
- Fix standalone build. Refactor ptypes.h. 
[Couriersud]
2016-06-07 21:44:15 +02:00
balr0g
b277908905 - Minor cosmetic refactoring. Added a "uninitialised array" template to
allow in-place creation (for increased locality) of netlist classes.
Main use is in truthtable class.
- Remove PLIB_NAMESPACE macros.
- Remove namespace macros. Use explicit namespace declarations.
- Moved device definitions into cpp files.
- Moved more device definitions into cpp files.
- New prefix "nlid" for include files flags purely internal include
files not to be leaked into userland. 
- Fix factory code.
2016-06-07 21:40:30 +02:00
couriersud
02e3213897 Leading underscore massacre. (nw) 2016-05-27 01:20:09 +02:00
couriersud
fd62273a87 Moved more code into plib namespace. (nw) 2016-05-27 01:19:59 +02:00
Miodrag Milanovic
89c5e1f681 Various cleanups suggested by static analyzer (nw) 2016-04-24 12:58:31 +02:00
couriersud
202e310c52 netlist: rename plist_t to pvector_t to clarify origin. 2016-03-14 22:21:24 +01:00
couriersud
41c8a9f6fa netlist updates:
- First steps to move towards c++11.
- Base plist on std::vector
- Replace pstack with std::stack
- Remove pnamed_list
- use c++ "for each" in a number of places
- Fixed two "time bombs"
[couriersud]
2016-03-14 20:24:29 +01:00
Miodrag Milanovic
0b2ea0800f more fixes (nw) 2016-02-25 14:58:39 +01:00
Miodrag Milanovic
4046c861ba These are not needed with official tools (nw) 2015-11-10 14:39:09 +01:00
Miodrag Milanovic
7c19aac60e Rename *.c -> *.cpp in our source (nw) 2015-11-08 12:56:12 +01:00