From 96f38dc018e63588e294163452d2f0c96e46f35f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 9 Jan 2021 12:02:35 +0100 Subject: Fix codacy warnings in build_1164.py --- libraries/openieee/build_1164.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libraries/openieee') diff --git a/libraries/openieee/build_1164.py b/libraries/openieee/build_1164.py index 36739f1ca..20bd120ff 100755 --- a/libraries/openieee/build_1164.py +++ b/libraries/openieee/build_1164.py @@ -17,7 +17,6 @@ # along with GCC; see the file COPYING2. If not see # . -import re import sys # Supported versions @@ -241,7 +240,7 @@ def disp_shift_funcs(func, typ): gen_shift(func != "sll", '-', '+') w(""" end if; return res; - end "{0}";\n""".format(func, typ)) + end "{0}";\n""".format(func)) def gen_rot(is_left, plus, minus): if is_left: @@ -280,7 +279,6 @@ def disp_all_log_funcs(version): disp_scalar_binary(f) disp_scalar_unary("not") for v in vec_types: - typ = "std_" + v + "_vector" for f in binary_funcs: disp_vec_binary(f, v) disp_vec_unary("not", v) @@ -385,17 +383,17 @@ def disp_conv_bv_vec(typ, v): "Generate function body for bit vector conversion" utyp = typ.upper(); w(""" - function to_{1} (b : bit_vector) return std_{2}_vector + function to_{0} (b : bit_vector) return std_{1}_vector is subtype res_range is natural range 1 to b'length; alias ba : bit_vector (res_range) is b; - variable res : std_{2}_vector (res_range); + variable res : std_{1}_vector (res_range); begin for i in res_range loop res (i) := bit_to_x01 (ba (i)); end loop; return res; - end to_{1};\n""".format(typ, utyp, v)) + end to_{0};\n""".format(utyp, v)) def disp_conv_b_t(typ): "Generate function body for bit conversion" -- cgit v1.2.3