src/lib/netlist/adding_devices.md
There are basically two kind of devices you can add to netlist:
In prior netlist releases (<=0.13.0) it was cumbersome to add devices. You had to make sure to add references and code in a number of different locations.
All necessary header files are now created automatically.
Just add your device code (e.g. nld_device.cpp) into the devices folder.
Switch to the build directory
cd build
and type
make generated
to create all the infrastructure code.
Place the device code (e.g. nlmod_device.cpp) into macro/modules.
Switch to the build directory
cd build
and type
make generated
to create all the infrastructure code.
You need to add the files manually to the Visual Studio solution.
In addition to the the steps above you have to add your code additions to the
scripts/src/netlist.lua file.
Make sure to
cd src/lib/netlist/build
make generated
to (re)create the necessary files in the generated directory.
make generated do?make generated calls three python scripts:
create_devinc.pycreate_lib_entries.pycreate_modules.pywhich create the following files in the generated directory:
nld_devinc.hlib_entries.hxxnlm_modules_lib.cppThe information contained in these files in the past had to be included in various places and files previously. Since the information can be extracted programmatically the manual process now was replaced.