Commit Graph

17 Commits

Author SHA1 Message Date
Couriersud
f7856a8654 Netlist:
- Added Ebers-Moll BJT model. Currently only for NPN.
- Fixed convergence issue in the solver.
- Accuracy for Ebers-Moll must be better than 1e-5 to not generate nano-second spikes.
  Typical sound applications should be able to run with less since the spikes are
  not audible.
2014-01-06 14:39:15 +00:00
Couriersud
a13ab82a0d Netlist:
- added missing parameter to analog input device
- parser now parses NET_MODEL
- fixed a bug in switching bjt implementation
2014-01-05 10:38:01 +00:00
Couriersud
3b28221fd3 Fixed PNP model and added test netlist (bjt.c) [Couriersud] 2014-01-01 20:28:59 +00:00
Couriersud
bc1b26626f Minor modifications to the netlist code. No wn 2014-01-01 18:56:14 +00:00
Couriersud
a8a62c3212 Enhanced the netlist parser and cleaned pong.c. Also added a folder nl_examples which contains standalone netlist examples. [couriersud]
The examples have a ".c" suffix. In eclipse, I get automatic syntax parsing and error notifications. The parser treats "#" preprocessor defines/includes just as comments.

All of these examples can be run through nltool:

./nltool -f nl_examples/opamp.c -t 1 -l OUT

runs the opamp example for 1 second of emulation time and logs the terminal named "OUT" to "netlist_log_OUT.log".

I'll post a simple script to the list to visualize those logs using gnuplot.
2013-12-31 15:35:08 +00:00
Miodrag Milanovic
ca546caa6e Cleanups and version bump 2013-12-24 07:24:51 +00:00
Couriersud
614b76c0fe Pong update:
- based on feedback from IRC hopefully fixed issues like "jumping"
- adjusted VR1 and VR2 to 50%
- disabled all printf output.
2013-12-19 11:58:05 +00:00
Couriersud
0adc956c61 Improved netlist parser 2013-12-17 20:15:50 +00:00
Couriersud
210a6c9846 Netlist & pong:
- update the parser code
- the "rom" netlist and preprocessor netlist are now aligned again.
- got rid of fatalerror in netlist/* code. Implementing applications have
  to implement fatalerror in a derived class from netlist_base_t now.
2013-12-16 21:50:54 +00:00
Couriersud
445a95b4fd Netlist: Class factory is now initialized dynamically.
Note: Please delete all netlist related object files prior to compiling,  e.g.:

rm -rf  obj/windowsd/mame/drivers/pong.o obj/windowsd/emu/machine/net* obj/windowsd/emu/netlist/
2013-12-02 23:20:39 +00:00
Couriersud
7069a5828c Netlist: implemented something more complex: A generic NE555 model. Period accuracy for astable operation is within 2% of the TI datasheet for astable operation.
Fixed an issue in the object model as well and made the code distinguish between a core terminal and analog terminals.

    NETDEV_R(RA, 5000)
    NETDEV_R(RB, 3000)
    NETDEV_C(C, 0.15e-6)
    NETDEV_NE555(555)

    NET_C(V0, 555.GND)
    NET_C(V5, 555.VCC)

    NET_C(RA.1, 555.VCC)
    NET_C(RA.2, 555.DISCH)

    NET_C(RB.1, 555.DISCH)
    NET_C(RB.2, 555.TRIG)

    NET_C(RB.2, 555.THRESH)

    NET_C(555.TRIG, C.1)
    NET_C(C.2, V0)
2013-12-01 15:45:12 +00:00
Couriersud
cb6f1d0194 Netlist: Added pascal like strings (pstring) class. These use only size(void *) in objects. Uses reference counter to share identical string between various pstrings.
In addition, fixed some bugs and added auto-sizing to netlist_list_t. 

There shouldn't be memory holes left now, apart from memory allocated in a static class factory.
2013-11-24 20:08:04 +00:00
Couriersud
4bd4380e80 Netlist: Reworked object model a bit.
There is a slight performance drop (7%). Memory allocation order seems to be an issue here.
2013-11-23 13:50:00 +00:00
Couriersud
4a64c9b058 netlist: Added capacitor. At 50kHz, calculating a resistor net and a cap doesn't hit performance. Promising. 2013-11-17 19:07:14 +00:00
Couriersud
12ae4ea748 Netlist: Need a checkpoint before I continue. 2013-11-15 19:57:34 +00:00
Couriersud
cb5e376229 Netlist: Added some documentation to nl_base.h. Cleared namespace - all classes now have prefix netlist_. 2013-11-11 21:52:08 +00:00
Couriersud
bf19099323 Split the netlist code up into functional pieces like parser, setup and execution. This looks a lot more structured now and highlighted some issue already. 2013-11-04 20:47:32 +00:00