Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module half_sublimer(a, b, y, s);
- input logic a, b;
- output logic y, s;
- assign y = a^b;
- assign s = ~a&b;
- endmodule
- module full_sublimer(a, b, sin, y, sout);
- input logic a, b, sin;
- output logic y, sout;
- logic temp[0:2];
- half_sublimer first(a, b, temp[0], temp[1]);
- half_sublimer second(temp[0], sin, y, temp[2]);
- assign sout = temp[1]|temp[2];
- endmodule
- module full_sublimer_8(a, b, sin, y, sout);
- input logic [7:0] a, b;
- input logic sin;
- output logic [7:0] y;
- output logic sout;
- logic temp[0:6];
- full_sublimer a1(a[0], b[0], sin, y[0], temp[0]);
- full_sublimer a2(a[1], b[1], temp[0], y[1], temp[1]);
- full_sublimer a3(a[2], b[2], temp[1], y[2], temp[2]);
- full_sublimer a4(a[3], b[3], temp[2], y[3], temp[3]);
- full_sublimer a5(a[4], b[4], temp[3], y[4], temp[4]);
- full_sublimer a6(a[5], b[5], temp[4], y[5], temp[5]);
- full_sublimer a7(a[6], b[6], temp[5], y[6], temp[6]);
- full_sublimer a8(a[7], b[7], temp[6], y[7], sout);
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement