xics: Fix -Whide warnings
authorJoel Stanley <joel@jms.id.au>
Mon, 8 Aug 2022 10:51:27 +0000 (20:21 +0930)
committerJoel Stanley <joel@jms.id.au>
Mon, 8 Aug 2022 10:58:54 +0000 (20:28 +0930)
xics.vhdl:83:25:warning: declaration of "v" hides variable "v" [-Whide]
        function  bswap(v : in std_ulogic_vector(31 downto 0)) return std_ulogic_vector is

xics.vhdl:84:22:warning: declaration of "r" hides signal "r" [-Whide]
            variable r : std_ulogic_vector(31 downto 0);

Signed-off-by: Joel Stanley <joel@jms.id.au>
xics.vhdl

index a717215ddc8ef3f4870ab073e4f97c8b886da389..d4adc1e220bd25d5c0b4370730b6096fad50c373 100644 (file)
--- a/xics.vhdl
+++ b/xics.vhdl
@@ -80,14 +80,14 @@ begin
         variable v : reg_internal_t;
         variable xirr_accept_rd : std_ulogic;
 
-        function  bswap(v : in std_ulogic_vector(31 downto 0)) return std_ulogic_vector is
-            variable r : std_ulogic_vector(31 downto 0);
+        function  bswap(vec : in std_ulogic_vector(31 downto 0)) return std_ulogic_vector is
+            variable rout : std_ulogic_vector(31 downto 0);
         begin
-            r( 7 downto  0) := v(31 downto 24);
-            r(15 downto  8) := v(23 downto 16);
-            r(23 downto 16) := v(15 downto  8);
-            r(31 downto 24) := v( 7 downto  0);
-            return r;
+            rout( 7 downto  0) := vec(31 downto 24);
+            rout(15 downto  8) := vec(23 downto 16);
+            rout(23 downto 16) := vec(15 downto  8);
+            rout(31 downto 24) := vec( 7 downto  0);
+            return rout;
         end function;
 
         variable be_in  : std_ulogic_vector(31 downto 0);