[Pkg-electronics-commits] [gnucap] 01/17: precalc_last ... move to after setup and make other changes to accomodate

felix salfelder felix-guest at moszumanska.debian.org
Fri Jul 29 11:08:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository gnucap.

commit 254507b4defbc9846a4216ef3f1d982c17dc08aa
Author: al davis <ad211 at freeelectron.net>
Date:   Wed Mar 23 22:46:39 2016 -0400

    precalc_last ...  move to after setup
    and make other changes to accomodate
---
 apps/bm_model.cc               |  2 +-
 apps/bmm_semi.cc               | 61 +++++++++++++++++++++++++++++-------------
 apps/d_coil.cc                 |  2 +-
 apps/d_switch.cc               |  3 ++-
 apps/lang_spice.cc             |  2 +-
 apps/s__init.cc                |  5 +++-
 apps/s_ac.cc                   |  3 +++
 apps/s_dc.cc                   | 11 ++++++++
 apps/s_fo.cc                   |  1 +
 apps/s_tr.cc                   |  1 +
 include/e_compon.h             |  4 +--
 include/m_interp.h             |  1 -
 include/patchlev.h             |  2 +-
 include/u_sim_data.h           |  2 ++
 lib/ap_get.cc                  |  2 +-
 lib/e_compon.cc                |  2 +-
 lib/e_elemnt.cc                |  2 +-
 lib/u_probe.cc                 |  2 +-
 lib/u_sim_data.cc              |  8 +++---
 tests/==out/bm_fit.0.1.ckt.out |  3 +++
 tests/==out/bm_pwl.2.ckt.out   |  2 --
 tests/==out/bm_sffm.3.ckt.out  |  2 +-
 tests/==out/bmm_res.1p.ckt.out |  1 -
 tests/==out/bmm_res.2p.ckt.out |  1 -
 tests/==out/bmm_res.3p.ckt.out |  1 -
 tests/==out/bmm_res.4.ckt.out  |  2 --
 tests/==out/bmm_res.4p.ckt.out |  2 --
 tests/==out/bmm_res.5p.ckt.out |  1 -
 tests/==out/dc_temp.gc.out     | 30 +++++++++++++++++++++
 tests/==out/tran_temp.gc.out   | 15 +++++++++++
 tests/dc_temp.gc               | 33 +++++++++++++++++++++++
 tests/tran_temp.gc             | 13 +++++++++
 32 files changed, 176 insertions(+), 46 deletions(-)

