A python module for parsing, processing, and simulating gate-level circuits.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

4 years ago
# edf2bench v0.8
# (!) 1997-2003 Giovanni Squillero <giovanni.squillero@polito.it>
#
# Edf source: "b01/b01.edf"
# 2 inputs
# 2 outputs
# 5 D-type flipflops
# 10 inverters
# 39 gates (1 and, 28 nand, 1 or, 10 not)
INPUT(LINE1)
INPUT(LINE2)
OUTPUT(OUTP_REG)
OUTPUT(OVERFLW_REG)
OVERFLW_REG = DFF(U34)
STATO_REG_2_ = DFF(U45)
STATO_REG_1_ = DFF(U36)
STATO_REG_0_ = DFF(U35)
OUTP_REG = DFF(U44)
U34 = AND(STATO_REG_1_, U38, STATO_REG_0_)
U35 = NAND(U68, U67, U66, U65)
U36 = NAND(U57, U55, U56)
U37 = OR(LINE2, LINE1)
U38 = NOT(STATO_REG_2_)
U39 = NOT(STATO_REG_1_)
U40 = NOT(LINE2)
U41 = NOT(LINE1)
U42 = NOT(STATO_REG_0_)
U43 = NAND(STATO_REG_1_, U42)
U44 = NAND(U73, U72)
U45 = NAND(U60, U59)
U46 = NAND(U70, U69)
U47 = NAND(LINE1, LINE2)
U48 = NAND(STATO_REG_2_, U43)
U49 = NOT(U37)
U50 = NAND(U49, U42)
U51 = NOT(U47)
U52 = NOT(U43)
U53 = NAND(U47, U43)
U54 = NAND(STATO_REG_2_, U47)
U55 = NAND(STATO_REG_0_, U39, U47)
U56 = NAND(U52, U54)
U57 = NAND(U62, U61, STATO_REG_2_)
U58 = NOT(U48)
U59 = NAND(U53, U38)
U60 = NAND(U50, U39, STATO_REG_2_)
U61 = NAND(STATO_REG_1_, U49)
U62 = NAND(U37, U42)
U63 = NAND(STATO_REG_0_, U47)
U64 = NAND(U51, U42)
U65 = NAND(U64, U63, U39, U38)
U66 = NAND(U43, U37, STATO_REG_2_)
U67 = NAND(U34, U47)
U68 = NAND(U51, U52)
U69 = NAND(LINE1, U40)
U70 = NAND(LINE2, U41)
U71 = NOT(U46)
U72 = NAND(U58, U71)
U73 = NAND(U46, U48)