Now that the interactive debugger exists,

there is no use for the output dump.
This commit is contained in:
steve 2001-05-09 04:23:18 +00:00
parent 4537de8120
commit a88f030b52
10 changed files with 52 additions and 191 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: codes.cc,v 1.7 2001/04/13 03:55:18 steve Exp $"
#ident "$Id: codes.cc,v 1.8 2001/05/09 04:23:18 steve Exp $"
#endif
# include "codes.h"
@ -102,40 +102,13 @@ vvp_code_t codespace_index(vvp_cpoint_t point)
return code_table[point]->table[index1]->table + index0;
}
void codespace_dump(FILE*fd)
{
for (unsigned idx = 0 ; idx < code_count ; idx += 1) {
fprintf(fd, " %8x: ", idx);
vvp_code_t cop = codespace_index(idx);
if (cop->opcode == &of_ASSIGN) {
fprintf(fd, "%%assign 0x%u, %u, %u\n",
cop->iptr, cop->bit_idx1, cop->bit_idx2);
} else if (cop->opcode == &of_DELAY) {
fprintf(fd, "%%delay %lu\n", (unsigned long)cop->number);
} else if (cop->opcode == &of_END) {
fprintf(fd, "%%end\n");
} else if (cop->opcode == &of_JMP) {
fprintf(fd, "%%jmp 0x%u\n", cop->cptr);
} else if (cop->opcode == &of_JMP0) {
fprintf(fd, "%%jmp/0 0x%u\n", cop->cptr);
} else if (cop->opcode == &of_SET) {
fprintf(fd, "%%set 0x%u, %u\n", cop->iptr, cop->bit_idx1);
} else {
fprintf(fd, "opcode %p\n", cop->opcode);
}
}
}
/*
* $Log: codes.cc,v $
* Revision 1.8 2001/05/09 04:23:18 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.7 2001/04/13 03:55:18 steve
* More complete reap of all threads.
*

View File

@ -19,14 +19,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: codes.h,v 1.25 2001/05/06 17:42:22 steve Exp $"
#ident "$Id: codes.h,v 1.26 2001/05/09 04:23:18 steve Exp $"
#endif
# include "pointers.h"
# include "memory.h"
# include "vthread.h"
# include <stdio.h>
typedef struct vvp_code_s *vvp_code_t;
typedef bool (*vvp_code_fun)(vthread_t thr, vvp_code_t code);
@ -125,10 +124,13 @@ extern vvp_cpoint_t codespace_next(void);
*/
extern vvp_code_t codespace_index(vvp_cpoint_t ptr);
extern void codespace_dump(FILE*fd);
/*
* $Log: codes.h,v $
* Revision 1.26 2001/05/09 04:23:18 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.25 2001/05/06 17:42:22 steve
* Add the %ix/get instruction. (Stephan Boettcher)
*
@ -165,49 +167,5 @@ extern void codespace_dump(FILE*fd);
*
* Revision 1.15 2001/04/01 22:25:33 steve
* Add the reduction nor instruction.
*
* Revision 1.14 2001/04/01 07:22:08 steve
* Implement the less-then and %or instructions.
*
* Revision 1.13 2001/04/01 06:40:44 steve
* Support empty statements for hanging labels.
*
* Revision 1.12 2001/04/01 06:12:13 steve
* Add the bitwise %and instruction.
*
* Revision 1.11 2001/04/01 04:34:28 steve
* Implement %cmp/x and %cmp/z instructions.
*
* Revision 1.10 2001/03/31 17:36:02 steve
* Add the jmp/1 instruction.
*
* Revision 1.9 2001/03/31 01:59:58 steve
* Add the ADD instrunction.
*
* Revision 1.8 2001/03/30 04:55:22 steve
* Add fork and join instructions.
*
* Revision 1.7 2001/03/26 04:00:39 steve
* Add the .event statement and the %wait instruction.
*
* Revision 1.6 2001/03/25 03:54:26 steve
* Add JMP0XZ and postpone net inputs when needed.
*
* Revision 1.5 2001/03/22 05:08:00 steve
* implement %load, %inv, %jum/0 and %cmp/u
*
* Revision 1.4 2001/03/20 06:16:24 steve
* Add support for variable vectors.
*
* Revision 1.3 2001/03/16 01:44:34 steve
* Add structures for VPI support, and all the %vpi_call
* instruction. Get linking of VPI modules to work.
*
* Revision 1.2 2001/03/11 23:06:49 steve
* Compact the vvp_code_s structure.
*
* Revision 1.1 2001/03/11 00:29:38 steve
* Add the vvp engine to cvs.
*
*/
#endif

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: compile.cc,v 1.60 2001/05/09 02:53:25 steve Exp $"
#ident "$Id: compile.cc,v 1.61 2001/05/09 04:23:18 steve Exp $"
#endif
# include "compile.h"
@ -1110,23 +1110,6 @@ void compile_cleanup(void)
}
}
void compile_dump(FILE*fd)
{
fprintf(fd, "FUNCTOR SYMBOL TABLE:\n");
sym_dump(sym_functors, fd);
fprintf(fd, "FUNCTORS:\n");
functor_dump(fd);
fprintf(fd, "UNRESOLVED PORT INPUTS:\n");
for (struct resolv_list_s*cur = resolv_list ; cur ; cur = cur->next)
fprintf(fd, " %08x: %s\n", cur->port, cur->source);
fprintf(fd, "CODE SPACE SYMBOL TABLE:\n");
sym_dump(sym_codespace, fd);
fprintf(fd, "CODE SPACE DISASSEMBLY:\n");
codespace_dump(fd);
}
/*
* These functions are in support of the debugger.
*
@ -1143,6 +1126,10 @@ vvp_ipoint_t debug_lookup_functor(const char*name)
/*
* $Log: compile.cc,v $
* Revision 1.61 2001/05/09 04:23:18 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.60 2001/05/09 02:53:25 steve
* Implement the .resolv syntax.
*

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: compile.h,v 1.21 2001/05/09 02:53:25 steve Exp $"
#ident "$Id: compile.h,v 1.22 2001/05/09 04:23:18 steve Exp $"
#endif
# include <stdio.h>
@ -174,14 +174,12 @@ extern void compile_net(char*label, char*name,
int msb, int lsb, bool signed_flag,
unsigned argc, struct symb_s*argv);
/*
* This is a diagnostic aid. Dump all the compiler tables to the file
* descriptor in a readable form.
*/
extern void compile_dump(FILE*fd);
/*
* $Log: compile.h,v $
* Revision 1.22 2001/05/09 04:23:18 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.21 2001/05/09 02:53:25 steve
* Implement the .resolv syntax.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: functor.cc,v 1.18 2001/05/09 02:53:25 steve Exp $"
#ident "$Id: functor.cc,v 1.19 2001/05/09 04:23:18 steve Exp $"
#endif
# include "functor.h"
@ -313,16 +313,6 @@ void functor_propagate(vvp_ipoint_t ptr)
}
}
void functor_dump(FILE*fd)
{
for (unsigned idx = 1 ; idx < functor_count ; idx += 1) {
functor_t cur = functor_index(idx*4);
fprintf(fd, "%08x: out=%x port={%x %x %x %x}\n",
(idx*4), cur->out, cur->port[0],
cur->port[1], cur->port[2], cur->port[3]);
}
}
/*
* The variable functor is special. This is the truth table for it.
*/
@ -349,6 +339,10 @@ const unsigned char ft_var[16] = {
/*
* $Log: functor.cc,v $
* Revision 1.19 2001/05/09 04:23:18 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.18 2001/05/09 02:53:25 steve
* Implement the .resolv syntax.
*
@ -386,30 +380,5 @@ const unsigned char ft_var[16] = {
*
* Revision 1.9 2001/03/31 19:29:23 steve
* Fix compilation warnings.
*
* Revision 1.8 2001/03/29 03:46:36 steve
* Support named events as mode 2 functors.
*
* Revision 1.7 2001/03/26 04:00:39 steve
* Add the .event statement and the %wait instruction.
*
* Revision 1.6 2001/03/25 00:35:35 steve
* Add the .net statement.
*
* Revision 1.5 2001/03/22 05:28:16 steve
* no longer need out message.
*
* Revision 1.4 2001/03/22 05:08:00 steve
* implement %load, %inv, %jum/0 and %cmp/u
*
* Revision 1.3 2001/03/20 06:16:24 steve
* Add support for variable vectors.
*
* Revision 1.2 2001/03/11 22:42:11 steve
* Functor values and propagation.
*
* Revision 1.1 2001/03/11 00:29:38 steve
* Add the vvp engine to cvs.
*
*/

View File

@ -19,11 +19,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: functor.h,v 1.20 2001/05/09 02:53:25 steve Exp $"
#ident "$Id: functor.h,v 1.21 2001/05/09 04:23:18 steve Exp $"
#endif
# include "pointers.h"
# include <stdio.h>
/*
@ -239,11 +238,6 @@ inline unsigned functor_oval(vvp_ipoint_t fptr)
return fp->oval & 3;
}
/*
* Dump a readable version of the functor address space to the file.
*/
extern void functor_dump(FILE*fd);
extern const unsigned char ft_AND[];
extern const unsigned char ft_BUF[];
@ -260,6 +254,10 @@ extern const unsigned char ft_var[];
/*
* $Log: functor.h,v $
* Revision 1.21 2001/05/09 04:23:18 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.20 2001/05/09 02:53:25 steve
* Implement the .resolv syntax.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: main.cc,v 1.9 2001/05/08 23:32:26 steve Exp $"
#ident "$Id: main.cc,v 1.10 2001/05/09 04:23:19 steve Exp $"
#endif
# include "config.h"
@ -40,17 +40,13 @@ int main(int argc, char*argv[])
{
int opt;
unsigned flag_errors = 0;
const char*dump_path = 0;
const char*design_path = 0;
bool debug_flag = false;
while ((opt = getopt(argc, argv, "D:dM:m:")) != EOF) switch (opt) {
while ((opt = getopt(argc, argv, "dM:m:")) != EOF) switch (opt) {
case 'd':
debug_flag = true;
break;
case 'D':
dump_path = optarg;
break;
case 'M':
module_path = optarg;
break;
@ -86,12 +82,6 @@ int main(int argc, char*argv[])
return rc;
compile_cleanup();
if (dump_path) {
FILE*fd = fopen(dump_path, "w");
compile_dump(fd);
fclose(fd);
}
if (compile_errors > 0) {
fprintf(stderr, "%s: Program not runnable, %u errors.\n",
design_path, compile_errors);
@ -108,6 +98,10 @@ int main(int argc, char*argv[])
/*
* $Log: main.cc,v $
* Revision 1.10 2001/05/09 04:23:19 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.9 2001/05/08 23:32:26 steve
* Add to the debugger the ability to view and
* break on functors.

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: symbols.cc,v 1.2 2001/03/18 00:37:55 steve Exp $"
#ident "$Id: symbols.cc,v 1.3 2001/05/09 04:23:19 steve Exp $"
#endif
# include "symbols.h"
@ -269,31 +269,12 @@ symbol_value_t sym_get_value(symbol_table_t tbl, const char*key)
}
static void dump_tree(struct tree_node_*cur, unsigned ind, FILE*fd)
{
if (cur->leaf_flag) {
fprintf(fd, "%*s%p: %u keys\n", ind, "", cur, cur->count);
for (unsigned idx = 0 ; idx < cur->count ; idx += 1) {
fprintf(fd, "%*s %3d: key=%s, val=0x%lx\n", ind, "",
idx, cur->leaf[idx].key, cur->leaf[idx].val.num);
}
} else {
fprintf(fd, "%*s%p: %u children\n", ind, "", cur, cur->count);
for (unsigned idx = 0 ; idx < cur->count ; idx += 1) {
dump_tree(cur->child[idx], ind+4, fd);
}
}
}
void sym_dump(symbol_table_t tbl, FILE*fd)
{
dump_tree(tbl->root, 0, fd);
}
/*
* $Log: symbols.cc,v $
* Revision 1.3 2001/05/09 04:23:19 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.2 2001/03/18 00:37:55 steve
* Add support for vpi scopes.
*

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: symbols.h,v 1.2 2001/03/18 00:37:55 steve Exp $"
#ident "$Id: symbols.h,v 1.3 2001/05/09 04:23:19 steve Exp $"
#endif
/*
@ -39,7 +39,6 @@
*/
# include "config.h"
# include <stdio.h>
/*
* This is the basic type of a symbol table. It is opaque. Don't even
@ -78,13 +77,12 @@ void sym_set_value(symbol_table_t tbl, const char*key, symbol_value_t val);
*/
symbol_value_t sym_get_value(symbol_table_t tbl, const char*key);
/*
* Diagnostic dump of the symbol table.
*/
extern void sym_dump(symbol_table_t tbl, FILE*fd);
/*
* $Log: symbols.h,v $
* Revision 1.3 2001/05/09 04:23:19 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.2 2001/03/18 00:37:55 steve
* Add support for vpi scopes.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: vpi_signal.cc,v 1.10 2001/05/08 23:32:26 steve Exp $"
#ident "$Id: vpi_signal.cc,v 1.11 2001/05/09 04:23:19 steve Exp $"
#endif
/*
@ -27,6 +27,7 @@
# include "vpi_priv.h"
# include "functor.h"
# include <stdio.h>
# include <malloc.h>
# include <assert.h>
@ -399,6 +400,10 @@ vpiHandle vpip_make_net(char*name, int msb, int lsb, bool signed_flag,
/*
* $Log: vpi_signal.cc,v $
* Revision 1.11 2001/05/09 04:23:19 steve
* Now that the interactive debugger exists,
* there is no use for the output dump.
*
* Revision 1.10 2001/05/08 23:32:26 steve
* Add to the debugger the ability to view and
* break on functors.