| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
| |
pongf now peaks at 589% compared to 570% before.
Amongst a number of improvements in nl_base.h, the 7493 was touched.
Also has some code cleanup and hopefully faster compilation due to
extern template declarations.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Rom and prom devices now properly support tristate outputs. Native OC
output still on the todo list.
In addition this commit fixes a number of bugs around dealing with macro
level parameters and improves documentation by adding a parameter table.
Also srcclean.
|
|
|
|
|
| |
This change will make it a lot easier to add enhanced functionality to
the factory infrastructure.
Using integral constants also improves linking stability.
|
|
|
|
|
|
| |
During object creation netlist tracks the source files which provide
object creation. This is later used e.g. by nltool to create
documentation from source.
|
|
|
|
|
|
|
|
|
|
|
| |
These tristate buffers natively support tristate outputs. For use cases
with fixed enable inputs the devices support a parameter
FORCE_TRISTATE_LOGIC which if being set to 1 makes the device behave
like a logic output.
Added additional syntax and consistency checks for tristate outputs.
Updated the example and added dip implementations including
documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to Aaron Giles who made me think about a different approach.
This is a rewrite from scratch for rom devices. It uses a generic
template to implement rom devices which is used together with a
description struct to define a rom device. This leads to highly
efficient code since all information is available at compile time.
This is also a step forward to support tristate outputs. All rom devices
covered by this approach have tristate or open collector outputs and
thus all code changes to support tristate outputs can now be made
consistently in one file.
|
|
|
|
|
|
|
|
|
|
| |
Code cleanup to better separate the following stages:
- parsing
- setup
- run
In addition preliminary native tristate support was added. Not yet
production ready, please don't use it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- working macro level parameters
- simplified code significantly
- fixed a number of hidden issue
- dead code removal
It is now possible to define netlist level parameters using:
static NETLIST_START(chip)
DEFPARAM(parameter, 123)
RES(R1, $(@.parameter))
....
NETLIST_END()
NETLIST_START(main)
chip(X1)
PARAM(X1.parameter, 1000)
...
NETLIST_END()
This will pass on 1000 to R1 as a parameter.
"@." will resolve to the current namespace. In this case it is X1, thus
"X1.parameter. This is during parsing. During evalution, i.e. device
creation, $(X1.parameter) is evaluated to 1000.
This also means, that global parameters are possible and accessible ...
DEFPARAM(P, 234)
...
RES(R1, $(P))
or going forward
RES(R1, 1000)
CAP(C1, 1.0 / $(R1.R))
This opens up the path to more possibilities ...
static NETLIST_START(DM9456_DIP)
DEFPARAM(MODEL, "74XX")
DM9456_GATE(X1)
DM9456_GATE(X2)
PARAM(X1.MODEL, $(@.MODEL))
PARAM(X2.MODEL, $(@.MODEL))
...
NETLIST_END()
NETLIST_START(main)
DM9456_DIP(X1)
PARAM(X1.MODEL, "LS74XX")
...
NETLIST_END()
The code also has been prepared to allow something along the lines of
LIBENTRY_MODEL(DM74LS00_DIP, DM7400_DIP, "LS74XX")
to define a LS version on top of an DM7400_DIP bare TTL implementation.
This however will need more efforts to existing devices to honour some
timing adjustment in the model definition. It will already honour
different output specifications between LS series and bare TTL if
connected to analog components.
|
|
|
|
| |
Also remove dead code and dead comments.
|
|
|
|
|
|
| |
This a big forward to allow reuse of code. Still a longer way to go
but the foundation there.
Also brings quite a number of simplifications and dead code removal.
|
|
|
|
| |
on connecting two terminals already on the same net.
|
|
|
| |
moving over to clang-tidy-11 and enabling more warnings.
|
|
|
|
| |
Unknown parameters like Solver.ABCD now will cause a fatal error to
be generated.
|
| |
|
|
|
|
|
|
|
| |
Make some calls private which were public before.
Eliminate functions which would be executed only once.
Make terminal reference functions in twoterm.h return const.
Clearly identify the use cases which need a non-const ref
to terminals.
|
|
|
|
| |
Identified a number of code locations which could accept const
arguments.
|
| |
|
| |
|
|
|
|
| |
The purpose here is to make clear what is actually done and to reduce
usage of calls to update.
|
|
|
| |
This seems to be a compiler/standard library issues.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Fixes performance regression and net_splitter struct.
- Fixes nltool time measurements
- pstream simplification
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parameters are now passed to the netlist core as strings. During netlist
creation they are evaluated as functions. This opens the path to
parameters on subdevice level.
Examples:
PARAM(device.XY, (1+2*0.005))
RES(R1, 2.05*RES_K(1)+1)
In addition the commit contains dead code removal.
|
|
|
|
|
|
|
|
|
| |
- Fixed some clang lint warnings
- Removed dead code
- Experimental parser code to allow calculations in parameter value.
This already works for compiled netlists. These changes are
currently disabled. Updated pong netlist (and CRC/SHA) to work
with this new code.
|
| |
|
|
|
|
|
|
| |
- remove pthrow trampline as proposed by Vas.
- identify throwing code by adding noexcept(false)
- move "connected term" information to setup code.
- srcclean
|
|
|
|
|
|
| |
- refactor error messages.
- Fix some drivers to cope with outputted added my the mame driver
for video and sound.
- Fix validation.
|
|
|
|
|
|
|
|
|
|
| |
- Removed DUMMY_INPUT. NC (not connected) pins should now use NC_PIN.
If a NC_PIN is actually connected, an error will be logged and
validation will fail.
- Enabled "extended" validation. This will catch now if power terminals
are not connected.
- Added const and noexcept where appropriate.
- Removed dead code.
- Fixed the 7414 Schmitt-Trigger device to use nld_power_pins
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Devices ttlhigh and ttlhow are no longer automatically created.
- All logic input devices (e.g. TTL_INPUT, LOGIC_INPUT) now need to have
their power terminals (VCC, GND) connected. This opens the route
for more appropriate proxy devices but comes at a cost. If the
connections are omitted your circuit will not work as expected.
Example:
LOGIC_INPUT(I_SD0, 1, "AY8910PORT")
NET_C(VCC, I_SD0.VCC)
NET_C(GND, I_SD0.GND)
- Updated all netlists.
- Removed proxy information from terminal objects. This was replaced by
a lookup hash whose life-span does not exceed netlest setup.
These changes enable the removal of a number of hacks from the
source going forward.
|
|
|
|
|
|
|
|
|
| |
- fixed a code in the netlist creation which caused multiple proxies
to be created for output->terminal connections. A nice side effect of
this fix is a performance increase ~9% for kidniki and ~4% for pong.
Speaking about pong ... maximum is 490%. Dice is running at
280 FPS/60 FPS = 466%, however without any analog emulation.
- Replaced NL_NOEXCEPT with noexcept. assert is now exception-free.
- cppcheck and lint fixes.
|
|
|
|
|
|
| |
- move memory pool to netlist_state_t removing one static allocation.
- add memory allocation stats to verbose output
- nl_assert no longer throws, first step to remove NL_EXCEPT macro.
|
|
|
|
|
|
|
| |
- Fix automatic header generation
- clang lint fixes.
- srcclean
- remove dead code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is a first step towards using formulas in parameters, i.e.
MAINCLOCK(clock, 20 * 30)
The intention is to improve readability and scalability.
Since device registration already provides all necessary information
about parameters, the code to create an include file for all
devices has been improved. Long term, this will remove the need for
device specific header files.
In addition going forward devices will accept either no connections or
all specified connections, i.e.
TTL_7400_NAND(name, chip1.2, chip2.3)
or
TTL_7400_NAND(name)
NET_C(...)
NET_C(...)
This will allow to remove all duplicate definitions which are currently
necessary, i.e. TTL_7400_NAND/TTL_7400_GATE
|
|
|
|
|
|
|
| |
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
|
|
|
|
|
| |
- switch to VS 2019 community and fix standalone build.
- more migration to C++ comment style.
- add some more doxygen markup.
|
|
|
|
| |
Still not optimal, but better than what we had previously. No exception
logging comes closer.
|
|
|
|
|
|
|
|
| |
- more const
- explicitly raise exceptions instead of leaving this to log.fatal()
- correct a number of cppcheck findings.
- dead code removal
- clang lint corrections, e.g. include order
|
|
|
|
|
|
| |
- Separate code out into pmath.h and pstonum.h.
- Fix VC build error
- optimize pfmtlog.h a bit
|
|
|
|
|
|
| |
Both compiling the core and the shaders with __float128 now work.
The support was added to be ready to deal with academic edge cases.
Performance drops to 10% of double - thus disabled by default.
|
|
|
|
|
|
|
| |
Renamed cast member of the constants struct to magic to clearly identify
magic numbers.
Introduced nlconst struct inheriting from plib::constants<nl_fptype> to
make code better understandable.
|
|
|
|
|
|
|
|
|
| |
The newly added RELTOL and VNTOL parameters implement Newton convergence
checks comparable following other SPICE implementations.
The ACCURACY solver parameter now is only used for convergence checks in
iterative solvers.
In addition, type safety was significantly improved and a lot of "magic"
numbers are identifiable now.
|
|
|
|
| |
- fixed a bug in the parray constructor
- replaced NL_NOEXCEPT with noexcept where appropriate
|