Skip to content
This repository
Browse code

Apply sequential UDP rework from Stephan Boettcher (PR#39)

  • Loading branch information...
commit 61ad0b23c87d30082fd0b996a13d6c408d113c4e 1 parent 5415dd7
steve authored
7 design_dump.cc
@@ -17,7 +17,7 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #if !defined(WINNT) && !defined(macintosh)
20   -#ident "$Id: design_dump.cc,v 1.101 2000/10/28 00:51:41 steve Exp $"
  20 +#ident "$Id: design_dump.cc,v 1.102 2000/11/04 06:36:24 steve Exp $"
21 21 #endif
22 22
23 23 /*
@@ -395,7 +395,7 @@ void NetUDP::dump_comb_(ostream&o, unsigned ind) const
395 395
396 396 void NetUDP::dump_node(ostream&o, unsigned ind) const
397 397 {
398   - if (sequential_)
  398 + if (is_sequential())
399 399 dump_sequ_(o, ind);
400 400 else
401 401 dump_comb_(o, ind);
@@ -975,6 +975,9 @@ void Design::dump(ostream&o) const
975 975
976 976 /*
977 977 * $Log: design_dump.cc,v $
  978 + * Revision 1.102 2000/11/04 06:36:24 steve
  979 + * Apply sequential UDP rework from Stephan Boettcher (PR#39)
  980 + *
978 981 * Revision 1.101 2000/10/28 00:51:41 steve
979 982 * Add scope to threads in vvm, pass that scope
980 983 * to vpi sysTaskFunc objects, and add vpi calls
36 net_udp.cc
@@ -17,26 +17,19 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #if !defined(WINNT) && !defined(macintosh)
20   -#ident "$Id: net_udp.cc,v 1.1 2000/03/29 04:37:11 steve Exp $"
  20 +#ident "$Id: net_udp.cc,v 1.2 2000/11/04 06:36:24 steve Exp $"
21 21 #endif
22 22
23 23 # include "netlist.h"
24 24
25   -NetUDP::NetUDP(const string&n, unsigned pins, bool sequ)
26   -: NetNode(n, pins), sequential_(sequ), init_('x')
27   -{
28   - pin(0).set_dir(Link::OUTPUT);
29   - for (unsigned idx = 1 ; idx < pins ; idx += 1)
30   - pin(idx).set_dir(Link::INPUT);
31   -
32   -}
33   -
34 25 bool NetUDP::set_table(const string&input, char output)
35 26 {
36   - assert((output == '0') || (output == '1') || (sequential_ &&
37   - (output == '-')));
  27 + assert((output == '0') || (output == '1')
  28 + || (is_sequential() && (output == '-')));
  29 +
  30 + cm_[input] = output;
38 31
39   - if (sequential_) {
  32 + if (is_sequential()) {
40 33 assert(input.length() == pin_count());
41 34 /* XXXX Need to check to make sure that the input vector
42 35 contains a legal combination of characters. */
@@ -46,8 +39,7 @@ bool NetUDP::set_table(const string&input, char output)
46 39 assert(input.length() == (pin_count()-1));
47 40 /* XXXX Need to check to make sure that the input vector
48 41 contains a legal combination of characters. In
49   - combinational UDPs, only 0, 1 and x are allowed. */
50   - cm_[input] = output;
  42 + combinational UDPs, only 0, 1, x, and ? are allowed. */
51 43
52 44 return true;
53 45 }
@@ -124,7 +116,7 @@ char NetUDP::table_lookup(const string&from, char to, unsigned pin) const
124 116
125 117 void NetUDP::set_initial(char val)
126 118 {
127   - assert(sequential_);
  119 + assert(is_sequential());
128 120 assert((val == '0') || (val == '1') || (val == 'x'));
129 121 init_ = val;
130 122 }
@@ -145,8 +137,8 @@ NetUDP::state_t_* NetUDP::find_state_(const string&str)
145 137 return st;
146 138 }
147 139
148   -NetUDP_COMB::NetUDP_COMB(const string&n, unsigned pins)
149   -: NetNode(n, pins)
  140 +NetUDP_COMB::NetUDP_COMB(const string&n, unsigned pins, bool sequ)
  141 + : NetNode(n, pins), sequential_(sequ)
150 142 {
151 143 pin(0).set_dir(Link::OUTPUT);
152 144 pin(0).set_name("O", 0);
@@ -156,16 +148,17 @@ NetUDP_COMB::NetUDP_COMB(const string&n, unsigned pins)
156 148 }
157 149 }
158 150
159   -void NetUDP_COMB::set_table(const string&input, char output)
  151 +bool NetUDP_COMB::set_table(const string&input, char output)
160 152 {
161 153 assert((output == '0') || (output == '1'));
162 154
163 155 assert(input.length() == (pin_count()-1));
164 156 /* XXXX Need to check to make sure that the input vector
165 157 contains a legal combination of characters. In
166   - combinational UDPs, only 0, 1 and x are allowed. */
  158 + combinational UDPs, only 0, 1, x, and ? are allowed. */
167 159 cm_[input] = output;
168 160
  161 + return true;
169 162 }
170 163
171 164 void NetUDP_COMB::cleanup_table()
@@ -198,6 +191,9 @@ bool NetUDP_COMB::next(string&inp, char&out) const
198 191
199 192 /*
200 193 * $Log: net_udp.cc,v $
  194 + * Revision 1.2 2000/11/04 06:36:24 steve
  195 + * Apply sequential UDP rework from Stephan Boettcher (PR#39)
  196 + *
201 197 * Revision 1.1 2000/03/29 04:37:11 steve
202 198 * New and improved combinational primitives.
203 199 *
91 netlist.h
@@ -19,7 +19,7 @@
19 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 20 */
21 21 #if !defined(WINNT) && !defined(macintosh)
22   -#ident "$Id: netlist.h,v 1.176 2000/10/31 17:49:02 steve Exp $"
  22 +#ident "$Id: netlist.h,v 1.177 2000/11/04 06:36:24 steve Exp $"
