Elaborate combinational UDP devices.

This commit is contained in:
steve 1999-11-04 01:12:41 +00:00
parent b3afc108cf
commit 50e47c4173
3 changed files with 32 additions and 12 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: design_dump.cc,v 1.53 1999/11/01 02:07:40 steve Exp $" #ident "$Id: design_dump.cc,v 1.54 1999/11/04 01:12:41 steve Exp $"
#endif #endif
/* /*
@ -298,6 +298,12 @@ void NetUDP::dump_comb_(ostream&o, unsigned ind) const
o << " #(" << rise_time() << "," << fall_time() << "," << decay_time() << o << " #(" << rise_time() << "," << fall_time() << "," << decay_time() <<
") " << name() << endl; ") " << name() << endl;
for (CM_::const_iterator ent = cm_.begin()
; ent != cm_.end() ; ent++) {
o << setw(ind+6) << "" << (*ent).first << " --> " <<
(*ent).second << endl;
}
dump_node_pins(o, ind+4); dump_node_pins(o, ind+4);
dump_obj_attr(o, ind+4); dump_obj_attr(o, ind+4);
} }
@ -805,6 +811,9 @@ void Design::dump(ostream&o) const
/* /*
* $Log: design_dump.cc,v $ * $Log: design_dump.cc,v $
* Revision 1.54 1999/11/04 01:12:41 steve
* Elaborate combinational UDP devices.
*
* Revision 1.53 1999/11/01 02:07:40 steve * Revision 1.53 1999/11/01 02:07:40 steve
* Add the synth functor to do generic synthesis * Add the synth functor to do generic synthesis
* and add the LPM_FF device to handle rows of * and add the LPM_FF device to handle rows of

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: netlist.cc,v 1.80 1999/11/02 04:55:34 steve Exp $" #ident "$Id: netlist.cc,v 1.81 1999/11/04 01:12:42 steve Exp $"
#endif #endif
# include <cassert> # include <cassert>
@ -1587,7 +1587,7 @@ bool NetUDP::set_table(const string&input, char output)
/* XXXX Need to check to make sure that the input vector /* XXXX Need to check to make sure that the input vector
contains a legal combination of characters. In contains a legal combination of characters. In
combinational UDPs, only 0, 1 and x are allowed. */ combinational UDPs, only 0, 1 and x are allowed. */
assert(0); cm_[input] = output;
return true; return true;
} }
@ -1969,6 +1969,9 @@ NetNet* Design::find_signal(bool (*func)(const NetNet*))
/* /*
* $Log: netlist.cc,v $ * $Log: netlist.cc,v $
* Revision 1.81 1999/11/04 01:12:42 steve
* Elaborate combinational UDP devices.
*
* Revision 1.80 1999/11/02 04:55:34 steve * Revision 1.80 1999/11/02 04:55:34 steve
* Add the synthesize method to NetExpr to handle * Add the synthesize method to NetExpr to handle
* synthesis of expressions, and use that method * synthesis of expressions, and use that method

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: netlist.h,v 1.83 1999/11/02 04:55:34 steve Exp $" #ident "$Id: netlist.h,v 1.84 1999/11/04 01:12:42 steve Exp $"
#endif #endif
/* /*
@ -569,7 +569,7 @@ class NetLogic : public NetNode {
* In any case, pin 0 is an output, and all the remaining pins are * In any case, pin 0 is an output, and all the remaining pins are
* inputs. * inputs.
* *
* The truth table is canonically represented as a finite state * The sequential truth table is canonically represented as a finite state
* machine with the current state representing the inputs and the * machine with the current state representing the inputs and the
* current output, and the next state carrying the new output value to * current output, and the next state carrying the new output value to
* use. All the outgoing transitions from a state represent a single * use. All the outgoing transitions from a state represent a single
@ -598,6 +598,12 @@ class NetLogic : public NetNode {
* _ -- 10 or x0 (Note that this is not the output '-'.) * _ -- 10 or x0 (Note that this is not the output '-'.)
* % -- 0x or 1x * % -- 0x or 1x
* *
* SEQUENTIAL
* These objects have a single bit of memory. The logic table includes
* an entry for the current value, and allows edges on the inputs. In
* canonical form, inly then entries that generate 0, 1 or - (no change)
* are listed.
*
* COMBINATIONAL * COMBINATIONAL
* The logic table is a map between the input levels and the * The logic table is a map between the input levels and the
* output. Each input pin can have the value 0, 1 or x and the output * output. Each input pin can have the value 0, 1 or x and the output
@ -605,12 +611,6 @@ class NetLogic : public NetNode {
* output is x. In canonical form, only the entries that generate 0 or * output is x. In canonical form, only the entries that generate 0 or
* 1 are listed. * 1 are listed.
* *
* SEQUENTIAL
* These objects have a single bit of memory. The logic table includes
* an entry for the current value, and allows edges on the inputs. In
* canonical form, inly then entries that generate 0, 1 or - (no change)
* are listed.
*
*/ */
class NetUDP : public NetNode { class NetUDP : public NetNode {
@ -636,7 +636,7 @@ class NetUDP : public NetNode {
bool is_sequential() const { return sequential_; } bool is_sequential() const { return sequential_; }
private: private:
const bool sequential_; bool sequential_;
char init_; char init_;
struct state_t_; struct state_t_;
@ -663,6 +663,11 @@ class NetUDP : public NetNode {
state_t_*find_state_(const string&); state_t_*find_state_(const string&);
// A combinational primitive is more simply represented as a
// simple map of input signals to a single output.
typedef map<string,char> CM_;
CM_ cm_;
void dump_sequ_(ostream&o, unsigned ind) const; void dump_sequ_(ostream&o, unsigned ind) const;
void dump_comb_(ostream&o, unsigned ind) const; void dump_comb_(ostream&o, unsigned ind) const;
}; };
@ -1794,6 +1799,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/* /*
* $Log: netlist.h,v $ * $Log: netlist.h,v $
* Revision 1.84 1999/11/04 01:12:42 steve
* Elaborate combinational UDP devices.
*
* Revision 1.83 1999/11/02 04:55:34 steve * Revision 1.83 1999/11/02 04:55:34 steve
* Add the synthesize method to NetExpr to handle * Add the synthesize method to NetExpr to handle
* synthesis of expressions, and use that method * synthesis of expressions, and use that method