mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
Fixed netlist examples.
This commit is contained in:
parent
4a4501a474
commit
aa0b321b05
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -363,6 +363,7 @@ nl_examples/msx_mixer_stage.c svneol=native#text/plain
|
|||||||
nl_examples/ne555_astable.c svneol=native#text/plain
|
nl_examples/ne555_astable.c svneol=native#text/plain
|
||||||
nl_examples/opamp.c svneol=native#text/plain
|
nl_examples/opamp.c svneol=native#text/plain
|
||||||
nl_examples/sn74ls629_osc.c svneol=native#text/plain
|
nl_examples/sn74ls629_osc.c svneol=native#text/plain
|
||||||
|
nl_examples/tdice.c svneol=native#text/plain
|
||||||
nl_examples/test.c svneol=native#text/plain
|
nl_examples/test.c svneol=native#text/plain
|
||||||
nl_examples/todo.c svneol=native#text/plain
|
nl_examples/todo.c svneol=native#text/plain
|
||||||
nl_examples/vccs.c svneol=native#text/plain
|
nl_examples/vccs.c svneol=native#text/plain
|
||||||
|
@ -14,9 +14,8 @@ NETLIST_START(7400_astable)
|
|||||||
|
|
||||||
/* Standard stuff */
|
/* Standard stuff */
|
||||||
|
|
||||||
SOLVER(Solver)
|
SOLVER(Solver, 48000)
|
||||||
PARAM(Solver.FREQ, 48000)
|
PARAM(Solver.ACCURACY, 1e-5)
|
||||||
PARAM(Solver.ACCURACY, 1e-4)
|
|
||||||
|
|
||||||
// astable NAND Multivibrator ==> f ~ 1.0 / (3 * R * C)
|
// astable NAND Multivibrator ==> f ~ 1.0 / (3 * R * C)
|
||||||
RES(R1, 4700)
|
RES(R1, 4700)
|
||||||
|
@ -9,10 +9,8 @@
|
|||||||
NETLIST_START(bjt)
|
NETLIST_START(bjt)
|
||||||
/* Standard stuff */
|
/* Standard stuff */
|
||||||
|
|
||||||
CLOCK(clk)
|
CLOCK(clk, 1000) // 1000 Hz
|
||||||
PARAM(clk.FREQ, 1000) // 1000 Hz
|
SOLVER(Solver, 48000)
|
||||||
SOLVER(Solver)
|
|
||||||
PARAM(Solver.FREQ, 48000)
|
|
||||||
ANALOG_INPUT(V5, 5)
|
ANALOG_INPUT(V5, 5)
|
||||||
ANALOG_INPUT(V3, 3.5)
|
ANALOG_INPUT(V3, 3.5)
|
||||||
|
|
||||||
|
@ -10,13 +10,10 @@
|
|||||||
NETLIST_START(bjt)
|
NETLIST_START(bjt)
|
||||||
/* Standard stuff */
|
/* Standard stuff */
|
||||||
|
|
||||||
CLOCK(clk)
|
CLOCK(clk, 10000) // 10000 Hz
|
||||||
PARAM(clk.FREQ, 10000) // 1000 Hz
|
SOLVER(Solver, 48000)
|
||||||
SOLVER(Solver)
|
PARAM(Solver.ACCURACY, 1e-6)
|
||||||
PARAM(Solver.FREQ, 48000)
|
PARAM(Solver.RESCHED_LOOPS, 30)
|
||||||
PARAM(Solver.ACCURACY, 1e-4)
|
|
||||||
//PARAM(Solver.ACCURACY, 1e-6)
|
|
||||||
PARAM(Solver.RESCHED_LOOPS, 50)
|
|
||||||
ANALOG_INPUT(V5, 5)
|
ANALOG_INPUT(V5, 5)
|
||||||
ANALOG_INPUT(V3, 3.5)
|
ANALOG_INPUT(V3, 3.5)
|
||||||
|
|
||||||
@ -39,7 +36,7 @@ NETLIST_START(bjt)
|
|||||||
NET_C(RCE.1, Q.C)
|
NET_C(RCE.1, Q.C)
|
||||||
NET_C(RCE.2, GND)
|
NET_C(RCE.2, GND)
|
||||||
|
|
||||||
//LOG(logB, Q.B)
|
LOG(logB, Q.B)
|
||||||
//LOG(logC, Q.C)
|
LOG(logC, Q.C)
|
||||||
|
|
||||||
NETLIST_END()
|
NETLIST_END()
|
||||||
|
@ -7,15 +7,14 @@
|
|||||||
#include "netlist/devices/net_lib.h"
|
#include "netlist/devices/net_lib.h"
|
||||||
|
|
||||||
NETLIST_START(msx)
|
NETLIST_START(msx)
|
||||||
/* Standard stuff */
|
/* The BJT is used as an amplifier. RESCHED_LOOPS must be relatively high to
|
||||||
|
* allow Newton-Raphson to finish. */
|
||||||
|
|
||||||
CLOCK(clk)
|
CLOCK(clk, 1000) // 1000 Hz
|
||||||
PARAM(clk.FREQ, 1000) // 1000 Hz
|
SOLVER(Solver, 48000)
|
||||||
SOLVER(Solver)
|
|
||||||
PARAM(Solver.FREQ, 48000)
|
|
||||||
PARAM(Solver.ACCURACY, 1e-5)
|
PARAM(Solver.ACCURACY, 1e-5)
|
||||||
PARAM(Solver.CONVERG, 0.3)
|
//PARAM(Solver.CONVERG, 0.3)
|
||||||
PARAM(Solver.RESCHED_LOOPS, 80)
|
PARAM(Solver.RESCHED_LOOPS, 150)
|
||||||
|
|
||||||
RES(RAY8910, 2345) // Max Voltage
|
RES(RAY8910, 2345) // Max Voltage
|
||||||
|
|
||||||
@ -58,7 +57,7 @@ NETLIST_START(msx)
|
|||||||
NET_C(R8.1, T2.E)
|
NET_C(R8.1, T2.E)
|
||||||
NET_C(R8.2, GND)
|
NET_C(R8.2, GND)
|
||||||
|
|
||||||
LOG(logB, T2.B)
|
//LOG(logB, T2.B)
|
||||||
LOG(logC, T2.C)
|
LOG(logC, T2.C)
|
||||||
|
|
||||||
NETLIST_END()
|
NETLIST_END()
|
||||||
|
@ -14,8 +14,7 @@ NETLIST_START(ne555_astable)
|
|||||||
|
|
||||||
/* Standard stuff */
|
/* Standard stuff */
|
||||||
|
|
||||||
SOLVER(Solver)
|
SOLVER(Solver, 48000)
|
||||||
PARAM(Solver.FREQ, 48000)
|
|
||||||
|
|
||||||
ANALOG_INPUT(V5, 5) // 5V
|
ANALOG_INPUT(V5, 5) // 5V
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ NETLIST_START(main)
|
|||||||
NET_C(RL.2, GND)
|
NET_C(RL.2, GND)
|
||||||
NET_C(RL.1, op1.OUT)
|
NET_C(RL.1, op1.OUT)
|
||||||
|
|
||||||
//LOG(logX, op1.OUT)
|
LOG(logX, op1.OUT)
|
||||||
//LOG(logY, clk)
|
//LOG(logY, clk)
|
||||||
NETLIST_END()
|
NETLIST_END()
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "netlist/devices/net_lib.h"
|
#include "netlist/devices/net_lib.h"
|
||||||
|
|
||||||
NETLIST_START(ne555_astable)
|
NETLIST_START(ls629)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Astable ne555
|
* Astable ne555
|
||||||
@ -14,8 +14,7 @@ NETLIST_START(ne555_astable)
|
|||||||
|
|
||||||
/* Standard stuff */
|
/* Standard stuff */
|
||||||
|
|
||||||
SOLVER(Solver)
|
SOLVER(Solver, 48000)
|
||||||
PARAM(Solver.FREQ, 48000)
|
|
||||||
|
|
||||||
ANALOG_INPUT(V5, 5) // 5V
|
ANALOG_INPUT(V5, 5) // 5V
|
||||||
ANALOG_INPUT(VF, 2.5) // 5V
|
ANALOG_INPUT(VF, 2.5) // 5V
|
||||||
@ -28,6 +27,6 @@ NETLIST_START(ne555_astable)
|
|||||||
NET_C(VF, OSC.FC)
|
NET_C(VF, OSC.FC)
|
||||||
NET_C(GND, OSC.ENQ)
|
NET_C(GND, OSC.ENQ)
|
||||||
|
|
||||||
//LOG(log2, OSC.Y)
|
LOG(log2, OSC.Y)
|
||||||
|
|
||||||
NETLIST_END()
|
NETLIST_END()
|
||||||
|
1182
nl_examples/tdice.c
Normal file
1182
nl_examples/tdice.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,23 +3,22 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// CURRENTLY BROKEN
|
||||||
|
|
||||||
#include "netlist/devices/net_lib.h"
|
#include "netlist/devices/net_lib.h"
|
||||||
|
|
||||||
NETLIST_START(bjt)
|
NETLIST_START(bjt)
|
||||||
/* Standard stuff */
|
/* Standard stuff */
|
||||||
|
|
||||||
CLOCK(clk)
|
CLOCK(clk, 1000) // 1000 Hz
|
||||||
PARAM(clk.FREQ, 1000) // 1000 Hz
|
SOLVER(Solver, 48000)
|
||||||
SOLVER(Solver)
|
|
||||||
PARAM(Solver.FREQ, 48000)
|
|
||||||
|
|
||||||
ANALOG_INPUT(V3, 3)
|
ANALOG_INPUT(V3, 3)
|
||||||
ANALOG_INPUT(STOPG, 0)
|
ANALOG_INPUT(STOPG, 0)
|
||||||
NET_ALIAS(SRSTQ, RYf.2)
|
ALIAS(SRSTQ, RYf.2)
|
||||||
NET_ALIAS(SRST, RYc.2)
|
ALIAS(SRST, RYc.2)
|
||||||
NET_C(antenna, GND)
|
NET_C(antenna, GND)
|
||||||
NET_ALIAS(runQ, Q1.C)
|
ALIAS(runQ, Q1.C)
|
||||||
|
|
||||||
TTL_7404_INVERT(e4d, STOPG)
|
TTL_7404_INVERT(e4d, STOPG)
|
||||||
|
|
||||||
@ -38,7 +37,7 @@ NETLIST_START(bjt)
|
|||||||
/* Antenna circuit */
|
/* Antenna circuit */
|
||||||
/* Also has a diode to clamp negative voltages - omitted here */
|
/* Also has a diode to clamp negative voltages - omitted here */
|
||||||
NETDEV_QNPN(Q3, BC237B)
|
NETDEV_QNPN(Q3, BC237B)
|
||||||
NET_ALIAS(antenna, Q3.B)
|
ALIAS(antenna, Q3.B)
|
||||||
NET_C(GND, Q3.E)
|
NET_C(GND, Q3.E)
|
||||||
RES(RX5, 100)
|
RES(RX5, 100)
|
||||||
CAP(CX1, 100)
|
CAP(CX1, 100)
|
||||||
|
Loading…
Reference in New Issue
Block a user