Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `timescale 1ns / 1ps
- module EightToThreeCoder(
- input x1,
- input x2,
- input x3,
- input x4,
- input x5,
- input x6,
- input x7,
- output y2,
- output y1,
- output y0
- );
- wire not_x1, not_x2, not_x3, not_x4, not_x5, not_x6, not_x7, x76,
- not_x76, x54, not_x54, x32, not_x32, x75, not_x75, x31, not_x31;
- nand(not_x1, x1,x1);
- nand(not_x2, x2,x2);
- nand(not_x3, x3,x3);
- nand(not_x4, x4,x4);
- nand(not_x5, x5,x5);
- nand(not_x6, x6, x6);
- nand(not_x7, x7,x7);
- nand(x76,not_x7,not_x6);
- nand(not_x76, x76, x76);
- nand(x54, not_x5, not_x4);
- nand(not_x54, x54, x54);
- nand(y2, not_x76, not_x54);
- nand(x32, not_x3, not_x2);
- nand(not_x32, x32, x32);
- nand(y1, not_x76, not_x32);
- nand(x75, not_x7, not_x5);
- nand(not_x75, x75, x75);
- nand(x31, not_x3, not_x1);
- nand(not_x31, x31, x31);
- nand(y0, not_x75, not_x31);
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement