3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-02 00:00:44 +00:00

Added tests for attributes

Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This commit is contained in:
Maciej Kurc 2019-06-03 09:12:51 +02:00
parent a6cadf6318
commit 5739cf5265
9 changed files with 219 additions and 0 deletions

View file

@ -0,0 +1,23 @@
module bar(clk, rst, inp_a, inp_b, out);
input wire clk;
input wire rst;
input wire [7:0] inp_a;
input wire [7:0] inp_b;
output reg [7:0] out;
always @(posedge clk)
if (rst) out <= 0;
else out <= inp_a + (* ripple_adder *) inp_b;
endmodule
module foo(clk, rst, inp_a, inp_b, out);
input wire clk;
input wire rst;
input wire [7:0] inp_a;
input wire [7:0] inp_b;
output wire [7:0] out;
bar bar_instance (clk, rst, inp_a, inp_b, out);
endmodule