-
Notifications
You must be signed in to change notification settings - Fork 5
/
8bit_fa_01.sue
94 lines (92 loc) · 3.99 KB
/
8bit_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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
proc SCHEMATIC_8bit_fa_01 {} {
make 4bit_fa_02 -name xi0 -origin {-620 30}
make 4bit_fa_02 -name xi1 -origin {-220 30}
make input -name a_0 -origin {-720 -40}
make input -name a_1 -origin {-720 -20}
make input -name a_2 -origin {-720 0}
make input -name a_3 -origin {-720 20}
make input -name a_4 -origin {-320 -40}
make input -name a_5 -origin {-320 -20}
make input -name a_6 -origin {-320 0}
make input -name a_7 -origin {-320 20}
make input -name b_0 -origin {-720 40}
make input -name b_1 -origin {-720 60}
make input -name b_2 -origin {-720 80}
make input -name b_3 -origin {-720 100}
make input -name c_in -origin {-720 120}
make input -name b_4 -origin {-320 40}
make input -name b_5 -origin {-320 60}
make input -name b_6 -origin {-320 80}
make input -name b_7 -origin {-320 100}
make output -name s_0 -origin {-520 -40}
make output -name s_1 -origin {-520 -20}
make output -name s_3 -origin {-520 0}
make output -name s_2 -origin {-520 20}
make output -name s_4 -origin {-120 -40}
make output -name s_5 -origin {-120 -20}
make output -name s_6 -origin {-120 20}
make output -name s_7 -origin {-120 0}
make output -name carry -origin {-120 40}
make_wire -520 40 -480 40
make_wire -480 40 -480 120
make_wire -480 120 -320 120
}
proc ICON_8bit_fa_01 args {
icon_setup $args {{origin {0 0}} {orient R0} {name x}}
icon_term -type input -origin {-100 -150} -name a_0
icon_term -type input -origin {-100 -130} -name a_1
icon_term -type input -origin {-100 -110} -name a_2
icon_term -type input -origin {-100 -90} -name a_3
icon_term -type input -origin {-100 -70} -name a_4
icon_term -type input -origin {-100 -50} -name a_5
icon_term -type input -origin {-100 -30} -name a_6
icon_term -type input -origin {-100 -10} -name a_7
icon_term -type input -origin {-100 10} -name b_0
icon_term -type input -origin {-100 30} -name b_1
icon_term -type input -origin {-100 50} -name b_2
icon_term -type input -origin {-100 70} -name b_3
icon_term -type input -origin {-100 170} -name c_in
icon_term -type input -origin {-100 90} -name b_4
icon_term -type input -origin {-100 110} -name b_5
icon_term -type input -origin {-100 130} -name b_6
icon_term -type input -origin {-100 150} -name b_7
icon_term -type output -origin {100 -150} -name s_0
icon_term -type output -origin {100 -130} -name s_1
icon_term -type output -origin {100 -90} -name s_3
icon_term -type output -origin {100 -110} -name s_2
icon_term -type output -origin {100 -70} -name s_4
icon_term -type output -origin {100 -50} -name s_5
icon_term -type output -origin {100 -30} -name s_6
icon_term -type output -origin {100 -10} -name s_7
icon_term -type output -origin {100 10} -name carry
icon_property -origin {-90 -150} -label a_0
icon_property -origin {-90 -130} -label a_1
icon_property -origin {-90 -110} -label a_2
icon_property -origin {-90 -90} -label a_3
icon_property -origin {-90 -70} -label a_4
icon_property -origin {-90 -50} -label a_5
icon_property -origin {-90 -30} -label a_6
icon_property -origin {-90 -10} -label a_7
icon_property -origin {-90 10} -label b_0
icon_property -origin {-90 30} -label b_1
icon_property -origin {-90 50} -label b_2
icon_property -origin {-90 70} -label b_3
icon_property -origin {-90 170} -label c_in
icon_property -origin {-90 90} -label b_4
icon_property -origin {-90 110} -label b_5
icon_property -origin {-90 130} -label b_6
icon_property -origin {-90 150} -label b_7
icon_property -origin {90 -150} -anchor e -label s_0
icon_property -origin {90 -130} -anchor e -label s_1
icon_property -origin {90 -90} -anchor e -label s_3
icon_property -origin {90 -110} -anchor e -label s_2
icon_property -origin {90 -70} -anchor e -label s_4
icon_property -origin {90 -50} -anchor e -label s_5
icon_property -origin {90 -30} -anchor e -label s_6
icon_property -origin {90 -10} -anchor e -label s_7
icon_property -origin {90 10} -anchor e -label carry
icon_property -origin {-90 -200} -label {$name}
icon_property -origin {-90 -180} -label 8bit_fa_01
icon_line -100 -190 100 -190 100 190 -100 190 -100 -190
icon_property -origin {-100 200} -type user -name name -default x
}