Added tests for attributes
[yosys.git] / tests / simple / attrib03_parameter.v
1 module bar(clk, rst, inp, out);
2
3 (* bus_width *)
4 parameter WIDTH = 2;
5
6 (* an_attribute_on_localparam = 55 *)
7 localparam INCREMENT = 5;
8
9 input wire clk;
10 input wire rst;
11 input wire [WIDTH-1:0] inp;
12 output reg [WIDTH-1:0] out;
13
14 always @(posedge clk)
15 if (rst) out <= 0;
16 else out <= inp + INCREMENT;
17
18 endmodule
19
20 module foo(clk, rst, inp, out);
21 input wire clk;
22 input wire rst;
23 input wire [7:0] inp;
24 output wire [7:0] out;
25
26 bar # (.WIDTH(8)) bar_instance (clk, rst, inp, out);
27 endmodule
28