Commit Graph

13 Commits

Author SHA1 Message Date
couriersud
c8c7e9a770 Fix timing issue in CD4538. Add "pow" (power) to the function model.
Minor documentation updates. Slight improvement of gorilla sound. (nw)
2017-01-12 23:20:22 +01:00
couriersud
d790daa2a7 Remove parameter GS_THRESHOLD. It is now outdated. (nw) 2017-01-08 17:31:24 +01:00
Miodrag Milanovic
823b8cbc1c Add license to files that were not part of build or are containing data to build sources for cpu emulation (nw) 2016-03-05 10:29:28 +01:00
couriersud
3a8d682827 Added two more models to netlist:
OPAMP: Generic opamp model. This does all the annoying calculations.
Just pass the the datasheet values.

LVCCS: A limited current voltage control current source. This will allow
slew rate limiting going forward. 

In addition:

- add a (small) parallel conductance to all capacitors to improve
convergence.
- some initial work to use "long double".
2015-07-11 16:15:17 +02:00
couriersud
3db351f5c9 Added kidniki sound board netlist to nl_examples. Currently the netlist
boils down to a 87x87 matrix. This is due to a total of 6 opamps which
all are submodels and thus add their own internal nets. 
Gauss Seidel iterative solving comes to it's limits.
nltool runs this at about 50% speed on my machine. Given the complexity
this is quite good. Yet, any m62 game currently will not be playable.
Time for a new cpu :-)
[Andrew Gardner, Couriersud]
2015-06-07 02:16:55 +02:00
Couriersud
4b4b4542b2 Netlist:
- fixed a bug in which the fallback solver was called instead of gauss - seidel.
- matrix solvers are now subdevices of the solver devices
- matrix solvers can now be scheduled independently
- Rename RESCHED_LOOPS to GS_LOOPS (Gauss Seidel)
- Added paragmenter NR_LOOPS (Newton Raphson)
2014-04-18 17:58:35 +00:00
Couriersud
b50d6fff9d Fixed netlist opamp example. 2014-03-04 09:25:39 +00:00
Couriersud
aa0b321b05 Fixed netlist examples. 2014-02-23 14:57:24 +00:00
Couriersud
686d540bad Netlist can now be included as sub-circuits. That's the same approach SPICE uses.
The implementation also supports nesting. 
Opamp emulation now is as easy as

    /* Opamp wired as impedance changer */
    SUBMODEL(op, opamp)

    NET_C(op.GND, GND)
    NET_C(op.PLUS, clk)
    NET_C(op.MINUS, op.OUT)

The missing bit now is a central submodel repository. I'll start a discussion soon on the list.

nl_examples/opamp.c is an example of a impedance changer stage followed by a 1:2 amplifier stage.
System size (= number of voltage levels to be calculated) is between 20 - 30.
Using a simple, yet better opamp model than usually implemented in the old discrete core, I get

./nltool -f nl_examples/opamp.c -t 30
startup time ==> 0.002
runnning ...
30.000000 seconds emulation took 0.438599 real time ==> 6839.96%

Which leaves quite some buffer to emulate even complex mixing and filtering stages in real-time :-)
2014-02-13 00:28:18 +00:00
Couriersud
534348f6a9 Commit current state of netlist examples. Later, these are intended as a basis for regression tests. 2014-02-09 22:43:58 +00:00
Couriersud
4dc77142f9 Major renaming of netlist device macros, like
NETDEV_ALIAS ==> ALIAS
NETDEV_R ==> RES
NETDEV_C ==> CAP
2014-01-19 15:51:25 +00:00
Couriersud
093e3f5f21 Some more netlist examples. 2014-01-06 14:40:43 +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