diff --git a/tgt-vlog95/logic_lpm.c b/tgt-vlog95/logic_lpm.c index 8b680b475..7da84fa7d 100644 --- a/tgt-vlog95/logic_lpm.c +++ b/tgt-vlog95/logic_lpm.c @@ -717,11 +717,26 @@ void emit_lpm(ivl_scope_t scope, ivl_lpm_t lpm) emit_name_of_nexus(scope, output); fprintf(vlog_out, " = "); emit_lpm_as_ca(scope, lpm); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_lpm_file(lpm), + ivl_lpm_lineno(lpm)); + } + fprintf(vlog_out, "\n"); +} + +static void emit_logic_file_line(ivl_net_logic_t nlogic) +{ + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_logic_file(nlogic), + ivl_logic_lineno(nlogic)); + } } /* - * A BUFZ is a simple variable assignment possible with strength and/or delay. + * A BUFZ is a simple variable assignment possibly with strength and/or delay. */ static void emit_bufz(ivl_scope_t scope, ivl_net_logic_t nlogic) { @@ -737,7 +752,9 @@ static void emit_bufz(ivl_scope_t scope, ivl_net_logic_t nlogic) emit_name_of_nexus(scope, ivl_logic_pin(nlogic, 0)); fprintf(vlog_out, " = "); emit_nexus_as_ca(scope, ivl_logic_pin(nlogic, 1)); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_logic_file_line(nlogic); + fprintf(vlog_out, "\n"); } static void emit_and_save_udp_name(ivl_net_logic_t nlogic){ @@ -903,7 +920,9 @@ void emit_logic(ivl_scope_t scope, ivl_net_logic_t nlogic) fprintf(vlog_out, ", "); } emit_nexus_as_ca(scope, ivl_logic_pin(nlogic, count)); - fprintf(vlog_out, ");\n"); + fprintf(vlog_out, ");"); + emit_logic_file_line(nlogic); + fprintf(vlog_out, "\n"); } void emit_tran(ivl_scope_t scope, ivl_switch_t tran) @@ -969,7 +988,14 @@ void emit_tran(ivl_scope_t scope, ivl_switch_t tran) fprintf(vlog_out, ", "); emit_nexus_as_ca(scope, ivl_switch_enable(tran)); } - fprintf(vlog_out, ");\n"); + fprintf(vlog_out, ");"); + if (emit_file_line) { +assert(ivl_switch_lineno(tran)); + fprintf(vlog_out, " /* %s:%u */", + ivl_switch_file(tran), + ivl_switch_lineno(tran)); + } + fprintf(vlog_out, "\n"); } void emit_signal_net_const_as_ca(ivl_scope_t scope, ivl_signal_t sig) @@ -994,7 +1020,9 @@ void emit_signal_net_const_as_ca(ivl_scope_t scope, ivl_signal_t sig) 3); fprintf(vlog_out, " %s = ", ivl_signal_basename(sig)); emit_const_nexus(scope, net_const); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_sig_file_line(sig); + fprintf(vlog_out, "\n"); return; } /* We must find the constant in the nexus. */ diff --git a/tgt-vlog95/scope.c b/tgt-vlog95/scope.c index cadf66a39..eba4fac0f 100644 --- a/tgt-vlog95/scope.c +++ b/tgt-vlog95/scope.c @@ -67,12 +67,23 @@ void emit_func_return(ivl_signal_t sig) } } +void emit_sig_file_line(ivl_signal_t sig) +{ + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_signal_file(sig), + ivl_signal_lineno(sig)); + } +} + void emit_var_def(ivl_signal_t sig) { if (ivl_signal_local(sig)) return; fprintf(vlog_out, "%*c", indent, ' '); if (ivl_signal_integer(sig)) { - fprintf(vlog_out, "integer %s;\n", ivl_signal_basename(sig)); + fprintf(vlog_out, "integer %s;", ivl_signal_basename(sig)); + emit_sig_file_line(sig); + fprintf(vlog_out, "\n"); if (ivl_signal_dimensions(sig) > 0) { fprintf(stderr, "%s:%u: vlog95 error: Integer arrays (%s) " "are not supported.\n", ivl_signal_file(sig), @@ -81,7 +92,9 @@ void emit_var_def(ivl_signal_t sig) vlog_errors += 1; } } else if (ivl_signal_data_type(sig) == IVL_VT_REAL) { - fprintf(vlog_out, "real %s;\n", ivl_signal_basename(sig)); + fprintf(vlog_out, "real %s;", ivl_signal_basename(sig)); + emit_sig_file_line(sig); + fprintf(vlog_out, "\n"); if (ivl_signal_dimensions(sig) > 0) { fprintf(stderr, "%s:%u: vlog95 error: Real arrays (%s) " "are not supported.\n", ivl_signal_file(sig), @@ -105,7 +118,9 @@ void emit_var_def(ivl_signal_t sig) fprintf(vlog_out, " [%d:%d]", first, last); } } - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_sig_file_line(sig); + fprintf(vlog_out, "\n"); if (ivl_signal_signed(sig)) { fprintf(stderr, "%s:%u: vlog95 error: Signed registers (%s) " "are not supported.\n", ivl_signal_file(sig), @@ -213,7 +228,9 @@ void emit_net_def(ivl_scope_t scope, ivl_signal_t sig) break; } if (msb != 0 || lsb != 0) fprintf(vlog_out, " [%d:%d]", msb, lsb); - fprintf(vlog_out, " %s;\n", ivl_signal_basename(sig)); + fprintf(vlog_out, " %s;", ivl_signal_basename(sig)); + emit_sig_file_line(sig); + fprintf(vlog_out, "\n"); /* A constant driving a net does not create an lpm or logic * element in the design so save them from the definition. */ save_net_constants(scope, sig); @@ -265,7 +282,13 @@ void emit_scope_variables(ivl_scope_t scope) fprintf(vlog_out, "%*cparameter %s = ", indent, ' ', ivl_parameter_basename(par)); emit_expr(scope, pex, 0); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_parameter_file(par), + ivl_parameter_lineno(par)); + } + fprintf(vlog_out, "\n"); } if (count) fprintf(vlog_out, "\n"); @@ -294,11 +317,26 @@ void emit_scope_variables(ivl_scope_t scope) if (ivl_event_nany(event)) continue; if (ivl_event_npos(event)) continue; if (ivl_event_nneg(event)) continue; - fprintf(vlog_out, "%*cevent %s;\n", indent, ' ', + fprintf(vlog_out, "%*cevent %s;", indent, ' ', ivl_event_basename(event)); + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_event_file(event), + ivl_event_lineno(event)); + } + fprintf(vlog_out, "\n"); } if (count) fprintf(vlog_out, "\n"); - if (emit_and_free_net_const_list(scope)) fprintf(vlog_out, "\n");; + if (emit_and_free_net_const_list(scope)) fprintf(vlog_out, "\n"); +} + +static void emit_scope_file_line(ivl_scope_t scope) +{ + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_scope_file(scope), + ivl_scope_lineno(scope)); + } } /* @@ -362,7 +400,9 @@ int emit_scope(ivl_scope_t scope, ivl_scope_t parent) fprintf(vlog_out, "\n%*c%s %s(", indent, ' ', name, ivl_scope_basename(scope)); // HERE: Still need to add port information. - fprintf(vlog_out, ");\n"); + fprintf(vlog_out, ");"); + emit_scope_file_line(scope); + fprintf(vlog_out, "\n"); free(name); num_scopes_to_emit += 1; scopes_to_emit = realloc(scopes_to_emit, num_scopes_to_emit * @@ -424,7 +464,9 @@ int emit_scope(ivl_scope_t scope, ivl_scope_t parent) vlog_errors += 1; return 0; } - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_scope_file_line(scope); + fprintf(vlog_out, "\n"); indent += indent_incr; /* Output the scope ports for this scope. */ @@ -452,7 +494,9 @@ int emit_scope(ivl_scope_t scope, ivl_scope_t parent) vlog_errors += 1; break; } - fprintf(vlog_out, " %s;\n", ivl_signal_basename(port)); + fprintf(vlog_out, " %s;", ivl_signal_basename(port)); + emit_sig_file_line(port); + fprintf(vlog_out, " \n"); } if (count) fprintf(vlog_out, "\n"); diff --git a/tgt-vlog95/stmt.c b/tgt-vlog95/stmt.c index f396b29b1..d7671fdcc 100644 --- a/tgt-vlog95/stmt.c +++ b/tgt-vlog95/stmt.c @@ -32,6 +32,15 @@ static unsigned get_indent() return indent; } +static void emit_stmt_file_line(ivl_statement_t stmt) +{ + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_stmt_file(stmt), + ivl_stmt_lineno(stmt)); + } +} + static void emit_stmt_block_body(ivl_scope_t scope, ivl_statement_t stmt) { unsigned idx, count = ivl_stmt_block_count(stmt); @@ -196,7 +205,9 @@ static unsigned find_delayed_assign(ivl_scope_t scope, ivl_statement_t stmt) emit_scaled_delayx(scope, ivl_stmt_delay_expr(delay)); fprintf(vlog_out, ") "); emit_expr(scope, ivl_stmt_rval(assign), wid); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); return 1; } @@ -271,7 +282,9 @@ static unsigned find_event_assign(ivl_scope_t scope, ivl_statement_t stmt) emit_event(scope, event); fprintf(vlog_out, ") "); emit_expr(scope, ivl_stmt_rval(assign), wid); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); return 1; } @@ -317,6 +330,7 @@ static unsigned find_wait(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, "%*cwait(", get_indent(), ' '); emit_expr(scope, ivl_expr_oper1(while_expr), 0); fprintf(vlog_out, ")"); + emit_stmt_file_line(stmt); single_indent = 1; emit_stmt(scope, ivl_stmt_block_stmt(stmt, 1)); return 1; @@ -511,7 +525,9 @@ static unsigned is_utask_call_with_args(ivl_scope_t scope, emit_port(scope, port_exprs[idx]); } free(port_exprs); - fprintf(vlog_out, ");\n"); + fprintf(vlog_out, ");"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); return 1; } @@ -524,7 +540,9 @@ static void emit_stmt_assign(ivl_scope_t scope, ivl_statement_t stmt) wid = emit_stmt_lval(scope, stmt); fprintf(vlog_out, " = "); emit_expr(scope, ivl_stmt_rval(stmt), wid); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_assign_nb(ivl_scope_t scope, ivl_statement_t stmt) @@ -537,13 +555,17 @@ static void emit_stmt_assign_nb(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, " <= "); emit_stmt_inter_delay(scope, stmt); emit_expr(scope, ivl_stmt_rval(stmt), wid); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_block(ivl_scope_t scope, ivl_statement_t stmt) { if (is_utask_call_with_args(scope, stmt)) return; - fprintf(vlog_out, "%*cbegin\n", get_indent(), ' '); + fprintf(vlog_out, "%*cbegin", get_indent(), ' '); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); emit_stmt_block_body(scope, stmt); fprintf(vlog_out, "%*cend\n", get_indent(), ' '); } @@ -551,8 +573,10 @@ static void emit_stmt_block(ivl_scope_t scope, ivl_statement_t stmt) static void emit_stmt_block_named(ivl_scope_t scope, ivl_statement_t stmt) { ivl_scope_t my_scope = ivl_stmt_block_scope(stmt); - fprintf(vlog_out, "%*cbegin: %s\n", get_indent(), ' ', + fprintf(vlog_out, "%*cbegin: %s", get_indent(), ' ', ivl_scope_basename(my_scope)); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); emit_stmt_block_body(scope, stmt); fprintf(vlog_out, "%*cend /* %s */\n", get_indent(), ' ', ivl_scope_basename(my_scope)); @@ -578,7 +602,9 @@ static void emit_stmt_case(ivl_scope_t scope, ivl_statement_t stmt) } fprintf(vlog_out, "%*c%s (", get_indent(), ' ', name); emit_expr(scope, ivl_stmt_cond_expr(stmt), 0); - fprintf(vlog_out, ")\n"); + fprintf(vlog_out, ")"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); indent += indent_incr; default_case = count; for (idx = 0; idx < count; idx += 1) { @@ -614,7 +640,9 @@ static void emit_stmt_cassign(ivl_scope_t scope, ivl_statement_t stmt) wid = emit_stmt_lval(scope, stmt); fprintf(vlog_out, " = "); emit_expr(scope, ivl_stmt_rval(stmt), wid); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_condit(ivl_scope_t scope, ivl_statement_t stmt) @@ -625,6 +653,7 @@ static void emit_stmt_condit(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, "%*cif (", get_indent(), ' '); emit_expr(scope, ivl_stmt_cond_expr(stmt), 0); fprintf(vlog_out, ")"); + emit_stmt_file_line(stmt); if (true_stmt) { /* If we have a false statement and the true statement is a * condition that does not have a false clause then we need @@ -658,13 +687,16 @@ static void emit_stmt_deassign(ivl_scope_t scope, ivl_statement_t stmt) { fprintf(vlog_out, "%*cdeassign ", get_indent(), ' '); (void) emit_stmt_lval(scope, stmt); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_delay(ivl_scope_t scope, ivl_statement_t stmt) { fprintf(vlog_out, "%*c#", get_indent(), ' '); emit_scaled_delay(scope, ivl_stmt_delay_val(stmt)); + emit_stmt_file_line(stmt); single_indent = 1; emit_stmt(scope, ivl_stmt_sub_stmt(stmt)); } @@ -674,6 +706,7 @@ static void emit_stmt_delayx(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, "%*c#(", get_indent(), ' '); emit_scaled_delayx(scope, ivl_stmt_delay_expr(stmt)); fprintf(vlog_out, ")"); + emit_stmt_file_line(stmt); single_indent = 1; emit_stmt(scope, ivl_stmt_sub_stmt(stmt)); } @@ -683,7 +716,9 @@ static void emit_stmt_disable(ivl_scope_t scope, ivl_statement_t stmt) ivl_scope_t disable_scope = ivl_stmt_call(stmt); fprintf(vlog_out, "%*cdisable ", get_indent(), ' '); emit_scope_path(scope, disable_scope); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_force(ivl_scope_t scope, ivl_statement_t stmt) @@ -695,19 +730,24 @@ static void emit_stmt_force(ivl_scope_t scope, ivl_statement_t stmt) wid = emit_stmt_lval(scope, stmt); fprintf(vlog_out, " = "); emit_expr(scope, ivl_stmt_rval(stmt), wid); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_forever(ivl_scope_t scope, ivl_statement_t stmt) { fprintf(vlog_out, "%*cforever", get_indent(), ' '); + emit_stmt_file_line(stmt); single_indent = 1; emit_stmt(scope, ivl_stmt_sub_stmt(stmt)); } static void emit_stmt_fork(ivl_scope_t scope, ivl_statement_t stmt) { - fprintf(vlog_out, "%*cfork\n", get_indent(), ' '); + fprintf(vlog_out, "%*cfork", get_indent(), ' '); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); emit_stmt_block_body(scope, stmt); fprintf(vlog_out, "%*cjoin\n", get_indent(), ' '); } @@ -715,8 +755,10 @@ static void emit_stmt_fork(ivl_scope_t scope, ivl_statement_t stmt) static void emit_stmt_fork_named(ivl_scope_t scope, ivl_statement_t stmt) { ivl_scope_t my_scope = ivl_stmt_block_scope(stmt); - fprintf(vlog_out, "%*cfork: %s\n", get_indent(), ' ', + fprintf(vlog_out, "%*cfork: %s", get_indent(), ' ', ivl_scope_basename(my_scope)); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); emit_stmt_block_body(scope, stmt); fprintf(vlog_out, "%*cjoin /* %s */\n", get_indent(), ' ', ivl_scope_basename(my_scope)); @@ -726,7 +768,9 @@ static void emit_stmt_release(ivl_scope_t scope, ivl_statement_t stmt) { fprintf(vlog_out, "%*crelease ", get_indent(), ' '); (void) emit_stmt_lval(scope, stmt); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_repeat(ivl_scope_t scope, ivl_statement_t stmt) @@ -734,6 +778,7 @@ static void emit_stmt_repeat(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, "%*crepeat (", get_indent(), ' '); emit_expr(scope, ivl_stmt_cond_expr(stmt), 0); fprintf(vlog_out, ")"); + emit_stmt_file_line(stmt); single_indent = 1; emit_stmt(scope, ivl_stmt_sub_stmt(stmt)); } @@ -754,7 +799,9 @@ static void emit_stmt_stask(ivl_scope_t scope, ivl_statement_t stmt) emit_expr(scope, ivl_stmt_parm(stmt, count), 0); fprintf(vlog_out, ")"); } - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_trigger(ivl_scope_t scope, ivl_statement_t stmt) @@ -762,7 +809,9 @@ static void emit_stmt_trigger(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, "%*c-> ", get_indent(), ' '); assert(ivl_stmt_nevent(stmt) == 1); emit_event(scope, stmt); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } /* @@ -777,7 +826,9 @@ static void emit_stmt_utask(ivl_scope_t scope, ivl_statement_t stmt) assert(ivl_scope_ports(task_scope) == 0); fprintf(vlog_out, "%*c", get_indent(), ' '); emit_scope_path(scope, task_scope); - fprintf(vlog_out, ";\n"); + fprintf(vlog_out, ";"); + emit_stmt_file_line(stmt); + fprintf(vlog_out, "\n"); } static void emit_stmt_wait(ivl_scope_t scope, ivl_statement_t stmt) @@ -785,6 +836,7 @@ static void emit_stmt_wait(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, "%*c@(", get_indent(), ' '); emit_event(scope, stmt); fprintf(vlog_out, ")"); + emit_stmt_file_line(stmt); single_indent = 1; emit_stmt(scope, ivl_stmt_sub_stmt(stmt)); } @@ -794,6 +846,7 @@ static void emit_stmt_while(ivl_scope_t scope, ivl_statement_t stmt) fprintf(vlog_out, "%*cwhile (", get_indent(), ' '); emit_expr(scope, ivl_stmt_cond_expr(stmt), 0); fprintf(vlog_out, ")"); + emit_stmt_file_line(stmt); single_indent = 1; emit_stmt(scope, ivl_stmt_sub_stmt(stmt)); } @@ -926,6 +979,11 @@ void emit_process(ivl_scope_t scope, ivl_process_t proc) vlog_errors+= 1; break; } + if (emit_file_line) { + fprintf(vlog_out, " /* %s:%u */", + ivl_process_file(proc), + ivl_process_lineno(proc)); + } single_indent = 1; emit_stmt(scope, ivl_process_stmt(proc)); } diff --git a/tgt-vlog95/vlog95.c b/tgt-vlog95/vlog95.c index 0badcab7f..4d69e6642 100644 --- a/tgt-vlog95/vlog95.c +++ b/tgt-vlog95/vlog95.c @@ -50,6 +50,8 @@ int sim_precision = 0; unsigned indent = 0; unsigned indent_incr = 2; +unsigned emit_file_line = 0; + ivl_design_t design = 0; int target_design(ivl_design_t des) @@ -58,8 +60,12 @@ int target_design(ivl_design_t des) unsigned nroots, idx; const char*path = ivl_design_flag(des, "-o"); /* Set the indent spacing with the -pspacing flag passed to iverilog - * (e.g. -pspacing=4). */ + * (e.g. -pspacing=4). The default is 2 spaces. */ const char*spacing = ivl_design_flag(des, "spacing"); + /* Use -pfileline to determine if file and line information is + * printed for most lines. (e.g. -pfileline=1). The default is no + * file/line information will be printed for individual lines. */ + const char*fileline = ivl_design_flag(des, "fileline"); assert(path); /* Check for and use a provided indent spacing. */ @@ -79,7 +85,7 @@ int target_design(ivl_design_t des) eptr, spacing); return 1; } - /* The increment must be positive. */ + /* The increment must be greater than zero. */ if (sp_incr < 1) { fprintf(stderr, "vlog95 error: Spacing increment (%ld) must " "be greater than zero.\n", sp_incr); @@ -94,6 +100,32 @@ int target_design(ivl_design_t des) indent_incr = sp_incr; } + /* Check to see if file/line information should be printed. */ + if (strcmp(fileline, "") != 0) { + char *eptr; + long fl_value = strtol(fileline, &eptr, 0); + /* Nothing usable in the file/line string. */ + if (spacing == eptr) { + fprintf(stderr, "vlog95 error: Unable to extract file/line " + "information from string: %s\n", fileline); + return 1; + } + /* Extra stuff at the end. */ + if (*eptr != 0) { + fprintf(stderr, "vlog95 error: Extra characters '%s' " + "included at end of file/line string: %s\n", + eptr, fileline); + return 1; + } + /* The file/line flag must be positive. */ + if (fl_value < 0) { + fprintf(stderr, "vlog95 error: File/line flag (%ld) must " + "be positive.\n", fl_value); + return 1; + } + emit_file_line = fl_value > 0; + } + design = des; #ifdef HAVE_FOPEN64 diff --git a/tgt-vlog95/vlog95_priv.h b/tgt-vlog95/vlog95_priv.h index 5a5b2b283..ecf22da6c 100644 --- a/tgt-vlog95/vlog95_priv.h +++ b/tgt-vlog95/vlog95_priv.h @@ -50,6 +50,12 @@ extern int sim_precision; extern unsigned indent; extern unsigned indent_incr; +/* + * Set to non-zero when the user wants to emit all the file and line + * number information. + */ +extern unsigned emit_file_line; + /* * Emit various Verilog types. */ @@ -78,6 +84,7 @@ extern void emit_icarus_generated_udps(); extern void add_udp_to_list(ivl_udp_t udp); extern void emit_udp_list(); +extern void emit_sig_file_line(ivl_signal_t sig); extern void emit_real_number(double value); extern void emit_number(const char *bits, unsigned nbits, unsigned is_signed,