3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-15 07:15:28 +00:00

Add first draft of simple C back-end

This commit is contained in:
Clifford Wolf 2017-05-12 14:13:33 +02:00
parent 241dc7dfb4
commit bd4ed19887
6 changed files with 623 additions and 0 deletions

View file

@ -0,0 +1,14 @@
module test(input [31:0] a, b, c, output [31:0] x, y, z);
unit_x unit_x_inst (.a(a), .b(b), .c(c), .x(x));
unit_y unit_y_inst (.a(a), .b(b), .c(c), .y(y));
assign z = a ^ b ^ c;
endmodule
module unit_x(input [31:0] a, b, c, output [31:0] x);
assign x = (a & b) | c;
endmodule
module unit_y(input [31:0] a, b, c, output [31:0] y);
assign y = a & (b | c);
endmodule