2 * Copyright (c) 1998-2000 Stephen Williams (steve@icarus.com)
4 * This source code is free software; you can redistribute it
5 * and/or modify it in source code form under the terms of the GNU
6 * General Public License as published by the Free Software
7 * Foundation; either version 2 of the License, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 #ident "$Id: design_dump.cc,v 1.176 2007/06/02 03:42:12 steve Exp $"
26 * This file contains all the dump methods of the netlist classes.
32 # include "compiler.h"
33 # include "ivl_assert.h"
35 static ostream
& operator<< (ostream
&o
, NetBlock::Type t
)
48 ostream
& operator << (ostream
&o
, Link::strength_t str
)
72 ostream
& operator << (ostream
&o
, ivl_variable_type_t val
)
94 static inline void dump_scope_path(ostream
&o
, const NetScope
*scope
)
96 if (const NetScope
*parent
= scope
->parent()) {
97 dump_scope_path(o
, parent
);
100 const hname_t name
= scope
->fullname();
101 o
<< name
.peek_name();
102 if (name
.has_number())
103 o
<< "[" << name
.peek_number() << "]";
106 ostream
& operator <<(ostream
&o
, struct __ScopePathManip marg
)
109 dump_scope_path(o
, marg
.scope
);
113 void NetDelaySrc::dump(ostream
&o
, unsigned ind
) const
115 o
<< setw(ind
) << "" << "specify delay";
116 if (posedge_
) o
<< " posedge";
117 if (negedge_
) o
<< " negedge";
119 << "(" << transition_delays_
[IVL_PE_01
]
120 << "," << transition_delays_
[IVL_PE_10
]
121 << "," << transition_delays_
[IVL_PE_0z
]
122 << "/" << transition_delays_
[IVL_PE_z1
]
123 << "," << transition_delays_
[IVL_PE_1z
]
124 << "," << transition_delays_
[IVL_PE_z0
]
125 << "/" << transition_delays_
[IVL_PE_0x
]
126 << "," << transition_delays_
[IVL_PE_x1
]
127 << "," << transition_delays_
[IVL_PE_1x
]
128 << "/" << transition_delays_
[IVL_PE_x0
]
129 << "," << transition_delays_
[IVL_PE_xz
]
130 << "," << transition_delays_
[IVL_PE_zx
]
132 dump_node_pins(o
, ind
+4);
135 /* Dump a net. This can be a wire or register. */
136 void NetNet::dump_net(ostream
&o
, unsigned ind
) const
138 o
<< setw(ind
) << "" << type() << ": " << name()
139 << "[" << s0_
<< ":" << e0_
<< " count=" << pin_count() << "]";
142 o
<< " " << data_type_
;
145 switch (port_type_
) {
146 case NetNet::NOT_A_PORT
:
148 case NetNet::PIMPLICIT
:
149 o
<< " implicit-port?";
154 case NetNet::POUTPUT
:
161 o
<< " (eref=" << peek_eref() << ", lref=" << peek_lref() << ")";
163 o
<< " scope=" << scope_path(scope());
164 o
<< " #(" << rise_time() << "," << fall_time() << ","
165 << decay_time() << ") vector_width=" << vector_width()
166 << " pin_count=" << pin_count()
168 for (unsigned idx
= pin_count() ; idx
> 0 ; idx
-= 1)
169 o
<< pin(idx
-1).get_init();
172 for (unsigned idx
= pin_count() ; idx
> 0 ; idx
-= 1)
173 o
<< pin(idx
-1).nexus()->get_init();
176 for (unsigned idx
= 0 ; idx
< pin_count() ; idx
+= 1) {
177 if (! pin(idx
).is_linked())
180 const Nexus
*nex
= pin(idx
).nexus();
181 o
<< setw(ind
+4) << "" << "[" << idx
<< "]: " << nex
182 << " " << nex
->name() << endl
;
185 for (unsigned idx
= 0 ; idx
< delay_paths_
.size() ; idx
+= 1) {
186 const NetDelaySrc
*cur
= delay_paths_
[idx
];
190 dump_obj_attr(o
, ind
+4);
193 /* Dump a NetNode and its pins. Dump what I know about the netnode on
194 the first line, then list all the pins, with the name of the
196 void NetNode::dump_node(ostream
&o
, unsigned ind
) const
198 o
<< setw(ind
) << "" << "node: ";
199 o
<< typeid(*this).name() << " #(" << rise_time()
200 << "," << fall_time() << "," << decay_time() << ") " << name()
203 dump_node_pins(o
, ind
+4);
204 dump_obj_attr(o
, ind
+4);
207 /* This is the generic dumping of all the signals connected to each
208 pin of the object. The "this" object is not printed, only the
209 signals connected to this. */
210 void NetObj::dump_node_pins(ostream
&o
, unsigned ind
) const
212 for (unsigned idx
= 0 ; idx
< pin_count() ; idx
+= 1) {
213 o
<< setw(ind
) << "" << idx
<< " " << pin(idx
).get_name()
214 << "<" << pin(idx
).get_inst() << ">";
216 switch (pin(idx
).get_dir()) {
228 o
<< " (" << pin(idx
).drive0() << "0 "
229 << pin(idx
).drive1() << "1): ";
231 if (pin(idx
).is_linked()) {
232 const Nexus
*nex
= pin(idx
).nexus();
233 o
<< nex
<< " " << nex
->name();
240 void NetObj::dump_obj_attr(ostream
&o
, unsigned ind
) const
243 for (idx
= 0 ; idx
< attr_cnt() ; idx
+= 1) {
244 o
<< setw(ind
) << "" << attr_key(idx
) << " = \"" <<
245 attr_value(idx
) << "\"" << endl
;
249 void NetAddSub::dump_node(ostream
&o
, unsigned ind
) const
251 o
<< setw(ind
) << "" << "Adder (NetAddSub): " << name()
252 << " width=" << width() << " pin_count=" << pin_count()
254 dump_node_pins(o
, ind
+4);
255 dump_obj_attr(o
, ind
+4);
258 void NetArrayDq::dump_node(ostream
&o
, unsigned ind
) const
260 o
<< setw(ind
) << "" << "NetArrayDq: " << name()
261 << " array=" << mem_
->name()
263 dump_node_pins(o
, ind
+4);
264 dump_obj_attr(o
, ind
+4);
267 void NetCLShift::dump_node(ostream
&o
, unsigned ind
) const
269 o
<< setw(ind
) << "" << "Combinatorial shift (NetCLShift): " <<
271 dump_node_pins(o
, ind
+4);
272 dump_obj_attr(o
, ind
+4);
275 void NetCompare::dump_node(ostream
&o
, unsigned ind
) const
277 o
<< setw(ind
) << "" << "LPM_COMPARE (NetCompare): " << name() << endl
;
278 dump_node_pins(o
, ind
+4);
279 dump_obj_attr(o
, ind
+4);
282 void NetConcat::dump_node(ostream
&o
, unsigned ind
) const
284 o
<< setw(ind
) << "" << "NetConcat: "
286 << " scope=" << scope_path(scope())
287 << " width=" << width_
<< endl
;
288 dump_node_pins(o
, ind
+4);
289 dump_obj_attr(o
, ind
+4);
292 void NetDivide::dump_node(ostream
&o
, unsigned ind
) const
294 o
<< setw(ind
) << "" << "NET_DIVIDE (NetDivide): " << name() << endl
;
295 dump_node_pins(o
, ind
+4);
296 dump_obj_attr(o
, ind
+4);
299 void NetMult::dump_node(ostream
&o
, unsigned ind
) const
301 o
<< setw(ind
) << "" << "LPM_MULT (NetMult): " << name() << endl
;
302 dump_node_pins(o
, ind
+4);
303 dump_obj_attr(o
, ind
+4);
306 void NetMux::dump_node(ostream
&o
, unsigned ind
) const
308 o
<< setw(ind
) << "" << "Multiplexer (NetMux): " << name()
309 << " width=" << width_
<< " swidth=" << swidth_
<< " size=" << size_
310 << " scope=" << scope_path(scope()) << endl
;
311 dump_node_pins(o
, ind
+4);
312 dump_obj_attr(o
, ind
+4);
315 void NetBUFZ::dump_node(ostream
&o
, unsigned ind
) const
317 o
<< setw(ind
) << "" << "NetBUFZ: " << name()
318 << " scope=" << scope_path(scope())
319 << " delay=(" << rise_time() << "," << fall_time() << "," <<
320 decay_time() << ") width=" << width() << endl
;
321 dump_node_pins(o
, ind
+4);
324 void NetCaseCmp::dump_node(ostream
&o
, unsigned ind
) const
327 o
<< setw(ind
) << "" << "case compare === : " << name() << endl
;
329 o
<< setw(ind
) << "" << "case compare !== : " << name() << endl
;
331 dump_node_pins(o
, ind
+4);
334 void NetConst::dump_node(ostream
&o
, unsigned ind
) const
336 o
<< setw(ind
) << "" << "constant " << width_
<< "'b";
337 for (unsigned idx
= width_
; idx
> 0 ; idx
-= 1)
339 o
<< ": " << name() << endl
;
340 dump_node_pins(o
, ind
+4);
343 void NetFF::dump_node(ostream
&o
, unsigned ind
) const
345 o
<< setw(ind
) << "" << "LPM_FF: " << name()
346 << " scope=" << scope_path(scope())
347 << " aset_value=" << aset_value_
<< endl
;
349 dump_node_pins(o
, ind
+4);
350 dump_obj_attr(o
, ind
+4);
353 void NetLiteral::dump_node(ostream
&o
, unsigned ind
) const
355 o
<< setw(ind
) << "" << "constant real " << real_
356 << ": " << name() << endl
;
357 dump_node_pins(o
, ind
+4);
360 void NetLogic::dump_node(ostream
&o
, unsigned ind
) const
362 o
<< setw(ind
) << "" << "logic: ";
425 o
<< " #(" << rise_time()
426 << "," << fall_time() << "," << decay_time() << ") " << name()
427 << " scope=" << scope_path(scope())
430 dump_node_pins(o
, ind
+4);
431 dump_obj_attr(o
, ind
+4);
434 void NetModulo::dump_node(ostream
&o
, unsigned ind
) const
436 o
<< setw(ind
) << "" << "NET_MODULO (NetModulo): " << name() << endl
;
437 dump_node_pins(o
, ind
+4);
438 dump_obj_attr(o
, ind
+4);
441 void NetPartSelect::dump_node(ostream
&o
, unsigned ind
) const
455 o
<< setw(ind
) << "" << "NetPartSelect(" << pt
<< "): "
456 << name() << " off=" << off_
<< " wid=" << wid_
<<endl
;
457 dump_node_pins(o
, ind
+4);
458 dump_obj_attr(o
, ind
+4);
461 void NetReplicate::dump_node(ostream
&o
, unsigned ind
) const
463 o
<< setw(ind
) << "" << "NetReplicate: "
464 << name() << " wid=" << width_
<< ", repeat_=" << repeat_
465 << ", input wid=" << width_
/repeat_
<< endl
;
466 dump_node_pins(o
, ind
+4);
467 dump_obj_attr(o
, ind
+4);
470 void NetSignExtend::dump_node(ostream
&o
, unsigned ind
) const
472 o
<< setw(ind
) << "" << "NetSignExtend: "
473 << name() << " output width=" << width_
<< endl
;
474 dump_node_pins(o
, ind
+4);
475 dump_obj_attr(o
, ind
+4);
478 void NetUReduce::dump_node(ostream
&o
, unsigned ind
) const
480 o
<< setw(ind
) << "" << "reduction logic: ";
504 o
<< " #(" << rise_time()
505 << "," << fall_time() << "," << decay_time() << ") " << name()
506 << " scope=" << scope_path(scope())
509 dump_node_pins(o
, ind
+4);
510 dump_obj_attr(o
, ind
+4);
513 void NetSysFunc::dump_node(ostream
&o
, unsigned ind
) const
515 o
<< setw(ind
) << "" << def_
->name
<< "(...)" << endl
;
516 dump_node_pins(o
, ind
+4);
517 dump_obj_attr(o
, ind
+4);
520 void NetUserFunc::dump_node(ostream
&o
, unsigned ind
) const
522 o
<< setw(ind
) << "" << scope_path(def_
) << "(";
524 dump_node_pins(o
, ind
+4);
525 dump_obj_attr(o
, ind
+4);
528 void NetTaskDef::dump(ostream
&o
, unsigned ind
) const
530 o
<< setw(ind
) << "" << "task " << scope_path(scope_
) << ";" << endl
;
532 for (unsigned idx
= 0 ; idx
< ports_
.count() ; idx
+= 1) {
533 o
<< setw(ind
+4) << "";
535 switch (ports_
[idx
]->port_type()) {
539 case NetNet::POUTPUT
:
549 o
<< ports_
[idx
]->name() << ";" << endl
;
552 proc_
->dump(o
, ind
+4);
554 o
<< setw(ind
) << "" << "endtask" << endl
;
557 void NetUDP::dump_node(ostream
&o
, unsigned ind
) const
559 o
<< setw(ind
) << "" << "UDP (" << udp_name() << "): ";
560 o
<< " #(" << rise_time() << "," << fall_time() << "," << decay_time() <<
561 ") " << name() << endl
;
563 dump_node_pins(o
, ind
+4);
564 dump_obj_attr(o
, ind
+4);
567 void NetProcTop::dump(ostream
&o
, unsigned ind
) const
570 case NetProcTop::KINITIAL
:
571 o
<< "initial /* " << get_line() << " in "
572 << scope_path(scope_
) << " */" << endl
;
574 case NetProcTop::KALWAYS
:
575 o
<< "always /* " << get_line() << " in "
576 << scope_path(scope_
) << " */" << endl
;
580 for (unsigned idx
= 0 ; idx
< attr_cnt() ; idx
+= 1) {
581 o
<< setw(ind
+2) << "" << "(* " << attr_key(idx
) << " = "
582 << attr_value(idx
) << " *)" << endl
;
585 statement_
->dump(o
, ind
+2);
588 void NetAssign_::dump_lval(ostream
&o
) const
593 o
<< "[word=" << *word_
<< "]";
596 o
<< "[" << *base_
<< " +: " << lwid_
<< "]";
603 void NetAssignBase::dump_lval(ostream
&o
) const
608 for (NetAssign_
*cur
= lval_
->more
; cur
; cur
= cur
->more
) {
616 /* Dump an assignment statement */
617 void NetAssign::dump(ostream
&o
, unsigned ind
) const
619 o
<< setw(ind
) << "";
624 if (const NetExpr
*de
= get_delay())
625 o
<< "#(" << *de
<< ") ";
627 o
<< *rval() << ";" << endl
;
630 void NetAssignNB::dump(ostream
&o
, unsigned ind
) const
632 o
<< setw(ind
) << "";
637 if (const NetExpr
*de
= get_delay())
638 o
<< "#(" << *de
<< ") ";
640 o
<< *rval() << ";" << endl
;
644 void NetAssignBase::dump(ostream
&o
, unsigned ind
) const
646 if (const NetAssignNB
*n1
= dynamic_cast<const NetAssignNB
*>(this)) {
648 } else if (const NetAssign
*n2
= dynamic_cast<const NetAssign
*>(this)) {
653 /* Dump a block statement */
654 void NetBlock::dump(ostream
&o
, unsigned ind
) const
656 o
<< setw(ind
) << "" << type_
;
658 o
<< " : " << scope_path(subscope_
);
662 const NetProc
*cur
= last_
;
666 } while (cur
!= last_
);
669 o
<< setw(ind
) << "" << "end" << endl
;
672 void NetCase::dump(ostream
&o
, unsigned ind
) const
676 o
<< setw(ind
) << "" << "case (" << *expr_
<< ")" << endl
;
679 o
<< setw(ind
) << "" << "casex (" << *expr_
<< ")" << endl
;
682 o
<< setw(ind
) << "" << "casez (" << *expr_
<< ")" << endl
;
686 for (unsigned idx
= 0 ; idx
< nitems_
; idx
+= 1) {
687 o
<< setw(ind
+2) << "";
688 if (items_
[idx
].guard
)
689 o
<< *items_
[idx
].guard
<< ":";
693 if (items_
[idx
].statement
) {
695 items_
[idx
].statement
->dump(o
, ind
+6);
701 o
<< setw(ind
) << "" << "endcase" << endl
;
704 void NetCAssign::dump(ostream
&o
, unsigned ind
) const
706 o
<< setw(ind
) << "" << "cassign ";
708 o
<< " = " << *rval() << "; /* " << get_line() << " */" << endl
;
711 void NetCondit::dump(ostream
&o
, unsigned ind
) const
713 o
<< setw(ind
) << "" << "if (";
717 if (if_
) if_
->dump(o
, ind
+4);
718 else o
<< setw(ind
+4) << "" << "/* empty */ ;" << endl
;
721 o
<< setw(ind
) << "" << "else" << endl
;
722 else_
->dump(o
, ind
+4);
726 void NetDeassign::dump(ostream
&o
, unsigned ind
) const
728 o
<< setw(ind
) << "" << "deassign ";
730 o
<< "; /* " << get_line() << " */" << endl
;
733 void NetDisable::dump(ostream
&o
, unsigned ind
) const
735 o
<< setw(ind
) << "" << "disable " << scope_path(target_
) << "; "
736 << "/* " << get_line() << " */" << endl
;
739 void NetEvProbe::dump_node(ostream
&o
, unsigned ind
) const
741 o
<< setw(ind
) << "";
754 o
<< setw(ind
) << "" << "-> " << event_
->name() << "; " << endl
;
755 dump_node_pins(o
, ind
+4);
756 dump_obj_attr(o
, ind
+4);
759 void NetEvTrig::dump(ostream
&o
, unsigned ind
) const
761 o
<< setw(ind
) << "" << "-> " << event_
->name() << "; "
762 << "// " << get_line() << endl
;
765 void NetEvWait::dump(ostream
&o
, unsigned ind
) const
767 o
<< setw(ind
) <<"" << "@(";
770 o
<< event(0)->name();
772 for (unsigned idx
= 1 ; idx
< nevents() ; idx
+= 1)
773 o
<< " or " << event(idx
)->name();
775 o
<< ") // " << get_line() << endl
;
778 statement_
->dump(o
, ind
+2);
780 o
<< setw(ind
+2) << "" << "/* noop */ ;" << endl
;
783 void NetForce::dump(ostream
&o
, unsigned ind
) const
785 o
<< setw(ind
) << "" << "force ";
787 o
<< " = " << *rval() << "; /* " << get_line() << " */" << endl
;
790 void NetForever::dump(ostream
&o
, unsigned ind
) const
792 o
<< setw(ind
) << "" << "forever" << endl
;
793 statement_
->dump(o
, ind
+2);
796 void NetFuncDef::dump(ostream
&o
, unsigned ind
) const
798 o
<< setw(ind
) << "" << "function " << scope_path(scope_
) << endl
;
800 o
<< setw(ind
+2) << "" << "Return signal: "
801 << result_sig_
->name() << endl
;
803 statement_
->dump(o
, ind
+2);
805 o
<< setw(ind
+2) << "" << "// NO STATEMENT" << endl
;
808 void NetPDelay::dump(ostream
&o
, unsigned ind
) const
811 o
<< setw(ind
) << "" << "#" << *expr_
;
814 o
<< setw(ind
) << "" << "#" << delay_
;
819 statement_
->dump(o
, ind
+2);
821 o
<< " /* noop */;" << endl
;
825 void NetRelease::dump(ostream
&o
, unsigned ind
) const
827 o
<< setw(ind
) << "" << "release ";
829 o
<< "; /* " << get_line() << " */" << endl
;
832 void NetRepeat::dump(ostream
&o
, unsigned ind
) const
834 o
<< setw(ind
) << "" << "repeat (" << *expr_
<< ")" << endl
;
835 statement_
->dump(o
, ind
+2);
838 void NetScope::dump(ostream
&o
) const
840 /* This is a constructed hierarchical name. */
841 o
<< scope_path(this);
845 o
<< " sequential block";
848 o
<< " parallel block";
854 o
<< " module <" << (module_name_
? module_name_
.str() : "") << ">";
860 o
<< " generate block";
865 for (unsigned idx
= 0 ; idx
< attr_cnt() ; idx
+= 1)
866 o
<< " (* " << attr_key(idx
) << " = "
867 << attr_value(idx
) << " *)" << endl
;
869 o
<< " timescale = 10e" << time_unit() << " / 10e"
870 << time_precision() << endl
;
872 /* Dump the parameters for this scope. */
874 map
<perm_string
,param_expr_t
>::const_iterator pp
;
875 for (pp
= parameters
.begin()
876 ; pp
!= parameters
.end() ; pp
++) {
879 if ((*pp
).second
.signed_flag
)
882 if ((*pp
).second
.msb
)
883 o
<< "[" << *(*pp
).second
.msb
884 << ":" << *(*pp
).second
.lsb
<< "] ";
886 o
<< (*pp
).first
<< " = " <<
887 *(*pp
).second
.expr
<< ";" << endl
;
890 for (pp
= localparams
.begin()
891 ; pp
!= localparams
.end() ; pp
++) {
892 o
<< " localparam " << (*pp
).first
<< " = " <<
893 *(*pp
).second
.expr
<< ";" << endl
;
897 /* Dump the saved defparam assignments here. */
899 map
<pform_name_t
,NetExpr
*>::const_iterator pp
;
900 for (pp
= defparams
.begin()
901 ; pp
!= defparams
.end() ; pp
++ ) {
902 o
<< " defparam " << (*pp
).first
<< " = " <<
903 *(*pp
).second
<< ";" << endl
;
907 /* Dump the events in this scope. */
908 for (NetEvent
*cur
= events_
; cur
; cur
= cur
->snext_
) {
909 o
<< " event " << cur
->name() << "; nprobe="
910 << cur
->nprobe() << " scope=" << scope_path(cur
->scope())
911 << " // " << cur
->get_line() << endl
;
916 NetNet
*cur
= signals_
->sig_next_
;
919 cur
= cur
->sig_next_
;
920 } while (cur
!= signals_
->sig_next_
);
924 typedef map
<perm_string
,spec_val_t
>::const_iterator specparam_it_t
;
925 for (specparam_it_t cur
= specparams
.begin()
926 ; cur
!= specparams
.end() ; cur
++ ) {
927 o
<< " specparam " << (*cur
).first
929 spec_val_t value
= (*cur
).second
;
930 switch (value
.type
) {
932 o
<< "R:" << value
.real_val
;
935 o
<< "I:" << value
.integer
;
947 func_def()->dump(o
, 4);
949 o
<< " MISSING FUNCTION DEFINITION" << endl
;
952 task_def()->dump(o
, 4);
958 /* Dump any sub-scopes. */
959 for (NetScope
*cur
= sub_
; cur
; cur
= cur
->sib_
)
963 void NetSTask::dump(ostream
&o
, unsigned ind
) const
965 o
<< setw(ind
) << "" << name_
;
967 if (parms_
.count() > 0) {
972 for (unsigned idx
= 1 ; idx
< parms_
.count() ; idx
+= 1) {
975 parms_
[idx
]->dump(o
);
983 void NetUTask::dump(ostream
&o
, unsigned ind
) const
985 o
<< setw(ind
) << "" << scope_path(task_
) << ";" << endl
;
988 void NetWhile::dump(ostream
&o
, unsigned ind
) const
990 o
<< setw(ind
) << "" << "while (" << *cond_
<< ")" << endl
;
991 proc_
->dump(o
, ind
+3);
994 /* Dump a statement type that someone didn't write a dump for. */
995 void NetProc::dump(ostream
&o
, unsigned ind
) const
997 o
<< setw(ind
) << "" << "// " << typeid(*this).name() << endl
;
1000 /* Dump an expression that no one wrote a dump method for. */
1001 void NetExpr::dump(ostream
&o
) const
1003 o
<< "(?" << typeid(*this).name() << "?)";
1006 void NetEBinary::dump(ostream
&o
) const
1063 void NetEConcat::dump(ostream
&o
) const
1065 if (repeat_calculated_
) {
1066 if (repeat_value_
!= 1)
1068 } else if (repeat_
) {
1069 o
<< "<" << *repeat_
<< ">";
1073 o
<< "{" << *parms_
[0];
1077 for (unsigned idx
= 1 ; idx
< parms_
.count() ; idx
+= 1) {
1079 o
<< ", " << *parms_
[idx
];
1086 void NetEConst::dump(ostream
&o
) const
1088 if (value_
.is_string())
1089 o
<< "\"" << value_
.as_string() << "\"";
1094 void NetEConstParam::dump(ostream
&o
) const
1096 o
<< "<" << name_
<< "=";
1098 o
<< ", wid=" << expr_width() << ">";
1101 void NetECReal::dump(ostream
&o
) const
1106 void NetECRealParam::dump(ostream
&o
) const
1108 o
<< "<" << name_
<< "=";
1113 void NetEEvent::dump(ostream
&o
) const
1115 o
<< "<event=" << event_
->name() << ">";
1118 void NetEScope::dump(ostream
&o
) const
1120 o
<< "<scope=" << scope_path(scope_
) << ">";
1123 void NetESelect::dump(ostream
&o
) const
1139 o
<< "+:" << expr_width() << "]>";
1142 void NetESFunc::dump(ostream
&o
) const
1147 for (unsigned idx
= 1 ; idx
< nparms() ; idx
+= 1)
1148 o
<< ", " << *parm(idx
);
1152 void NetESignal::dump(ostream
&o
) const
1157 if (word_
) o
<< "[word=" << *word_
<< "]";
1158 o
<< "[" << msi()<<":"<<lsi() << "]";
1161 void NetEParam::dump(ostream
&o
) const
1164 o
<< "<" << scope_path(scope_
) << "." << name_
<< ">";
1166 o
<< "<" << name_
<< ">";
1171 void NetETernary::dump(ostream
&o
) const
1173 o
<< "(" << *cond_
<< ") ? (" << *true_val_
<< ") : (" <<
1177 void NetEUFunc::dump(ostream
&o
) const
1179 o
<< func_
->basename() << "(";
1180 if (parms_
.count() > 0) {
1182 for (unsigned idx
= 1 ; idx
< parms_
.count() ; idx
+= 1) {
1184 parms_
[idx
]->dump(o
);
1190 void NetEUnary::dump(ostream
&o
) const
1205 void Design::dump(ostream
&o
) const
1207 o
<< "DESIGN TIME PRECISION: 10e" << get_precision() << endl
;
1208 o
<< "SCOPES:" << endl
;
1209 for (list
<NetScope
*>::const_iterator scope
= root_scopes_
.begin();
1210 scope
!= root_scopes_
.end(); scope
++)
1213 o
<< "ELABORATED NODES:" << endl
;
1217 NetNode
*cur
= nodes_
->node_next_
;
1219 cur
->dump_node(o
, 0);
1220 cur
= cur
->node_next_
;
1221 } while (cur
!= nodes_
->node_next_
);
1224 o
<< "ELABORATED PROCESSES:" << endl
;
1226 // Dump the processes.
1227 for (const NetProcTop
*idx
= procs_
; idx
; idx
= idx
->next_
)