23 23 #endif
24 24
25 25 /*
@@ -1044,11 +1044,52 @@ class NetLogic : public NetNode {
1044 1044 * 1 are listed.
1045 1045 *
1046 1046 */
1047   -class NetUDP : public NetNode {
  1047 +class NetUDP_COMB : public NetNode {
1048 1048
1049 1049 public:
1050   - explicit NetUDP(const string&n, unsigned pins, bool sequ =false);
  1050 + explicit NetUDP_COMB(const string&n, unsigned pins, bool sequ = false);
  1051 +
  1052 + virtual bool emit_node(struct target_t*) const;
  1053 + virtual void dump_node(ostream&, unsigned ind) const;
  1054 +
  1055 + /* append a new truth table row. */
  1056 + bool set_table(const string&input, char output);
  1057 +
  1058 + /* After the primitive is built up, this method is called to
  1059 + clean up redundancies, and possibly optimize the table. */
  1060 + void cleanup_table();
  1061 +
  1062 + /* Use these methods to scan the truth table of the
  1063 + device. "first" returns the first item in the table, and
  1064 + "next" returns the next item in the table. The method will
  1065 + return false when the scan is done. */
  1066 + bool first(string&inp, char&out) const;
  1067 + bool next(string&inp, char&out) const;
  1068 +
  1069 + bool is_sequential() const { return sequential_; }
  1070 +
  1071 + protected:
  1072 +
  1073 + // A combinational primitive is more simply represented as a
  1074 + // simple map of input signals to a single output.
  1075 + typedef map<string,char> CM_;
  1076 + CM_ cm_;
  1077 +
  1078 + private:
1051 1079
  1080 + bool sequential_;
  1081 +
  1082 + mutable CM_::const_iterator idx_;
  1083 +};
  1084 +
  1085 +
  1086 +
  1087 +class NetUDP : public NetUDP_COMB {
  1088 +
  1089 + public:
  1090 + explicit NetUDP(const string&n, unsigned pins, bool sequ = true)
  1091 + : NetUDP_COMB(n, pins, sequ), init_('x') {};
  1092 +
1052 1093 virtual bool emit_node( struct target_t*) const;
1053 1094 virtual void dump_node(ostream&, unsigned ind) const;
1054 1095
@@ -1065,10 +1106,7 @@ class NetUDP : public NetNode {
1065 1106 void set_initial(char);
1066 1107 char get_initial() const { return init_; }
1067 1108
1068   - bool is_sequential() const { return sequential_; }
1069   -
1070 1109 private:
1071   - bool sequential_;
1072 1110 char init_;
1073 1111
1074 1112 struct state_t_;
@@ -1095,48 +1133,10 @@ class NetUDP : public NetNode {
1095 1133
1096 1134 state_t_*find_state_(const string&);
1097 1135
1098   - // A combinational primitive is more simply represented as a
1099   - // simple map of input signals to a single output.
1100   - typedef map<string,char> CM_;
1101   - CM_ cm_;
1102   -
1103 1136 void dump_sequ_(ostream&o, unsigned ind) const;
1104 1137 void dump_comb_(ostream&o, unsigned ind) const;
1105 1138 };
1106 1139
1107   -class NetUDP_COMB : public NetNode {
1108   -
1109   - public:
1110   - explicit NetUDP_COMB(const string&n, unsigned pins);
1111   -
1112   - virtual bool emit_node(struct target_t*) const;
1113   - virtual void dump_node(ostream&, unsigned ind) const;
1114   -
1115   - /* append a new truth table row. */
1116   - void set_table(const string&input, char output);
1117   -
1118   - /* After the primitive is built up, this method is called to
1119   - clean up redundancies, and possibly optimize the table. */
1120   - void cleanup_table();
1121   -
1122   - /* Use these methods to scan the truth table of the
1123   - device. "first" returns the first item in the table, and
1124   - "next" returns the next item in the table. The method will
1125   - return false when the scan is done. */
1126   - bool first(string&inp, char&out) const;
1127   - bool next(string&inp, char&out) const;
1128   -
1129   - private:
1130   -
1131   - // A combinational primitive is more simply represented as a
1132   - // simple map of input signals to a single output.
1133   - map<string,char> cm_;
1134   -
1135   - mutable map<string,char>::const_iterator idx_;
1136   -};
1137   -
1138   -
1139   -
1140 1140 /* =========
1141 1141 * A process is a behavioral-model description. A process is a
1142 1142 * statement that may be compound. the various statement types may
@@ -2811,6 +2811,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
2811 2811
2812 2812 /*
2813 2813 * $Log: netlist.h,v $
  2814 + * Revision 1.177 2000/11/04 06:36:24 steve
  2815 + * Apply sequential UDP rework from Stephan Boettcher (PR#39)
  2816 + *
2814 2817 * Revision 1.176 2000/10/31 17:49:02 steve
2815 2818 * Support time variables.
2816 2819 *
82 t-vvm.cc
@@ -17,7 +17,7 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #if !defined(WINNT) && !defined(macintosh)
20   -#ident "$Id: t-vvm.cc,v 1.182 2000/10/29 17:10:02 steve Exp $"
  20 +#ident "$Id: t-vvm.cc,v 1.183 2000/11/04 06:36:24 steve Exp $"
21 21 #endif
22 22
23 23 # include <iostream>
@@ -166,7 +166,6 @@ class target_vvm : public target_t {
166 166 virtual bool bufz(const NetBUFZ*);
167 167 virtual void udp(const NetUDP*);
168 168 virtual void udp_comb(const NetUDP_COMB*);
169   - void udp_sequ_(ostream&os, const NetUDP*);
170 169 virtual void net_assign(const NetAssign_*) { }
171 170 virtual void net_case_cmp(const NetCaseCmp*);
172 171 virtual bool net_cassign(const NetCAssign*);
@@ -1922,7 +1921,9 @@ void target_vvm::udp_comb(const NetUDP_COMB*gate)
1922 1921 }
1923 1922 out << " ;" << endl;
1924 1923
1925   - out << "static vvm_udp_comb " << mname << "("
  1924 + out << (gate->is_sequential() ? "static vvm_udp_sequ1 "
  1925 + : "static vvm_udp_comb " )
  1926 + << mname << "("
1926 1927 << (gate->pin_count()-1) << ", " << mname<<"_ctab);" << endl;
1927 1928
1928 1929 /* Connect the output of the device... */
@@ -1945,81 +1946,11 @@ void target_vvm::udp_comb(const NetUDP_COMB*gate)
1945 1946
1946 1947 }
1947 1948
1948   -static string state_to_string(unsigned state, unsigned npins)
1949   -{
1950   - static const char cur_table[3] = { '0', '1', 'x' };
1951   - string res = "";
1952   - for (unsigned idx = 0 ; idx < npins ; idx += 1) {
1953   - char cur = cur_table[state%3];
1954   - res = cur + res;
1955   - state /= 3;
1956   - }
1957   -
1958   - return res;
1959   -}
1960 1949
1961 1950 void target_vvm::udp(const NetUDP*gate)
1962 1951 {
1963 1952 assert(gate->is_sequential());
1964   - udp_sequ_(out, gate);
1965   -}
1966   -
1967   -void target_vvm::udp_sequ_(ostream&os, const NetUDP*gate)
1968   -{
1969   - assert(gate->pin_count() <= 9);
1970   - assert(gate->is_sequential());
1971   - unsigned states = 1;
1972   - for (unsigned idx = 0 ; idx < gate->pin_count() ; idx += 1)
1973   - states *= 3;
1974   -
1975   - os << "static vvm_u32 " << mangle(gate->name()) << "_table[" <<
1976   - states << "] = {" << endl;
1977   - os << hex;
1978   - for (unsigned state = 0 ; state < states ; state += 1) {
1979   - string sstr = state_to_string(state, gate->pin_count());
1980   -
1981   - unsigned long entry = 0;
1982   - for (unsigned idx = 1 ; idx < sstr.length() ; idx += 1) {
1983   - char o[2];
1984   - switch (sstr[idx]) {
1985   - case '0':
1986   - o[0] = '1';
1987   - o[1] = 'x';
1988   - break;
1989   - case '1':
1990   - o[0] = '0';
1991   - o[1] = 'x';
1992   - break;
1993   - case 'x':
1994   - o[0] = '0';
1995   - o[1] = '1';
1996   - break;
1997   - }
1998   -
1999   - o[0] = gate->table_lookup(sstr, o[0], idx);
2000   - o[1] = gate->table_lookup(sstr, o[1], idx);
2001   - entry <<= 2;
2002   - entry |= (o[0] == '0')? 0 : (o[0] == '1')? 1 : 2;
2003   - entry <<= 2;
2004   - entry |= (o[1] == '0')? 0 : (o[1] == '1')? 1 : 2;
2005   - }
2006   - os << " 0x" << setw(8) << setfill('0') << entry << ",";
2007   - if (state % 3 == 2)
2008   - os << endl;
2009   - }
2010   - os << "};" << dec << setfill(' ') << endl;
2011   -
2012   - string outfun = defn_gate_outputfun_(os, gate, 0);
2013   -
2014   - os << "static vvm_udp_ssequ<" << gate->pin_count()-1 << "> " <<
2015   - mangle(gate->name()) << "(&" << outfun << ", V" <<
2016   - gate->get_initial() << ", " << mangle(gate->name()) <<
2017   - "_table);" << endl;
2018   -
2019   - /* The UDP output function is much like other logic gates. Use
2020   - this general method to output the output function. */
2021   - emit_gate_outputfun_(gate, 0);
2022   -
  1953 + udp_comb(gate);
2023 1954 }
2024 1955
2025 1956 void target_vvm::net_case_cmp(const NetCaseCmp*gate)
@@ -3398,6 +3329,9 @@ extern const struct target tgt_vvm = {
3398 3329 };
3399 3330 /*
3400 3331 * $Log: t-vvm.cc,v $
  3332 + * Revision 1.183 2000/11/04 06:36:24 steve
  3333 + * Apply sequential UDP rework from Stephan Boettcher (PR#39)
  3334 + *
3401 3335 * Revision 1.182 2000/10/29 17:10:02 steve
3402 3336 * task threads ned their scope initialized. (PR#32)
3403 3337 *
77 vvm/vvm_gates.h
@@ -19,7 +19,7 @@
19 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 20 */
21 21 #if !defined(WINNT) && !defined(macintosh)
22   -#ident "$Id: vvm_gates.h,v 1.65 2000/09/17 21:26:16 steve Exp $"
  22 +#ident "$Id: vvm_gates.h,v 1.66 2000/11/04 06:36:24 steve Exp $"
23 23 #endif
24 24
25 25 # include "vvm.h"
@@ -792,74 +792,22 @@ class vvm_udp_comb : public vvm_1bit_out, public vvm_nexus::recvr_t {
792 792 void init_I(unsigned idx, vpip_bit_t val);
793 793 void start();
794 794
795   - private:
  795 + protected:
796 796 void take_value(unsigned key, vpip_bit_t val);
797   - vpip_bit_t*ibits_;
  797 + char*ibits_;
  798 + char obit_;
798 799
799 800 unsigned width_;
800 801 const char*table_;
801 802 };
802 803
803   -/*
804   - * A Sequential UDP has a more complex truth table, and handles
805   - * edges. Pin 0 is an output, and all the remaining pins are
806   - * input. The WIDTH is the number of input pins.
807   - *
808   - * See vvm.txt for a description of the gate transition table.
809   - */
810   -template <unsigned WIDTH> class vvm_udp_ssequ {
811   -
812   - public:
813   - explicit vvm_udp_ssequ(vvm_out_event::action_t o, vpip_bit_t i,
814   - const vvm_u32*tab)
815   - : output_(o), table_(tab)
816   - { state_[0] = i;
817   - for (unsigned idx = 1; idx < WIDTH+1 ; idx += 1)
818   - state_[idx] = Vx;
819   - }
820   -
821   - void init(unsigned pin, vpip_bit_t val)
822   - { state_[pin] = val; }
823   -
824   - void set(unsigned pin, vpip_bit_t val)
825   - { assert(pin > 0);
826   - assert(pin < WIDTH+1);
827   - if (val == Vz) val = Vx;
828   - if (state_[pin] == val) return;
829   - // Convert the current state into a table index.
830   - unsigned entry = 0;
831   - for (unsigned idx = 0 ; idx < WIDTH+1 ; idx += 1) {
832   - entry *= 3;
833   - entry += state_[idx];
834   - }
835   - // Get the table entry, and the 4bits that encode
836   - // activity on this pin.
837   - vvm_u32 code = table_[entry];
838   - code >>= 4 * (WIDTH-pin);
839   - switch (state_[pin]*4 + val) {
840   - case (V0*4 + V1):
841   - case (V1*4 + V0):
842   - case (Vx*4 + V0):
843   - code = (code>>2) & 3;
844   - break;
845   - case (V0*4 + Vx):
846   - case (V1*4 + Vx):
847   - case (Vx*4 + V1):
848   - code &= 3;
849   - break;
850   - }
851   - // Convert the code to a vpip_bit_t and run with it.
852   - vpip_bit_t outval = (code == 0)? V0 : (code == 1)? V1 : Vx;
853   - state_[0] = outval;
854   - state_[pin] = val;
855   - vvm_event*ev = new vvm_out_event(outval, output_);
856   - ev->schedule(1); // XXXX Delay not supported.
857   - }
858   -
859   - private:
860   - vvm_out_event::action_t output_;
861   - const vvm_u32*const table_;
862   - vpip_bit_t state_[WIDTH+1];
  804 +class vvm_udp_sequ1 : public vvm_udp_comb
  805 +{
  806 + public:
  807 + explicit vvm_udp_sequ1(unsigned w, const char*t)
  808 + : vvm_udp_comb(w+1, t) {};
  809 + private:
  810 + void take_value(unsigned key, vpip_bit_t val);
863 811 };
864 812
865 813 /*
@@ -976,6 +924,9 @@ class vvm_posedge : public vvm_nexus::recvr_t {
976 924
977 925 /*
978 926 * $Log: vvm_gates.h,v $
  927 + * Revision 1.66 2000/11/04 06:36:24 steve
  928 + * Apply sequential UDP rework from Stephan Boettcher (PR#39)
  929 + *
979 930 * Revision 1.65 2000/09/17 21:26:16 steve
980 931 * Add support for modulus (Eric Aardoom)
981 932 *
130 vvm/vvm_udp.cc
@@ -17,7 +17,7 @@
17 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
18 18 */
19 19 #if !defined(WINNT) && !defined(macintosh)
20   -#ident "$Id: vvm_udp.cc,v 1.1 2000/03/29 04:37:11 steve Exp $"
  20 +#ident "$Id: vvm_udp.cc,v 1.2 2000/11/04 06:36:24 steve Exp $"
21 21 #endif
22 22
23 23 # include "vvm_gates.h"
@@ -25,7 +25,8 @@
25 25 vvm_udp_comb::vvm_udp_comb(unsigned w, const char*t)
26 26 : vvm_1bit_out(0), width_(w), table_(t)
27 27 {
28   - ibits_ = new vpip_bit_t[width_];
  28 + ibits_ = new char[width_];
  29 + obit_ = 'x';
29 30 }
30 31
31 32 vvm_udp_comb::~vvm_udp_comb()
@@ -36,54 +37,123 @@ vvm_udp_comb::~vvm_udp_comb()
36 37 void vvm_udp_comb::init_I(unsigned idx, vpip_bit_t val)
37 38 {
38 39 assert(idx < width_);
39   - ibits_[idx] = val;
  40 + if (B_IS1(val))
  41 + ibits_[idx] = '1';
  42 + else if (B_IS0(val))
  43 + ibits_[idx] = '0';
  44 + else
  45 + ibits_[idx] = 'x';
40 46 }
41 47
42   -void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val)
  48 +void vvm_udp_sequ1::take_value(unsigned key, vpip_bit_t val)
43 49 {
44   - if (ibits_[key] == val)
45   - return;
  50 + assert(key < width_ - 1);
  51 + ibits_[0] = obit_;
  52 + vvm_udp_comb::take_value(key+1, val);
  53 +}
46 54
47   - ibits_[key] = val;
48   - char bit;
49   - if (B_IS1(val))
50   - bit = '1';
51   - else if (B_IS0(val))
52   - bit = '0';
53   - else
54   - bit = 'x';
  55 +void vvm_udp_comb::take_value(unsigned key, vpip_bit_t val)
  56 +{
  57 + char old_bit = ibits_[key];
  58 + init_I(key, val);
55 59
  60 + if (ibits_[key] == old_bit)
  61 + return;
56 62
57 63 for (const char*row = table_ ; row[0] ; row += width_+1) {
58 64
59 65 unsigned idx;
60 66 for (idx = 0 ; idx < width_ ; idx += 1)
61   - if (row[idx] != bit)
62   - break;
  67 + {
  68 + if (row[idx] != ibits_[idx]
  69 + && row[idx] != '?')
  70 + {
  71 + if (idx == key)
  72 + {
  73 + char new_bit = ibits_[idx];
  74 + switch (row[idx])
  75 + {
  76 + case '*':
  77 + continue;
  78 + case '_':
  79 + if (new_bit == '0')
  80 + continue;
  81 + break;
  82 + case '+':
  83 + if (new_bit == '1')
  84 + continue;
  85 + break;
  86 + case '%':
  87 + if (new_bit == 'x')
  88 + continue;
  89 + break;
  90 + case 'r':
  91 + if (old_bit=='0' && new_bit=='1')
  92 + continue;
  93 + break;
  94 + case 'R':
  95 + if (old_bit=='x' && new_bit=='1')
  96 + continue;
  97 + break;
  98 + case 'f':
  99 + if (old_bit=='1' && new_bit=='0')
  100 + continue;
  101 + break;
  102 + case 'F':
  103 + if (old_bit=='x' && new_bit=='0')
  104 + continue;
  105 + break;
  106 + case 'P':
  107 + if (old_bit=='1' && new_bit=='x')
  108 + continue;
  109 + break;
  110 + case 'N':
  111 + if (old_bit=='0' && new_bit=='x')
  112 + continue;
  113 + break;
  114 + }
  115 + // bad edge
  116 + }
  117 + break; // bad edge/level
  118 + }
  119 + }
63 120
64   - if (idx == width_) switch (row[width_]) {
65   -
66   - case '0':
67   - output(St0);
68   - return;
69   - case '1':
70   - output(St1);
  121 + if (idx == width_)
  122 + {
  123 + if (row[width_] == '-'
  124 + || row[width_] == obit_)
71 125 return;
72   - case 'z':
73   - output(HiZ);
74   - return;
75   - default:
76   - output(StX);
77   - return;
78   - }
  126 +
  127 + obit_ = row[width_];
  128 +
  129 + switch (obit_)
  130 + {
  131 + case '0':
  132 + output(St0);
  133 + return;
  134 + case '1':
  135 + output(St1);
  136 + return;
  137 + case 'z':
  138 + output(HiZ);
  139 + return;
  140 + default:
  141 + output(StX);
  142 + return;
  143 + }
  144 + }
79 145 }
80 146
81 147 output(StX);
  148 + obit_ = 'x';
82 149 }
83 150
84 151
85 152 /*
86 153 * $Log: vvm_udp.cc,v $
  154 + * Revision 1.2 2000/11/04 06:36:24 steve
  155 + * Apply sequential UDP rework from Stephan Boettcher (PR#39)
  156 + *
87 157 * Revision 1.1 2000/03/29 04:37:11 steve
88 158 * New and improved combinational primitives.
89 159 *

0 comments on commit 61ad0b2

Please sign in to comment.
Something went wrong with that request. Please try again.