From 111e04f86e9e7beeaa440ac7e48728bde12148f0 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Wed, 25 Sep 2019 19:42:31 -0400 Subject: [PATCH] remove extraneous explicit unsigned in params (resolves #47) --- src/Convert/Unsigned.hs | 1 + test/basic/unsigned.sv | 4 ++++ test/basic/unsigned.v | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/src/Convert/Unsigned.hs b/src/Convert/Unsigned.hs index d09e247..190b8df 100644 --- a/src/Convert/Unsigned.hs +++ b/src/Convert/Unsigned.hs @@ -21,6 +21,7 @@ convert = traverseTypes convertType convertType :: Type -> Type +convertType (Implicit Unsigned rs) = Implicit Unspecified rs convertType (IntegerVector t Unsigned rs) = IntegerVector t Unspecified rs convertType (Net t Unsigned rs) = Net t Unspecified rs convertType other = other diff --git a/test/basic/unsigned.sv b/test/basic/unsigned.sv index 56e9f69..41335e4 100644 --- a/test/basic/unsigned.sv +++ b/test/basic/unsigned.sv @@ -4,4 +4,8 @@ module top; for (int unsigned i = 0; i < 4; i++) arr[i] = i; initial $display(arr); + + parameter unsigned foo = 1; + localparam unsigned bar = 1; + initial $display(foo, bar); endmodule diff --git a/test/basic/unsigned.v b/test/basic/unsigned.v index b3d0c94..62834c5 100644 --- a/test/basic/unsigned.v +++ b/test/basic/unsigned.v @@ -6,4 +6,8 @@ module top; arr[i] = i; end initial $display(arr); + + parameter foo = 1; + localparam bar = 1; + initial $display(foo, bar); endmodule