-
Notifications
You must be signed in to change notification settings - Fork 5
/
1_bit_ha_02.sue
41 lines (39 loc) · 1.47 KB
/
1_bit_ha_02.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
proc SCHEMATIC_1_bit_ha_02 {} {
make output -name sum -origin {710 110}
make output -name carry -origin {900 270}
make input -name vin_a -origin {170 110}
make input -name vin_b -origin {170 150}
make name_net -name vin_a -origin {270 110}
make name_net -name vin_b -origin {310 130}
make name_net -name vin_a -origin {270 270}
make name_net -name vin_b -origin {310 290}
make xor_01 -name xi0 -origin {510 110}
make nand_02 -name xi1 -origin {510 270}
make inv_01 -name xi2 -origin {740 260}
make_wire 610 110 710 110
make_wire 270 110 410 110
make_wire 270 110 250 110
make_wire 310 130 410 130
make_wire 310 130 250 130
make_wire 270 270 250 270
make_wire 310 290 250 290
make_wire 410 270 270 270
make_wire 410 290 310 290
make_wire 610 270 640 270
make_wire 840 270 900 270
}
proc ICON_1_bit_ha_02 args {
icon_setup $args {{origin {0 0}} {orient R0} {name x}}
icon_term -type input -origin {-100 0} -name vin_a
icon_term -type input -origin {-100 20} -name vin_b
icon_term -type output -origin {100 0} -name sum
icon_term -type output -origin {100 20} -name carry
icon_property -origin {-90 0} -label vin_a
icon_property -origin {-90 20} -label vin_b
icon_property -origin {90 0} -anchor e -label sum
icon_property -origin {90 20} -anchor e -label carry
icon_property -origin {-90 -50} -label {$name}
icon_property -origin {-90 -30} -label 1_bit_ha_02
icon_line -100 -40 100 -40 100 40 -100 40 -100 -40
icon_property -origin {-90 50} -type user -name name -default x
}