Eric Keiter
04/27/2022, 7:35 PMTim Edwards
04/27/2022, 7:40 PMsrc/xspice/icm/digital/d_genlut
. If you could point me to where the digital behavioral models are implemented in the Xyce source, I might be able to do the implementation myself and just send you a pull request.Tim Edwards
04/27/2022, 7:53 PMDeviceModelPKG/OpenModels/N_DEV_Digital.C
. Since the digital gates are already implemented with function evalTruthTable
, the LUT model really should be trivially simple to implement, as all it needs to do is to define the string parameter, then parse it to generate the truth table, and that's about it.Eric Keiter
04/27/2022, 8:18 PMsrc/xspice/icm/digital/d_genlut
as well.Tim Edwards
04/27/2022, 8:31 PMTim Edwards
04/27/2022, 8:36 PMU<name> <type>(<num inputs>)(<num outputs>)
but may not be worth the trouble to implement. Since Xyce already implements an adder, I'm inclined to just implement the LUT as an N-input, 1-output device.Philipp GĂĽhring
04/29/2022, 9:46 AMTim Edwards
04/29/2022, 1:51 PMU<name> <type>(<num inputs>)(<num outputs>)
is easy, which it might be.Tim Edwards
05/03/2022, 3:45 PMEric Keiter
05/03/2022, 3:47 PMTim Edwards
05/03/2022, 3:51 PMEric Keiter
05/03/2022, 3:53 PMEric Keiter
05/03/2022, 3:55 PMTim Edwards
05/03/2022, 3:55 PMEric Keiter
05/03/2022, 3:57 PMEric Keiter
05/03/2022, 3:58 PMTim Edwards
05/03/2022, 4:31 PMS0RLO S0RHI S1RLO S1RHI
are unrealistic and need to be set before the simulation will produce any change in the output.
I have also been looking at the mixed-signal API. It is very similar to the implementation for ngspice, although the ngspice implementation always had the drawback that the maximum timestep had to be kept very low or else the digital transitions would get missed. If I'm not mistaken, both implementations are build around the VPI interface which implies that Xyce or ngspice is launched from the verilog simulator, which then limits the verilog to a single process. Probably a sufficiently clever script could generate a wrapper verilog module incorporating multiple modules to be simulated as verilog, and figure out all the connections into and out of the SPICE netlist.
Anyway, I do intend to play around with the mixed-signal simulation in Xyce sometime soon. But I like the embedded digital simulation capability, because I can use a simple script to convert any digitally-synthesized subcircuit into its digital component equivalent, and swap it in for the original with an .include
statement. Sure, it takes longer to run than cosimulation, but the embedded digital simulation requires zero effort if you have the script to convert the analog subcircuits to digital (which I do, for ngspice, and can do a quick rewrite for Xyce once I've implemented the LUT model).Tim Edwards
05/03/2022, 8:16 PMEric Keiter
05/03/2022, 8:40 PMEric Keiter
05/03/2022, 8:41 PMEric Keiter
05/03/2022, 8:42 PMEric Keiter
05/03/2022, 8:43 PMEric Keiter
05/03/2022, 8:43 PMTim Edwards
05/03/2022, 8:44 PM