(Digital) Input/Output
The analog code models use the standard (analog) nodes provided by ngspice and thus are using all the commands for sourcing, storing, printing, and plotting data.
I/O for event nodes (digital, real, int, and UDNs) is offered by the following tools: For output you may use the plot (17.5.48) or eprint (17.5.25) commands, as well as edisplay (17.5.24) and eprvcd (17.5.26). The latter writes all node data to a VCD file (a digital standard interface) that may be analysed by viewers like gtkwave. For input, you may create a test bench with existing code models (oscillator (12.3.3), frequency divider (12.4.19), state machine (12.4.18) etc.). Reading data from a file is offered by d_source (12.4.21). Some comments and hints have been provided by Sdaau. You may also use the analog input from file, (filesource 12.2.8) and convert its analog input to the digital type by the adc_bridge (12.3.2). If you want reading data from a VCD file, please have a look at ngspice tips and examples forum and apply a python script provided by Sdaau to translate the VCD data to d_source or filesource input.