Fix and cleanup tgt-vp based on cppcheck results
This commit is contained in:
parent
b979441de2
commit
5a4cb616d1
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2020 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2011-2025 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -1038,7 +1038,7 @@ static void show_stmt_assign_sig_darray_queue_mux(ivl_statement_t net)
|
||||||
|
|
||||||
draw_eval_expr_into_integer(mux, 3);
|
draw_eval_expr_into_integer(mux, 3);
|
||||||
fprintf(vvp_out, " %%ix/mov %d, 3;\n", mux_word);
|
fprintf(vvp_out, " %%ix/mov %d, 3;\n", mux_word);
|
||||||
fprintf(vvp_out, " %%flag_mov %u, 4;\n", flag);
|
fprintf(vvp_out, " %%flag_mov %d, 4;\n", flag);
|
||||||
fprintf(vvp_out, " %%load/dar/r v%p_0;\n", var);
|
fprintf(vvp_out, " %%load/dar/r v%p_0;\n", var);
|
||||||
draw_eval_real(rval);
|
draw_eval_real(rval);
|
||||||
draw_stmt_assign_real_opcode(ivl_stmt_opcode(net));
|
draw_stmt_assign_real_opcode(ivl_stmt_opcode(net));
|
||||||
|
|
@ -1064,7 +1064,7 @@ static void show_stmt_assign_sig_darray_queue_mux(ivl_statement_t net)
|
||||||
|
|
||||||
draw_eval_expr_into_integer(mux, 3);
|
draw_eval_expr_into_integer(mux, 3);
|
||||||
fprintf(vvp_out, " %%ix/mov %d, 3;\n", mux_word);
|
fprintf(vvp_out, " %%ix/mov %d, 3;\n", mux_word);
|
||||||
fprintf(vvp_out, " %%flag_mov %u, 4;\n", flag);
|
fprintf(vvp_out, " %%flag_mov %d, 4;\n", flag);
|
||||||
fprintf(vvp_out, " %%load/dar/vec4 v%p_0;\n", var);
|
fprintf(vvp_out, " %%load/dar/vec4 v%p_0;\n", var);
|
||||||
draw_eval_vec4(rval);
|
draw_eval_vec4(rval);
|
||||||
resize_vec4_wid(rval, ivl_stmt_lwidth(net));
|
resize_vec4_wid(rval, ivl_stmt_lwidth(net));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_vvp_priv_H
|
#ifndef IVL_vvp_priv_H
|
||||||
#define IVL_vvp_priv_H
|
#define IVL_vvp_priv_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2020 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -66,17 +66,6 @@ extern const char *vvp_mangle_name(const char *);
|
||||||
|
|
||||||
extern char* draw_Cr_to_string(double value);
|
extern char* draw_Cr_to_string(double value);
|
||||||
|
|
||||||
/*
|
|
||||||
* This generates a string from a signal that uniquely identifies
|
|
||||||
* that signal with letters that can be used in a label.
|
|
||||||
*
|
|
||||||
* NOTE: vvp_signal_label should be removed. All it does is a %p of
|
|
||||||
* the pointer, and return a pointer to a static. The code that wants
|
|
||||||
* to reference a signal needs to use the format V_%p, so the presence
|
|
||||||
* of this function is just plain inconsistent.
|
|
||||||
*/
|
|
||||||
extern const char* vvp_signal_label(ivl_signal_t sig);
|
|
||||||
|
|
||||||
extern unsigned width_of_nexus(ivl_nexus_t nex);
|
extern unsigned width_of_nexus(ivl_nexus_t nex);
|
||||||
extern ivl_variable_type_t data_type_of_nexus(ivl_nexus_t nex);
|
extern ivl_variable_type_t data_type_of_nexus(ivl_nexus_t nex);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -121,19 +121,6 @@ const char *vvp_mangle_name(const char *id)
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* REMOVE ME: vvp_signal_label should not be used. DEAD CODE
|
|
||||||
* Given a signal, generate a string name that is suitable for use as
|
|
||||||
* a label. The only rule is that the same signal will always have the
|
|
||||||
* same label. The result is stored in static memory, so remember to
|
|
||||||
* copy it out.
|
|
||||||
*/
|
|
||||||
const char* vvp_signal_label(ivl_signal_t sig)
|
|
||||||
{
|
|
||||||
static char buf[32];
|
|
||||||
sprintf(buf, "%p", sig);
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ivl_signal_t signal_of_nexus(ivl_nexus_t nex, unsigned*word)
|
static ivl_signal_t signal_of_nexus(ivl_nexus_t nex, unsigned*word)
|
||||||
{
|
{
|
||||||
unsigned idx;
|
unsigned idx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue