-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path4bit_fa_01.sue
75 lines (73 loc) · 2.98 KB
/
4bit_fa_01.sue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
proc SCHEMATIC_4bit_fa_01 {} {
make input -name c_01 -origin {-510 290}
make output -name op_01 -origin {-300 190}
make output -name op_02 -origin {20 190}
make input -name in1_03 -origin {130 250}
make input -name in2_03 -origin {130 270}
make input -name in1_02 -origin {-190 250}
make input -name in2_02 -origin {-190 270}
make input -name in1_01 -origin {-510 250}
make input -name in2_01 -origin {-510 270}
make output -name op_03 -origin {340 190}
make input -name in1_04 -origin {450 250}
make input -name in2_04 -origin {450 270}
make output -name op_04 -origin {660 190}
make full_adder_01 -name xi0 -origin {-410 260}
make full_adder_01 -name xi1 -origin {-90 260}
make full_adder_01 -name xi2 -origin {230 260}
make full_adder_01 -name xi3 -origin {550 260}
make output -name carry -origin {690 270}
make_wire -310 270 -270 270
make_wire -270 270 -270 290
make_wire -270 290 -190 290
make_wire 10 270 50 270
make_wire 50 270 50 290
make_wire 50 290 130 290
make_wire 330 270 370 270
make_wire 370 270 370 290
make_wire 370 290 450 290
make_wire 650 270 690 270
make_wire -300 190 -300 250
make_wire 20 190 20 250
make_wire 340 190 340 250
make_wire 650 250 660 250
make_wire 660 190 660 250
make_wire 330 250 340 250
make_wire -310 250 -300 250
make_wire 10 250 20 250
}
proc ICON_4bit_fa_01 args {
icon_setup $args {{origin {0 0}} {orient R0} {name x}}
icon_term -type input -origin {-100 -70} -name c_01
icon_term -type input -origin {-100 30} -name in1_03
icon_term -type input -origin {-100 50} -name in2_03
icon_term -type input -origin {-100 -10} -name in1_02
icon_term -type input -origin {-100 10} -name in2_02
icon_term -type input -origin {-100 -50} -name in1_01
icon_term -type input -origin {-100 -30} -name in2_01
icon_term -type input -origin {-100 70} -name in1_04
icon_term -type input -origin {-100 90} -name in2_04
icon_term -type output -origin {100 -70} -name op_01
icon_term -type output -origin {100 -50} -name op_02
icon_term -type output -origin {100 -30} -name op_03
icon_term -type output -origin {100 -10} -name op_04
icon_term -type output -origin {100 10} -name carry
icon_property -origin {-90 -70} -label c_01
icon_property -origin {-90 30} -label in1_03
icon_property -origin {-90 50} -label in2_03
icon_property -origin {-90 -10} -label in1_02
icon_property -origin {-90 10} -label in2_02
icon_property -origin {-90 -50} -label in1_01
icon_property -origin {-90 -30} -label in2_01
icon_property -origin {-90 70} -label in1_04
icon_property -origin {-90 90} -label in2_04
icon_property -origin {90 -70} -anchor e -label op_01
icon_property -origin {90 -50} -anchor e -label op_02
icon_property -origin {90 -30} -anchor e -label op_03
icon_property -origin {90 -10} -anchor e -label op_04
icon_property -origin {90 10} -anchor e -label carry
icon_property -origin {-90 -120} -label {$name}
icon_property -origin {-90 -100} -label 4bit_fa_01
icon_line -100 -110 100 -110 100 110 -100 110 -100 -110
icon_property -origin {-80 130} -type user -name name -default x
}