Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //: version "1.8.7"
- module JK_flipflop(Reset, J, Clock, Q, K);
- //: interface /sz:(40, 40) /bd:[ ]
- output Q; //: /sn:0 /dp:1 {0}(458,-4)(458,-2){1}
- //: {2}(456,0)(364,0)(364,84)(378,84){3}
- //: {4}(458,2)(458,14){5}
- //: {6}(460,16)(517,16){7}
- //: {8}(521,16)(577,16)(577,6)(587,6){9}
- //: {10}(519,18)(519,236)(-136,236)(-136,72)(-68,72){11}
- //: {12}(456,16)(403,16){13}
- input K; //: /sn:0 {0}(-235,77)(-68,77){1}
- input Clock; //: /sn:0 {0}(-207,186)(-179,186)(-179,217)(-98,217)(-98,193){1}
- //: {2}(-96,191)(10,191){3}
- //: {4}(-98,189)(-98,121){5}
- //: {6}(-96,119)(-78,119)(-78,82)(-68,82){7}
- //: {8}(-98,117)(-98,8)(-81,8){9}
- //: {10}(-100,191)(-110,191)(-110,196)(10,196){11}
- input J; //: /sn:0 {0}(-81,3)(-233,3){1}
- input Reset; //: /sn:0 {0}(-159,262)(-128,262)(-128,288)(-15,288)(-15,94){1}
- //: {2}(-13,92)(212,92)(212,113)(346,113)(346,94)(378,94){3}
- //: {4}(-15,90)(-15,79)(32,79){5}
- wire w6; //: {0}(31,194)(247,194)(247,97){1}
- //: {2}(249,95)(266,95)(266,93)(285,93){3}
- //: {4}(247,93)(247,23){5}
- //: {6}(249,21)(259,21)(259,2)(247,2)(247,-13)(257,-13){7}
- //: {8}(247,19)(247,12){9}
- wire w30; //: /sn:0 {0}(53,74)(116,74){1}
- //: {2}(120,74)(275,74)(275,88)(285,88){3}
- //: {4}(118,72)(118,23)(-5,23)(-5,8)(29,8){5}
- wire w12; //: /sn:0 {0}(29,3)(-48,3)(-48,3)(-60,3){1}
- wire w10; //: /sn:0 {0}(306,91)(342,91)(342,89)(378,89){1}
- wire w1; //: /sn:0 {0}(-81,-2)(-100,-2)(-100,-30)(539,-30)(539,87){1}
- //: {2}(541,89)(559,89)(559,77){3}
- //: {4}(537,89)(462,89){5}
- //: {6}(460,87)(460,35)(344,35)(344,18)(382,18){7}
- //: {8}(458,89)(399,89){9}
- wire w8; //: /sn:0 {0}(382,13)(332,13)(332,-15)(278,-15){1}
- wire w2; //: /sn:0 {0}(32,74)(-28,74)(-28,77)(-47,77){1}
- wire w15; //: /sn:0 {0}(32,69)(-3,69)(-3,49)(90,49)(90,8){1}
- //: {2}(92,6)(247,6)(247,-18)(257,-18){3}
- //: {4}(88,6)(50,6){5}
- //: enddecls
- nand g4 (.I0(w12), .I1(w30), .Z(w15)); //: @(40,6) /sn:0 /w:[ 0 5 5 ]
- nand g8 (.I0(w15), .I1(w2), .I2(Reset), .Z(w30)); //: @(43,74) /sn:0 /w:[ 0 0 5 0 ]
- nand g3 (.I0(w30), .I1(w6), .Z(w10)); //: @(296,91) /sn:0 /w:[ 3 3 0 ]
- //: joint g16 (Clock) @(-98, 119) /w:[ 6 8 -1 5 ]
- //: comment g26 /dolink:0 /link:"" @(132,53) /sn:0
- //: /line:"Qm-"
- //: /end
- //: joint g17 (Clock) @(-98, 191) /w:[ 2 4 10 1 ]
- nand g2 (.I0(w15), .I1(w6), .Z(w8)); //: @(268,-15) /sn:0 /w:[ 3 7 1 ]
- //: joint g30 (Reset) @(-15, 92) /w:[ 2 4 -1 1 ]
- //: joint g23 (w1) @(460, 89) /w:[ 5 6 8 -1 ]
- //: joint g24 (Q) @(519, 16) /w:[ 8 -1 7 10 ]
- nand g1 (.I0(Q), .I1(K), .I2(Clock), .Z(w2)); //: @(-57,77) /sn:0 /w:[ 11 1 7 1 ]
- //: joint g18 (w6) @(247, 95) /w:[ 2 4 -1 1 ]
- //: joint g25 (w1) @(539, 89) /w:[ 2 1 4 -1 ]
- //: comment g10 /dolink:0 /link:"" @(-247,11) /sn:0
- //: /line:"J"
- //: /line:""
- //: /end
- nand g6 (.I0(Clock), .I1(Clock), .Z(w6)); //: @(21,194) /sn:0 /w:[ 3 11 0 ]
- //: input g35 (Reset) @(-161,262) /sn:0 /w:[ 0 ]
- //: comment g9 /dolink:0 /link:"" @(133,-13) /sn:0
- //: /line:"Qm"
- //: /line:""
- //: /end
- //: joint g7 (w15) @(90, 6) /w:[ 2 -1 4 1 ]
- //: input g31 (J) @(-235,3) /sn:0 /w:[ 1 ]
- //: joint g22 (Q) @(458, 0) /w:[ -1 1 2 4 ]
- //: comment g12 /dolink:0 /link:"" @(-252,211) /sn:0
- //: /line:"Clock"
- //: /line:""
- //: /end
- //: joint g34 (w6) @(247, 21) /w:[ 6 8 -1 5 ]
- //: comment g28 /dolink:0 /link:"" @(566,-8) /sn:0
- //: /line:"Q"
- //: /line:""
- //: /end
- //: input g14 (Clock) @(-209,186) /sn:0 /w:[ 0 ]
- //: joint g5 (w30) @(118, 74) /w:[ 2 4 1 -1 ]
- //: comment g11 /dolink:0 /link:"" @(-246,106) /sn:0
- //: /line:"K"
- //: /line:""
- //: /end
- //: joint g21 (Q) @(458, 16) /w:[ 6 5 12 -1 ]
- nand g19 (.I0(w8), .I1(w1), .Z(Q)); //: @(393,16) /sn:0 /w:[ 0 7 13 ]
- nand g20 (.I0(Q), .I1(w10), .I2(Reset), .Z(w1)); //: @(389,89) /sn:0 /w:[ 3 1 3 9 ]
- //: output g15 (Q) @(584,6) /sn:0 /w:[ 9 ]
- nand g0 (.I0(w1), .I1(J), .I2(Clock), .Z(w12)); //: @(-70,3) /sn:0 /w:[ 0 0 9 1 ]
- //: comment g27 /dolink:0 /link:"" @(560,104) /sn:0
- //: /line:"Q-"
- //: /line:""
- //: /line:""
- //: /end
- //: input g13 (K) @(-237,77) /sn:0 /w:[ 0 ]
- endmodule
- module JK();
- //: interface /sz:(40, 40) /bd:[ ]
- //: enddecls
- endmodule
- module new_block();
- //: interface /sz:(176, 187) /bd:[ ]
- //: enddecls
- endmodule
- module JK_flip_flop();
- //: interface /sz:(40, 40) /bd:[ ]
- //: enddecls
- endmodule
- module main; //: root_module
- supply1 w13; //: /sn:0 {0}(-65,619)(-65,683)(43,683){1}
- //: {2}(47,683)(69,683)(69,685)(97,685){3}
- //: {4}(45,685)(45,839)(97,839){5}
- wire w6; //: {0}(186,325)(402,325)(402,228){1}
- //: {2}(404,226)(421,226)(421,224)(440,224){3}
- //: {4}(402,224)(402,154){5}
- //: {6}(404,152)(414,152)(414,133)(402,133)(402,118)(412,118){7}
- //: {8}(402,150)(402,143){9}
- wire w7; //: /sn:0 {0}(533,225)(501,225)(501,244)(367,244)(367,223)(142,223){1}
- //: {2}(140,221)(140,210)(187,210){3}
- //: {4}(140,225)(140,419)(3,419){5}
- wire w4; //: /sn:0 /dp:1 {0}(87,208)(-9,208){1}
- wire w0; //: /sn:0 {0}(97,757)(26,757)(26,938){1}
- //: {2}(28,940)(359,940)(359,751)(420,751){3}
- //: {4}(26,942)(26,968)(-28,968){5}
- wire w3; //: /sn:0 {0}(738,139)(738,147)(676,147){1}
- //: {2}(672,147)(615,147){3}
- //: {4}(613,145)(613,133){5}
- //: {6}(613,129)(613,127){7}
- //: {8}(611,131)(519,131)(519,215)(533,215){9}
- //: {10}(611,147)(558,147){11}
- //: {12}(674,149)(674,367)(19,367)(19,203)(87,203){13}
- wire w22; //: /sn:0 {0}(87,213)(77,213)(77,250)(59,250){1}
- //: {2}(57,248)(57,139)(74,139){3}
- //: {4}(57,252)(57,320){5}
- //: {6}(59,322)(165,322){7}
- //: {8}(55,322)(45,322)(45,327)(165,327){9}
- //: {10}(57,324)(57,348)(-51,348){11}
- wire w30; //: /sn:0 {0}(208,205)(271,205){1}
- //: {2}(275,205)(430,205)(430,219)(440,219){3}
- //: {4}(273,203)(273,154)(150,154)(150,139)(184,139){5}
- wire w19; //: /sn:0 {0}(301,695)(320,695)(320,693)(346,693){1}
- //: {2}(350,693)(360,693){3}
- //: {4}(364,693)(412,693)(412,688)(420,688){5}
- //: {6}(362,691)(362,604)(283,604)(283,498)(364,498){7}
- //: {8}(348,695)(348,830)(420,830){9}
- wire w12; //: /sn:0 /dp:1 {0}(184,134)(107,134)(107,134)(95,134){1}
- wire w10; //: /sn:0 {0}(461,222)(497,222)(497,220)(533,220){1}
- wire [1:0] w21; //: /sn:0 /dp:1 {0}(370,493)(670,493)(670,501)(677,501)(677,448)(678,448)(678,438){1}
- wire w1; //: /sn:0 /dp:1 {0}(74,134)(-7,134){1}
- wire w8; //: /sn:0 /dp:1 {0}(537,144)(487,144)(487,116)(433,116){1}
- wire w11; //: /sn:0 {0}(114,549)(177,549)(177,626){1}
- //: {2}(179,628)(501,628)(501,671){3}
- //: {4}(177,630)(177,650)(171,650)(171,668){5}
- wire w2; //: /sn:0 {0}(187,205)(127,205)(127,208)(108,208){1}
- wire w15; //: /sn:0 /dp:1 {0}(187,200)(152,200)(152,180)(245,180)(245,139){1}
- //: {2}(247,137)(402,137)(402,113)(412,113){3}
- //: {4}(243,137)(205,137){5}
- wire w5; //: /sn:0 {0}(739,210)(739,220)(696,220){1}
- //: {2}(694,218)(694,101)(55,101)(55,129)(74,129){3}
- //: {4}(692,220)(617,220){5}
- //: {6}(615,218)(615,166)(499,166)(499,149)(537,149){7}
- //: {8}(613,220)(554,220){9}
- wire w9; //: /sn:0 {0}(625,711)(635,711)(635,696)(669,696)(669,541)(315,541)(315,488)(364,488){1}
- //: enddecls
- nand g4 (.I0(w12), .I1(w30), .Z(w15)); //: @(195,137) /sn:0 /w:[ 0 5 5 ]
- nand g8 (.I0(w15), .I1(w2), .I2(w7), .Z(w30)); //: @(198,205) /sn:0 /w:[ 0 0 3 0 ]
- nand g3 (.I0(w30), .I1(w6), .Z(w10)); //: @(451,222) /sn:0 /w:[ 3 3 0 ]
- //: joint g16 (w22) @(57, 250) /w:[ 1 2 -1 4 ]
- //: comment g26 /dolink:0 /link:"" @(287,184) /sn:0
- //: /line:"Qm-"
- //: /end
- //: joint g17 (w22) @(57, 322) /w:[ 6 5 8 10 ]
- nand g2 (.I0(w15), .I1(w6), .Z(w8)); //: @(423,116) /sn:0 /w:[ 3 7 1 ]
- //: joint g30 (w7) @(140, 223) /w:[ 1 2 -1 4 ]
- //: joint g23 (w5) @(615, 220) /w:[ 5 6 8 -1 ]
- JK_flipflop g39 (.Reset(w11), .K(w19), .Clock(w0), .J(w19), .Q(w9)); //: @(421, 672) /sz:(203, 174) /sn:0 /p:[ Ti0>3 Li0>9 Li1>3 Li2>5 Ro0<0 ]
- //: joint g24 (w3) @(674, 147) /w:[ 1 -1 2 12 ]
- nand g1 (.I0(w3), .I1(w4), .I2(w22), .Z(w2)); //: @(98,208) /sn:0 /w:[ 13 0 0 1 ]
- //: switch g29 (w7) @(-14,419) /sn:0 /w:[ 5 ] /st:1
- //: joint g18 (w6) @(402, 226) /w:[ 2 4 -1 1 ]
- //: joint g25 (w5) @(694, 220) /w:[ 1 2 4 -1 ]
- //: comment g10 /dolink:0 /link:"" @(-92,142) /sn:0
- //: /line:"J"
- //: /line:""
- //: /end
- nand g6 (.I0(w22), .I1(w22), .Z(w6)); //: @(176,325) /sn:0 /w:[ 7 9 0 ]
- //: switch g35 (w0) @(-45,968) /sn:0 /w:[ 5 ] /st:0
- //: comment g9 /dolink:0 /link:"" @(288,118) /sn:0
- //: /line:"Qm"
- //: /line:""
- //: /end
- //: joint g7 (w15) @(245, 137) /w:[ 2 -1 4 1 ]
- //: comment g31 /dolink:0 /link:"" @(86,566) /sn:0
- //: /line:"Reset"
- //: /end
- //: joint g22 (w3) @(613, 131) /w:[ -1 6 8 5 ]
- concat g45 (.I0(w19), .I1(w9), .Z(w21)); //: @(369,493) /sn:0 /w:[ 7 1 0 ] /dr:0
- //: joint g41 (w13) @(45, 683) /w:[ 2 -1 1 4 ]
- //: supply1 g36 (w13) @(-54,619) /sn:0 /w:[ 0 ]
- led g33 (.I(w5)); //: @(739,203) /sn:0 /w:[ 0 ] /type:0
- //: joint g42 (w0) @(26, 940) /w:[ 2 1 -1 4 ]
- //: joint g40 (w11) @(177, 628) /w:[ 2 1 -1 4 ]
- //: comment g12 /dolink:0 /link:"" @(-89,367) /sn:0
- //: /line:"Clock"
- //: /line:""
- //: /end
- //: joint g46 (w19) @(362, 693) /w:[ 4 6 3 -1 ]
- //: joint g34 (w6) @(402, 152) /w:[ 6 8 -1 5 ]
- //: comment g28 /dolink:0 /link:"" @(721,123) /sn:0
- //: /line:"Q"
- //: /line:""
- //: /end
- //: joint g5 (w30) @(273, 205) /w:[ 2 4 1 -1 ]
- //: switch g14 (w4) @(-26,208) /sn:0 /w:[ 1 ] /st:1
- //: comment g11 /dolink:0 /link:"" @(-91,237) /sn:0
- //: /line:"K"
- //: /line:""
- //: /end
- //: joint g21 (w3) @(613, 147) /w:[ 3 4 10 -1 ]
- nand g19 (.I0(w8), .I1(w5), .Z(w3)); //: @(548,147) /sn:0 /w:[ 0 7 11 ]
- led g32 (.I(w3)); //: @(738,132) /sn:0 /w:[ 0 ] /type:0
- nand g20 (.I0(w3), .I1(w10), .I2(w7), .Z(w5)); //: @(544,220) /sn:0 /w:[ 9 1 0 9 ]
- //: joint g43 (w19) @(348, 693) /w:[ 2 -1 1 8 ]
- JK_flipflop g38 (.Reset(w11), .K(w13), .Clock(w0), .J(w13), .Q(w19)); //: @(98, 669) /sz:(202, 184) /sn:0 /p:[ Ti0>5 Li0>5 Li1>0 Li2>3 Ro0<0 ]
- //: switch g15 (w22) @(-68,348) /sn:0 /w:[ 11 ] /st:0
- nand g0 (.I0(w5), .I1(w1), .I2(w22), .Z(w12)); //: @(85,134) /sn:0 /w:[ 3 0 3 1 ]
- led g48 (.I(w21)); //: @(678,431) /sn:0 /w:[ 1 ] /type:3
- //: comment g27 /dolink:0 /link:"" @(715,235) /sn:0
- //: /line:"Q-"
- //: /line:""
- //: /line:""
- //: /end
- //: switch g37 (w11) @(97,549) /sn:0 /w:[ 0 ] /st:1
- //: switch g13 (w1) @(-24,134) /sn:0 /w:[ 1 ] /st:1
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement