hello all, I'm testing an analog circuit time-base...
# analog-design
hello all, I'm testing an analog circuit time-based which includes a d flip flop, and I would like to replace it by an ideal d flip flop to decouple some issues... is there some way to do this? I found the d_dff digital model on the ngspice, is there any way to: 1. integrate that component in an xschem testbench using a symbol? how do i do the .model and the link to a symbol? 2. integrate it with analog signals using dac_ bridge and adc-bridge' or any other ideas would be really helpful!
Yes, that's the right approach. Possibly the quickest way to get there is to use the
script in
, which will convert a SPICE netlist using standard cells into its xspice equivalent subcircuit.
But just to implement a single flip-flop in xspice, you'd want something like this (unverified):
Copy code
.subckt myflop a_vdd a_gnd a_in a_clk a_out

.model todig_3v3 adc_bridge(in_high=2.2 in_low=1.1
+ rise_delay=10n fall_delay=10n)
.model toana_3v3 dac_bridge(out_high=3.3 out_low=0)

.model ddflop d_dff(ic=0 rise_delay=1n fall_delay=1n)

AA2D1 [a_gnd] [d_gnd] todig_3v3

AA2D2 [a_in] [d_in] todig_3v3
AA2D3 [a_clk] [d_clk] todig_3v3

A1 d_in d_clk d_gnd d_gnd d_out NULL ddflop

AD2A1 [d_out] [a_out] toana_3v3

Thanks a lot for confirming, @User I'm trying but no success for now... I still need to find out how to connect this with the xschem symbols, I'll better ask in #xschem
@User (@User) i have wrapped Tim's model into a
, as you can see it works. The overall delay is a bit too high so the A/D D/A conversion delays must be lowered somewhat in the model. The new components are available on git
Hello @User, WOW, that's great A more basic question: how do i update to get this locally without messing up any dependencies? Just doing the make step again?
Thanks so much by the way
@User If you rebuild open_pdks it will fetch the updated xschem sky130 libs including the new flop. However this takes lot of time, cpu, disk activity. Just copy
ngspice_flop.sch, ngspice_flop.sym, test_ngspice_flop.sch
from git into your open_pdks install, like in:
Ok, thanks a lot once more, @User
@Alfonso Cortés @Vicente Osorio FYI
@aquiles viza regarding xspice models