Added tests for Verilog frontent for attributes on parameters and localparams
authorMaciej Kurc <mkurc@antmicro.com>
Thu, 16 May 2019 10:53:43 +0000 (12:53 +0200)
committerMaciej Kurc <mkurc@antmicro.com>
Thu, 16 May 2019 10:53:43 +0000 (12:53 +0200)
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
tests/simple/localparam_attr.v [new file with mode: 0644]
tests/simple/param_attr.v [new file with mode: 0644]

diff --git a/tests/simple/localparam_attr.v b/tests/simple/localparam_attr.v
new file mode 100644 (file)
index 0000000..2ef76c7
--- /dev/null
@@ -0,0 +1,11 @@
+module uut_localparam_attr (I, O);
+
+(* LOCALPARAM_ATTRIBUTE = "attribute_content" *)
+localparam WIDTH = 1;
+
+input  wire [WIDTH-1:0] I;
+output wire [WIDTH-1:0] O;
+
+assign O = I;
+
+endmodule
diff --git a/tests/simple/param_attr.v b/tests/simple/param_attr.v
new file mode 100644 (file)
index 0000000..34d63a3
--- /dev/null
@@ -0,0 +1,11 @@
+module uut_param_attr (I, O);
+
+(* PARAMETER_ATTRIBUTE = "attribute_content" *)
+parameter WIDTH = 1;
+
+input  wire [WIDTH-1:0] I;
+output wire [WIDTH-1:0] O;
+
+assign O = I;
+
+endmodule