diff --git a/apps/bm_model.cc b/apps/bm_model.cc
index da2d630..bb03b28 100644
--- a/apps/bm_model.cc
+++ b/apps/bm_model.cc
@@ -95,7 +95,7 @@ void EVAL_BM_MODEL::print_common_obsolete_callback(OMSTREAM& o, LANGUAGE* lang)c
     _func->print_common_obsolete_callback(o, lang);
   }else{
     o << modelname();
-    if (_arglist != "") {untested();
+    if (_arglist != "") {
       o << "(" << _arglist << ")";
     }else{
     }
diff --git a/apps/bmm_semi.cc b/apps/bmm_semi.cc
index 3f0aefb..98dc751 100644
--- a/apps/bmm_semi.cc
+++ b/apps/bmm_semi.cc
@@ -1,4 +1,4 @@
-/*$Id: bmm_semi.cc,v 26.138 2013/04/24 02:44:30 al Exp $ -*- C++ -*-
+/*$Id: bmm_semi.cc $ -*- C++ -*-
  * Copyright (C) 2001 Albert Davis
  * Author: Albert Davis <aldavis at gnu.org>
  *
@@ -32,7 +32,7 @@ class EVAL_BM_SEMI_BASE : public EVAL_BM_ACTION_BASE {
 protected:
   PARAMETER<double> _length;
   PARAMETER<double> _width;
-  double _value;
+  double _va_lue;
 private:
   static double const _default_length;
   static double const _default_width;
@@ -52,6 +52,7 @@ protected: // override virtual
   std::string	name()const	{untested();return modelname().c_str();}
   bool		ac_too()const		{untested();return false;}
   bool  	parse_params_obsolete_callback(CS&);
+  bool		parse_numlist(CS& cmd);
 };
 /*--------------------------------------------------------------------------*/
 class EVAL_BM_SEMI_CAPACITOR : public EVAL_BM_SEMI_BASE {
@@ -173,7 +174,7 @@ EVAL_BM_SEMI_BASE::EVAL_BM_SEMI_BASE(int c)
   :EVAL_BM_ACTION_BASE(c),
    _length(_default_length),
    _width(_default_width),
-   _value(_default_value)
+   _va_lue(_default_value)
 {
 }
 /*--------------------------------------------------------------------------*/
@@ -181,7 +182,7 @@ EVAL_BM_SEMI_BASE::EVAL_BM_SEMI_BASE(const EVAL_BM_SEMI_BASE& p)
   :EVAL_BM_ACTION_BASE(p),
    _length(p._length),
    _width(p._width),
-   _value(p._value)
+   _va_lue(p._va_lue)
 {
 }
 /*--------------------------------------------------------------------------*/
@@ -203,7 +204,11 @@ void EVAL_BM_SEMI_BASE::print_common_obsolete_callback(OMSTREAM& o, LANGUAGE* la
 {
   assert(lang);
   o << modelname();
-  print_pair(o, lang, "l", _length);
+  if (_value.has_hard_value()) {
+    o << " " << _value;
+  }else{
+  }
+  print_pair(o, lang, "l", _length, _length.has_hard_value());
   print_pair(o, lang, "w", _width, _width.has_hard_value());
   EVAL_BM_ACTION_BASE::print_common_obsolete_callback(o, lang);
 }
@@ -224,7 +229,20 @@ void EVAL_BM_SEMI_BASE::precalc_first(const CARD_LIST* Scope)
 /*--------------------------------------------------------------------------*/
 void EVAL_BM_SEMI_BASE::tr_eval(ELEMENT* d)const
 {
-  tr_finish_tdv(d, _value);
+  tr_finish_tdv(d, _va_lue);
+}
+/*--------------------------------------------------------------------------*/
+bool EVAL_BM_SEMI_BASE::parse_numlist(CS& cmd)
+{
+  unsigned here = cmd.cursor();
+  PARAMETER<double> val(NOT_VALID);
+  cmd >> val;
+  if (cmd.gotit(here)) {
+    _value = val;
+    return true;
+  }else{
+    return false;
+  }
 }
 /*--------------------------------------------------------------------------*/
 bool EVAL_BM_SEMI_BASE::parse_params_obsolete_callback(CS& cmd)
@@ -272,9 +290,9 @@ void EVAL_BM_SEMI_CAPACITOR::precalc_last(const CARD_LIST* Scope)
   double width = (_width == NOT_INPUT) ? m->_defw : _width;
   double eff_width = width - m->_narrow;
   double eff_length = _length - m->_narrow;
-  _value = m->_cj * eff_length * eff_width + 2. * m->_cjsw * (eff_length + eff_width);
+  _va_lue = m->_cj * eff_length * eff_width + 2. * m->_cjsw * (eff_length + eff_width);
   double tempdiff = (_temp_c - m->_tnom_c);
-  _value *= 1 + m->_tc1*tempdiff + m->_tc2*tempdiff*tempdiff;
+  _va_lue *= 1 + m->_tc1*tempdiff + m->_tc2*tempdiff*tempdiff;
 
   if (eff_width <= 0.) {untested();
     throw Exception_Precalc(modelname() + ": effective width is negative or zero\n");
@@ -322,22 +340,29 @@ void EVAL_BM_SEMI_RESISTOR::precalc_last(const CARD_LIST* Scope)
   double eff_width = width - m->_narrow;
   double eff_length = _length - m->_narrow;
 
-  if (eff_width != 0.) {
-    _value = m->_rsh * eff_length / eff_width;
+  trace4("EVAL_BM_SEMI_RESISTOR::precalc_last", value(), eff_width, eff_length, m->_rsh);
+  if (!has_hard_value(m->_rsh)) {
+    _va_lue = (value());
+  }else if (eff_width != 0.) {
+    _va_lue = m->_rsh * eff_length / eff_width;
   }else{itested();
-    _value = BIGBIG;
+    _va_lue = BIGBIG;
   }
   double tempdiff = (_temp_c - m->_tnom_c);
-  _value *= 1 + m->_tc1*tempdiff + m->_tc2*tempdiff*tempdiff;
+  _va_lue *= 1 + m->_tc1*tempdiff + m->_tc2*tempdiff*tempdiff;
 
-  if (eff_width <= 0.) {itested();
-    throw Exception_Precalc(modelname() + ": effective width is negative or zero\n");
-  }else{
-  }
-  if (eff_length <= 0.) {
-    throw Exception_Precalc(modelname() + ": effective length is negative or zero\n");
+  if (has_hard_value(m->_rsh)) {
+    if (eff_width <= 0.) {itested();
+      throw Exception_Precalc(modelname() + ": effective width is negative or zero\n");
+    }else{
+    }
+    if (eff_length <= 0.) {
+      throw Exception_Precalc(modelname() + ": effective length is negative or zero\n");
+    }else{
+    }
   }else{
   }
+  trace4("EVAL_BM_SEMI_RESISTOR::precalc_last done", value(), eff_width, m->_rsh, _va_lue);
 }
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
diff --git a/apps/d_coil.cc b/apps/d_coil.cc
index c4afdf9..01a2529 100644
--- a/apps/d_coil.cc
+++ b/apps/d_coil.cc
@@ -266,7 +266,7 @@ void DEV_MUTUAL_L::precalc_last()
   _lm = value() * sqrt(l1 * l2);
   trace3(long_label().c_str(), l1, l2, _lm);
 
-  if (_sim->is_first_expand()) {
+  if (_sim->has_op() == s_NONE) {
     assert(_y[0].x  == 0.);
     assert(_y[0].f0 == LINEAR);
     _y[0].f1 = -_lm; // override
diff --git a/apps/d_switch.cc b/apps/d_switch.cc
index ad77d01..6811bad 100644
--- a/apps/d_switch.cc
+++ b/apps/d_switch.cc
@@ -414,7 +414,8 @@ void SWITCH_BASE::precalc_last()
 {
   ELEMENT::precalc_last();
     
-  if (_sim->is_first_expand()) {
+  //if (_sim->is_first_expand()) {
+  if (_sim->has_op() == s_NONE) {
     const COMMON_SWITCH* c = prechecked_cast<const COMMON_SWITCH*>(common());
     assert(c);
     const MODEL_SWITCH* m = prechecked_cast<const MODEL_SWITCH*>(c->model());
diff --git a/apps/lang_spice.cc b/apps/lang_spice.cc
index dea1498..8d8025c 100644
--- a/apps/lang_spice.cc
+++ b/apps/lang_spice.cc
@@ -1042,7 +1042,7 @@ DISPATCHER<CMD>::INSTALL d7(&command_dispatcher, ".build|build", &p7);
 class CMD_SPICE : public CMD {
 public:
   void do_it(CS&, CARD_LIST* Scope)
-  {untested();
+  {
     command("options lang=spice", Scope);
   }
 } p8;
diff --git a/apps/s__init.cc b/apps/s__init.cc
index c63f222..f3efdb8 100644
--- a/apps/s__init.cc
+++ b/apps/s__init.cc
@@ -22,6 +22,7 @@
  * initialization (allocation, node mapping, etc)
  */
 //testing=obsolete
+#include "e_cardlist.h"
 #include "u_status.h"
 #include "u_sim_data.h"
 #include "s__.h"
@@ -45,7 +46,9 @@ void SIM::command_base(CS& cmd)
   assert(_sim->_nstat);
   try {
     setup(cmd);
+    CARD_LIST::card_list.precalc_last();
     ::status.set_up.stop();
+
     switch (ENV::run_mode) {
     case rPRE_MAIN:	unreachable();	break;
     case rBATCH:	itested();
@@ -53,7 +56,7 @@ void SIM::command_base(CS& cmd)
     case rSCRIPT:	sweep();	break;
     case rPRESET:	/*nothing*/	break;
     }
-   }catch (Exception& e) {untested();
+   }catch (Exception& e) {
     error(bDANGER, e.message() + '\n');
     _sim->count_iterations(iTOTAL);
     _sim->_lu.unallocate();
diff --git a/apps/s_ac.cc b/apps/s_ac.cc
index 31f6d9b..1734186 100644
--- a/apps/s_ac.cc
+++ b/apps/s_ac.cc
@@ -79,6 +79,8 @@ void AC::do_it(CS& Cmd, CARD_LIST* Scope)
   _sim->_acx.set_min_pivot(OPT::pivtol);
   
   setup(Cmd);
+  CARD_LIST::card_list.precalc_last();
+
   ::status.set_up.stop();
   switch (ENV::run_mode) {
   case rPRE_MAIN:	unreachable();	break;
@@ -89,6 +91,7 @@ void AC::do_it(CS& Cmd, CARD_LIST* Scope)
   }
   _sim->_acx.unallocate();
   _sim->unalloc_vectors();
+  _sim->_has_op = s_AC;
   _scope = NULL;
   
   ::status.ac.stop();
diff --git a/apps/s_dc.cc b/apps/s_dc.cc
index 6e191b0..41667ec 100644
--- a/apps/s_dc.cc
+++ b/apps/s_dc.cc
@@ -99,6 +99,7 @@ void DC::do_it(CS& Cmd, CARD_LIST* Scope)
   ::status.dc.reset().start();
   _sim->_temp_c = temp_c_in;
   command_base(Cmd);
+  _sim->_has_op = s_DC;
   _scope = NULL;
   ::status.dc.stop();
 }
@@ -112,6 +113,7 @@ void OP::do_it(CS& Cmd, CARD_LIST* Scope)
   ::status.op.reset().start();
   _sim->_temp_c = temp_c_in;
   command_base(Cmd);
+  _sim->_has_op = s_OP;
   _scope = NULL;
   ::status.op.stop();
 }
@@ -340,6 +342,7 @@ void DCOP::options(CS& Cmd, int Nest)
       || outset(Cmd,&_out)
       ;
   }while (Cmd.more() && !Cmd.stuck(&here));
+  _sim->_temp_c = temp_c_in;
 }
 /*--------------------------------------------------------------------------*/
 void DCOP::sweep()
@@ -395,6 +398,14 @@ void DCOP::first(int Nest)
   assert(_sweepval);
   assert(_sweepval[Nest]);
 
+  if (ELEMENT* c = dynamic_cast<ELEMENT*>(_zap[Nest])) {
+    c->set_constant(false); 
+    // because of extra precalc_last could set constant to true
+    // obsolete, once pointer hack is fixed
+  }else{
+    // not needed if not sweeping an element
+  }
+
   *_sweepval[Nest] = _start[Nest];
   _reverse[Nest] = false;
   if (_reverse_in[Nest]) {untested();
diff --git a/apps/s_fo.cc b/apps/s_fo.cc
index 536771b..7e6e810 100644
--- a/apps/s_fo.cc
+++ b/apps/s_fo.cc
@@ -105,6 +105,7 @@ void FOURIER::do_it(CS& Cmd, CARD_LIST* Scope)
   _sim->unalloc_vectors();
   _sim->_lu.unallocate();
   _sim->_aa.unallocate();
+  _sim->_has_op = s_FOURIER;
   _scope = NULL;
 
   ::status.four.stop();
diff --git a/apps/s_tr.cc b/apps/s_tr.cc
index 986c57d..98b5970 100644
--- a/apps/s_tr.cc
+++ b/apps/s_tr.cc
@@ -42,6 +42,7 @@ void TRANSIENT::do_it(CS& Cmd, CARD_LIST* Scope)
   _sim->set_command_tran();
   ::status.tran.reset().start();
   command_base(Cmd);
+  _sim->_has_op = s_TRAN;
   _scope = NULL;
   ::status.tran.stop();
 }
diff --git a/include/e_compon.h b/include/e_compon.h
index 2cf02ba..ee1c390 100644
--- a/include/e_compon.h
+++ b/include/e_compon.h
@@ -102,10 +102,10 @@ public:
   virtual void set_param_by_index(int, std::string&, int);
   virtual int param_count()const {return 4;}
 public:
-  virtual void precalc_first(const CARD_LIST*);
+  virtual void precalc_first(const CARD_LIST*)	{}
   virtual void expand(const COMPONENT*)		{}
   virtual COMMON_COMPONENT* deflate()		{return this;}
-  virtual void precalc_last(const CARD_LIST*)	{}
+  virtual void precalc_last(const CARD_LIST*);
 
   virtual void	tr_eval(ELEMENT*)const;
   virtual void	ac_eval(ELEMENT*)const;
diff --git a/include/m_interp.h b/include/m_interp.h
index d2f75b4..49b2890 100644
--- a/include/m_interp.h
+++ b/include/m_interp.h
@@ -41,7 +41,6 @@ FPOLY1 interpolate(Iterator begin, Iterator end, double x,
   }
   --end;
   if (begin == end) { // only 1 entry -- constant
-    untested();
     f1 = (x < (*begin).first)
       ? ((below != NOT_INPUT) ? below : 0.)
       : ((above != NOT_INPUT) ? above : 0.);
diff --git a/include/patchlev.h b/include/patchlev.h
index e433106..a522ce3 100644
--- a/include/patchlev.h
+++ b/include/patchlev.h
@@ -1 +1 @@
-#define PATCHLEVEL "master 2016-02-02a"
+#define PATCHLEVEL "precalc_last-2 2016-03-23"
diff --git a/include/u_sim_data.h b/include/u_sim_data.h
index 1c4b24e..df19aa0 100644
--- a/include/u_sim_data.h
+++ b/include/u_sim_data.h
@@ -80,6 +80,7 @@ struct INTERFACE SIM_DATA {
   std::deque<CARD*>* _evalq;   /* pointer to evalq to process */
   std::deque<CARD*>* _evalq_uc;/* pointer to evalq under construction */
   WAVE *_waves;		/* storage for waveforms "store" command*/
+  SIM_MODE _has_op;
   SIM_DATA();
   ~SIM_DATA();
   bool is_first_expand() {return !_nstat;}
@@ -155,6 +156,7 @@ struct INTERFACE SIM_DATA {
   bool is_iteration_number(int n)const    {return (_iter[iSTEP] == n);}
   bool exceeds_iteration_limit(OPT::ITL itlnum)const {return(_iter[iSTEP] > OPT::itl[itlnum]);}
   bool uic_now() {return _uic && analysis_is_static() && _time0==0.;}
+  SIM_MODE has_op()const {return _has_op;}
 };
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
diff --git a/lib/ap_get.cc b/lib/ap_get.cc
index 0845057..51be262 100644
--- a/lib/ap_get.cc
+++ b/lib/ap_get.cc
@@ -68,7 +68,7 @@ bool Get(CS& cmd, const std::string& key, double* val, AP_MOD mod, double scale)
     switch(mod) {
     case mNONE:	    untested();	*val = cmd.ctof();		break;
     case mSCALE:    untested(); *val = cmd.ctof()*scale;	break;
-    case mOFFSET:   untested(); *val = cmd.ctof()+scale;	break;
+    case mOFFSET:		*val = cmd.ctof()+scale;	break;
     case mINVERT:   untested(); *val = 1 / cmd.ctof();		break;
     case mPOSITIVE:		*val = std::abs(cmd.ctof());	break;
     case mOCTAL:    untested();	*val = cmd.ctoo();		break;
diff --git a/lib/e_compon.cc b/lib/e_compon.cc
index cbd1f16..7af4930 100644
--- a/lib/e_compon.cc
+++ b/lib/e_compon.cc
@@ -271,7 +271,7 @@ std::string COMMON_COMPONENT::param_value(int i)const
   }
 }
 /*--------------------------------------------------------------------------*/
-void COMMON_COMPONENT::precalc_first(const CARD_LIST* Scope)
+void COMMON_COMPONENT::precalc_last(const CARD_LIST* Scope)
 {
   assert(Scope);
   _tnom_c.e_val(OPT::tnom_c, Scope);
diff --git a/lib/e_elemnt.cc b/lib/e_elemnt.cc
index 5724da2..43abbc7 100644
--- a/lib/e_elemnt.cc
+++ b/lib/e_elemnt.cc
@@ -83,7 +83,7 @@ void ELEMENT::precalc_last()
 
   //BUG// This is needed for AC analysis without doing op (or dc or tran ...) first.
   // Something like it should be moved to ac_begin.
-  if (_sim->is_first_expand()) {
+  if (_sim->has_op() == s_NONE) {
     _y[0].x  = 0.;
     _y[0].f0 = LINEAR;
     _y[0].f1 = value();
diff --git a/lib/u_probe.cc b/lib/u_probe.cc
index a3af60e..14e9b50 100644
--- a/lib/u_probe.cc
+++ b/lib/u_probe.cc
@@ -126,7 +126,7 @@ double PROBE::probe_node(void)const
     return _sim->_genout;
   }else if (Umatch(_what, "hidden ")) {untested();
     return ::status.hidden_steps;
-  }else if (Umatch(_what, "temp{erature} ")) {untested();
+  }else if (Umatch(_what, "temp{erature} ")) {
     return _sim->_temp_c;
   }else if (Umatch(_what, "time ")) {untested();
     return _sim->_time0;
diff --git a/lib/u_sim_data.cc b/lib/u_sim_data.cc
index da544a1..0ff5a5d 100644
--- a/lib/u_sim_data.cc
+++ b/lib/u_sim_data.cc
@@ -39,7 +39,7 @@ SIM_DATA::SIM_DATA()
    _fulldamp(false),
    _last_time(0.),
    _freezetime(false),
-   //_iter(),
+   //_iter(),		//BUG// does not init non-static instances
    _user_nodes(0),
    _subckt_nodes(0),
    _model_nodes(0),
@@ -70,7 +70,8 @@ SIM_DATA::SIM_DATA()
    _late_evalq(),
    _evalq(NULL),
    _evalq_uc(NULL),
-   _waves(NULL)
+   _waves(NULL),
+   _has_op(s_NONE)
 {
   _evalq = &_evalq1;
   _evalq_uc = &_evalq2;
@@ -245,7 +246,6 @@ void SIM_DATA::init()
     uninit();
     init_node_count(CARD_LIST::card_list.nodes()->how_many(), 0, 0);
     CARD_LIST::card_list.expand();
-    CARD_LIST::card_list.precalc_last();
     map__nodes();
     CARD_LIST::card_list.map_nodes();
     alloc_hold_vectors();
@@ -257,7 +257,6 @@ void SIM_DATA::init()
     _last_time = 0;
   }else{
     CARD_LIST::card_list.precalc_first();
-    CARD_LIST::card_list.precalc_last();
   }
 }
 /*--------------------------------------------------------------------------*/
@@ -347,6 +346,7 @@ void SIM_DATA::uninit()
     assert(!_nstat);
     assert(!_nm);
   }
+  _has_op = s_NONE;
 }
 /*--------------------------------------------------------------------------*/
 /*--------------------------------------------------------------------------*/
diff --git a/tests/==out/bm_fit.0.1.ckt.out b/tests/==out/bm_fit.0.1.ckt.out
index cd2c944..80b2419 100644
--- a/tests/==out/bm_fit.0.1.ckt.out
+++ b/tests/==out/bm_fit.0.1.ckt.out
@@ -7,3 +7,6 @@ r3 ( 3 0 )  10.K
 g1 ( 4 0 2 0 ) fit( 0., 0.  1., 1.  4., 2.  9., 3.  16., 4.  25., 5. ) order=1
 r4 ( 4 0 )  10.K
 duplicate points in spline:  9.,  9.
+duplicate points in spline:  9.,  9.
+duplicate points in spline:  9.,  9.
+duplicate points in spline:  9.,  9.
diff --git a/tests/==out/bm_pwl.2.ckt.out b/tests/==out/bm_pwl.2.ckt.out
index 287980e..9edee5b 100644
--- a/tests/==out/bm_pwl.2.ckt.out
+++ b/tests/==out/bm_pwl.2.ckt.out
@@ -5,11 +5,9 @@ r2 ( 2 0 )  1.K
 e1 ( 3 0 2 0 ) pwl( 0., 0.  1., 1.  4., 2.  9., 3.  160., 4.  25., 5. )
 r3 ( 3 0 )  10.K
 e1: PWL is out of order: ( 160.,  25.)
-e1: PWL is out of order: ( 160.,  25.)
 #           v(1)       v(2)       v(3)      
  27.        1.         0.5        0.5       
 e1: PWL is out of order: ( 160.,  25.)
-e1: PWL is out of order: ( 160.,  25.)
 #           v(1)       v(2)       v(3)      
 -10.       -10.       -5.        -5.        
 -9.        -9.        -4.5       -4.5       
diff --git a/tests/==out/bm_sffm.3.ckt.out b/tests/==out/bm_sffm.3.ckt.out
index 27e2146..6bd80ba 100644
--- a/tests/==out/bm_sffm.3.ckt.out
+++ b/tests/==out/bm_sffm.3.ckt.out
@@ -464,7 +464,7 @@
 # v(3)      --------- actual ---------  -------- relative --------
 #freq       value        dB      phase  value        dB      phase
  5.K        2.717f    -291.32   13.266  2.717f    -291.32   13.266
- 6.K        2.137f    -293.40  -20.747  2.137f    -293.40  -20.747
+ 6.K        2.137f    -293.40  -20.748  2.137f    -293.40  -20.748
  7.K        3.7106f   -288.61   -9.558  3.7106f   -288.61   -9.558
  8.K        3.6984f   -288.64   -4.956  3.6984f   -288.64   -4.956
  9.K        10.005f   -280.00  -12.537  10.005f   -280.00  -12.537
diff --git a/tests/==out/bmm_res.1p.ckt.out b/tests/==out/bmm_res.1p.ckt.out
index b97d0bf..700cc4a 100644
--- a/tests/==out/bmm_res.1p.ckt.out
+++ b/tests/==out/bmm_res.1p.ckt.out
@@ -1,5 +1,4 @@
 # semiconductor "resistor" test 
-r2: t1: effective length is negative or zero
 #           v(1)       v(2)       r(r1)      r(r2)     
  27.        2.         0.66667    1.K        500.      
 #Freq       v(1)       v(2)      
diff --git a/tests/==out/bmm_res.2p.ckt.out b/tests/==out/bmm_res.2p.ckt.out
index 49fbb96..ab7ec5f 100644
--- a/tests/==out/bmm_res.2p.ckt.out
+++ b/tests/==out/bmm_res.2p.ckt.out
@@ -1,5 +1,4 @@
 # semiconductor "resistor" test 
-r2: t1: effective length is negative or zero
 #           v(1)       v(2)       r(r1)      r(r2)     
  27.        2.         1.         1.K        1.K       
 #Freq       v(1)       v(2)      
diff --git a/tests/==out/bmm_res.3p.ckt.out b/tests/==out/bmm_res.3p.ckt.out
index 53651e8..2326ef4 100644
--- a/tests/==out/bmm_res.3p.ckt.out
+++ b/tests/==out/bmm_res.3p.ckt.out
@@ -1,5 +1,4 @@
 # semiconductor "resistor" test 
-r2: t1: effective length is negative or zero
 #           v(1)       v(2)       r(r1)      r(r2)     
  27.        2.         1.         1.K        1.K       
 #Freq       v(1)       v(2)      
diff --git a/tests/==out/bmm_res.4.ckt.out b/tests/==out/bmm_res.4.ckt.out
index 32fc58e..6b1c50a 100644
--- a/tests/==out/bmm_res.4.ckt.out
+++ b/tests/==out/bmm_res.4.ckt.out
@@ -1,7 +1,5 @@
 # semiconductor "resistor" test 
 r2: t1: effective length is negative or zero
-r2: t1: effective length is negative or zero
-r2: t1: effective length is negative or zero
 #           v(1)       v(2)       r(r1)      r(r2)     
 r2: short circuit
 r2: short circuit
diff --git a/tests/==out/bmm_res.4p.ckt.out b/tests/==out/bmm_res.4p.ckt.out
index 7b0ffcc..81f07da 100644
--- a/tests/==out/bmm_res.4p.ckt.out
+++ b/tests/==out/bmm_res.4p.ckt.out
@@ -1,6 +1,4 @@
 # semiconductor "resistor" test 
-r2: t1: effective width is negative or zero
-r2: t1: effective length is negative or zero
 r2: t1: effective length is negative or zero
 #           v(1)       v(2)       r(r1)      r(r2)     
 r2: short circuit
diff --git a/tests/==out/bmm_res.5p.ckt.out b/tests/==out/bmm_res.5p.ckt.out
index 28250f4..ddfc6fa 100644
--- a/tests/==out/bmm_res.5p.ckt.out
+++ b/tests/==out/bmm_res.5p.ckt.out
@@ -1,5 +1,4 @@
 # semiconductor "resistor" test 
-r2: t1: effective length is negative or zero
 #           v(1)       v(2)       r(r1)      r(r2)     
  27.        2.         1.         1.K        1.K       
 #Freq       v(1)       v(2)      
diff --git a/tests/==out/dc_temp.gc.out b/tests/==out/dc_temp.gc.out
new file mode 100644
index 0000000..3db1120
--- /dev/null
+++ b/tests/==out/dc_temp.gc.out
@@ -0,0 +1,30 @@
+rtemp1 ( 2 0 ) t1(w=1 l=1)
+.model t1 r ( rsh=1 narrow=NA( 0.) defw=NA( 1.u) tc1=1 tc2=0 tnom=0)
+* skipping L= 
+.model t2 r ( rsh=NA( NA) narrow=NA( 0.) defw=NA( 1.u) tc1=10 tc2=NA( 0.) tnom=0)
+rtemp2 ( 2 0 ) t1(l=2 w=1)
+rtemp3 ( 2 0 ) t2(.5)
+rtemp1 ( 2 0 ) t1 l= 1. w= 1.
+.model t1 r ( rsh=1 narrow=NA( 0.) defw=NA( 1.u) tc1=1 tc2=0 tnom=0)
+* skipping L= 
+.model t2 r ( rsh=NA( NA) narrow=NA( 0.) defw=NA( 1.u) tc1=10 tc2=NA( 0.) tnom=0)
+rtemp2 ( 2 0 ) t1 l= 2. w= 1.
+rtemp3 ( 2 0 ) t2  0.5
+#           r(rtemp1)  r(rtemp2)  r(rtemp3)  temp(0)   
+ 0.         3.         6.         10.5       2.        
+#           r(rtemp1)  r(rtemp2)  r(rtemp3)  temp(0)   
+ 0.         3.         6.         10.5       2.        
+#           r(rtemp1)  r(rtemp2)  r(rtemp3)  temp(0)   
+ 0.         4.         8.         15.5       3.        
+rt1= 4.
+rt2= 8.
+rt3= 15.5
+#           r(rtemp1)  r(rtemp2)  r(rtemp3)  temp(0)   
+ 0.         4.         8.         15.5       3.        
+#           r(rtemp1)  r(rtemp2)  r(rtemp3)  temp(0)   
+ 0.         12.        24.        55.5       11.       
+#           r(rtemp1)  r(rtemp2)  r(rtemp3)  temp(0)   
+ 0.         21.        42.        100.5      20.       
+rt1= 21.
+rt2= 42.
+rt3= 100.5
diff --git a/tests/==out/tran_temp.gc.out b/tests/==out/tran_temp.gc.out
new file mode 100644
index 0000000..cfb2aa6
--- /dev/null
+++ b/tests/==out/tran_temp.gc.out
@@ -0,0 +1,15 @@
+#Time       r(rtemp)   temp(0)   
+ 0.         3.         2.        
+ 1.         3.         2.        
+#Time       r(rtemp)   temp(0)   
+ 0.         2.         1.        
+ 1.         2.         1.        
+#Time       r(rtemp)   temp(0)   
+ 0.         4.         3.        
+ 1.         4.         3.        
+#Time       r(rtemp)   temp(0)   
+ 0.         2.         1.        
+ 1.         2.         1.        
+#Time       r(rtemp)   temp(0)   
+ 0.         12.        11.       
+ 1.         12.        11.       
diff --git a/tests/dc_temp.gc b/tests/dc_temp.gc
new file mode 100644
index 0000000..b36fac1
--- /dev/null
+++ b/tests/dc_temp.gc
@@ -0,0 +1,33 @@
+spice
+.options temp=1
+rtemp1 2 0 t1 (w=1 l=1)
+.model t1 r tnom=0 rsh=1 tc2=0 tc1=1
+
+* skipping L=
+.model t2 r tnom=0 tc1=10
+rtemp2 2 0 t1 (l=2 w=1)
+rtemp3 2 0 t2 (.5) 
+
+.list
+
+.print dc r(rtemp*) temp(0)
+.store dc r(rtemp*) temp(0)
+
+.list
+
+.dc temp=2
+.dc
+.dc temp=3
+.measure rt1 at(probe="r(rtemp1)")
+.measure rt2 at(probe="r(rtemp2)")
+.measure rt3 at(probe="r(rtemp3)")
+.dc
+.dc dtemp=10
+
+.options temperature=20
+.dc dtemp=0
+.measure rt1 at(probe="r(rtemp1)")
+.measure rt2 at(probe="r(rtemp2)")
+.measure rt3 at(probe="r(rtemp3)")
+
+.end
diff --git a/tests/tran_temp.gc b/tests/tran_temp.gc
new file mode 100644
index 0000000..50ad099
--- /dev/null
+++ b/tests/tran_temp.gc
@@ -0,0 +1,13 @@
+spice
+.options temp=1
+rtemp 2 0 t1 (w=1 l=1)
+.model t1 r tnom=0 rsh=1 tc2=0 tc1=1
+
+.print tran r(rtemp) temp(0)
+
+.tran 0 1 1 temp=2
+.tran 0 1 1
+.tran 0 1 1 temp=3
+.tran 0 1 1
+.tran 0 1 1 dtemp=10
+.end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gnucap.git



More information about the Pkg-electronics-commits mailing list