Loading src/modules/NetlistWriter/NetlistWriterModule.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ void NetlistWriterModule::run(Event* event) { if(target_ == Target::SPECTRE) { file << source_name_ << "\\<" << idx << "\\> ("; // The source "gnd" (written "0") doesn't need to be incremented, this double "if" checks which net of the // source the gnd is connected to Also a condition if none of the 2 nets are gnd // source the gnd is connected to. Also a condition if none of the 2 nets are gnd if(source_net1_ == "0") { file << source_net1_ << " " << source_net2_ << "\\<" << idx << "\\>"; } else if(source_net2_ == "0") { Loading @@ -208,7 +208,7 @@ void NetlistWriterModule::run(Event* event) { file << "I_" << idx << " "; // The source "gnd" (written "0") doesn't need to be incremented, this double "if" checks which net of the // source the gnd is connected to Also a condition if none of the 2 nets are gnd // source the gnd is connected to. Also a condition if none of the 2 nets are gnd if(source_net1_ == "0") { file << source_net1_ << " " << source_net2_ << "_" << idx << " "; } else if(source_net2_ == "0") { Loading @@ -232,7 +232,7 @@ void NetlistWriterModule::run(Event* event) { (target_ == Target::SPECTRE) ? file << ") isource delay=" << delay_ << "n type=pwl wave=[" : file << "PWL("; for(auto bin = pulse.begin(); bin != pulse.end(); ++bin) { auto time = step * static_cast<double>(std::distance(pulse.begin(), bin)) * 1e-9; auto time = Units::convert(step,"s") * static_cast<double>(std::distance(pulse.begin(), bin)); double current_bin = *bin / step; auto current = Units::convert(current_bin, "nC"); Loading src/modules/NetlistWriter/README.md +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ A possible configuration is using a `ISOURCE` and the `SPICE` syntax, requiring target = SPICE netlist_template = "front_end.asc" source_type = ISOURCE source_name = Instance_pulse source_name = Instance_source subckt_name = Instance_front_end common_nets = Comp_vref, SUB, VDDA, VSSA, Vfbk waveform_to_save = Pix_in, CSA_out, Comp_vout Loading Loading
src/modules/NetlistWriter/NetlistWriterModule.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -196,7 +196,7 @@ void NetlistWriterModule::run(Event* event) { if(target_ == Target::SPECTRE) { file << source_name_ << "\\<" << idx << "\\> ("; // The source "gnd" (written "0") doesn't need to be incremented, this double "if" checks which net of the // source the gnd is connected to Also a condition if none of the 2 nets are gnd // source the gnd is connected to. Also a condition if none of the 2 nets are gnd if(source_net1_ == "0") { file << source_net1_ << " " << source_net2_ << "\\<" << idx << "\\>"; } else if(source_net2_ == "0") { Loading @@ -208,7 +208,7 @@ void NetlistWriterModule::run(Event* event) { file << "I_" << idx << " "; // The source "gnd" (written "0") doesn't need to be incremented, this double "if" checks which net of the // source the gnd is connected to Also a condition if none of the 2 nets are gnd // source the gnd is connected to. Also a condition if none of the 2 nets are gnd if(source_net1_ == "0") { file << source_net1_ << " " << source_net2_ << "_" << idx << " "; } else if(source_net2_ == "0") { Loading @@ -232,7 +232,7 @@ void NetlistWriterModule::run(Event* event) { (target_ == Target::SPECTRE) ? file << ") isource delay=" << delay_ << "n type=pwl wave=[" : file << "PWL("; for(auto bin = pulse.begin(); bin != pulse.end(); ++bin) { auto time = step * static_cast<double>(std::distance(pulse.begin(), bin)) * 1e-9; auto time = Units::convert(step,"s") * static_cast<double>(std::distance(pulse.begin(), bin)); double current_bin = *bin / step; auto current = Units::convert(current_bin, "nC"); Loading
src/modules/NetlistWriter/README.md +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ A possible configuration is using a `ISOURCE` and the `SPICE` syntax, requiring target = SPICE netlist_template = "front_end.asc" source_type = ISOURCE source_name = Instance_pulse source_name = Instance_source subckt_name = Instance_front_end common_nets = Comp_vref, SUB, VDDA, VSSA, Vfbk waveform_to_save = Pix_in, CSA_out, Comp_vout Loading