//: version "1.8.6" module comparateur8(sup, inf, d, eg, c); //: interface /sz:(40, 40) /bd:[ ] output eg; //: /sn:0 {0}(1182,371)(979,371)(979,357)(969,357){1} output inf; //: /sn:0 /dp:1 {0}(976,650)(1010,650)(1010,714)(1167,714){1} input [7:0] d; //: /sn:0 {0}(153,76)(173,76)(173,146){1} //: {2}(173,147)(173,226){3} //: {4}(173,227)(173,315){5} //: {6}(173,316)(173,389){7} //: {8}(173,390)(173,459){9} //: {10}(173,460)(173,532){11} //: {12}(173,533)(173,610){13} //: {14}(173,611)(173,696){15} //: {16}(173,697)(173,707){17} output sup; //: /sn:0 {0}(1186,99)(977,99)(977,137)(967,137){1} input [7:0] c; //: /sn:0 /dp:1 {0}(70,76)(87,76)(87,120){1} //: {2}(87,121)(87,199){3} //: {4}(87,200)(87,291){5} //: {6}(87,292)(87,361){7} //: {8}(87,362)(87,433){9} //: {10}(87,434)(87,509){11} //: {12}(87,510)(87,583){13} //: {14}(87,584)(87,670){15} //: {16}(87,671)(87,699){17} wire w32; //: /sn:0 {0}(955,658)(797,658)(797,582)(375,582){1} wire w6; //: /sn:0 {0}(382,661)(302,661)(302,654)(285,654){1} wire w45; //: /sn:0 {0}(278,197)(336,197)(336,183)(346,183){1} wire w7; //: /sn:0 {0}(336,685)(303,685)(303,674)(285,674){1} wire w46; //: /sn:0 /dp:1 {0}(394,404)(360,404)(360,392)(289,392){1} wire w60; //: /sn:0 /dp:1 {0}(339,753)(299,753)(299,747)(284,747){1} wire w61; //: /sn:0 {0}(360,751)(945,751)(945,668)(955,668){1} wire a2; //: /sn:0 {0}(91,362)(156,362)(156,374)(215,374){1} wire w16; //: /sn:0 /dp:1 {0}(946,125)(906,125)(906,181)(367,181){1} wire w14; //: /sn:0 {0}(419,435)(403,435)(403,420)(720,420)(720,293){1} //: {2}(722,291)(801,291)(801,350)(948,350){3} //: {4}(718,291)(706,291){5} //: {6}(702,291)(687,291){7} //: {8}(683,291)(678,291){9} //: {10}(685,293)(685,347)(344,347)(344,362)(354,362){11} //: {12}(704,293)(704,385)(384,385)(384,399)(394,399){13} wire w19; //: /sn:0 {0}(177,227)(194,227)(194,225)(204,225){1} wire b2; //: /sn:0 {0}(177,390)(205,390)(205,399)(215,399){1} wire w15; //: /sn:0 {0}(327,520)(318,520)(318,508)(505,508)(505,440){1} //: {2}(507,438)(927,438)(927,355)(948,355){3} //: {4}(503,438)(485,438){5} //: {6}(481,438)(454,438){7} //: {8}(450,438)(440,438){9} //: {10}(452,440)(452,452)(317,452)(317,460)(329,460){11} //: {12}(483,440)(483,478)(311,478)(311,490)(319,490){13} wire w4; //: /sn:0 {0}(325,605)(317,605)(317,595)(444,595)(444,526){1} //: {2}(446,524)(934,524)(934,360)(948,360){3} //: {4}(442,524)(417,524){5} //: {6}(413,524)(406,524)(406,523)(379,523){7} //: {8}(375,523)(348,523){9} //: {10}(377,525)(377,543)(336,543)(336,552)(346,552){11} //: {12}(415,526)(415,570)(345,570)(345,579)(354,579){13} wire w38; //: /sn:0 {0}(403,659)(779,659)(779,663)(955,663){1} wire a4; //: /sn:0 {0}(91,510)(199,510)(199,548)(209,548){1} wire w51; //: /sn:0 /dp:1 {0}(319,495)(283,495){1} wire w3; //: /sn:0 {0}(177,147)(193,147)(193,148)(203,148){1} wire w0; //: /sn:0 {0}(286,328)(647,328)(647,293)(657,293){1} wire w37; //: /sn:0 {0}(351,639)(295,639)(295,635)(285,635){1} wire w64; //: /sn:0 {0}(373,783)(871,783)(871,375)(948,375){1} wire w63; //: /sn:0 /dp:1 {0}(352,785)(299,785)(299,774)(284,774){1} wire w43; //: /sn:0 {0}(91,121)(193,121)(193,116)(203,116){1} wire w21; //: /sn:0 {0}(946,130)(912,130)(912,256)(529,256){1} wire w31; //: /sn:0 {0}(955,653)(807,653)(807,493)(340,493){1} wire w41; //: /sn:0 {0}(277,139)(843,139)(843,633)(955,633){1} wire w20; //: /sn:0 {0}(177,460)(199,460)(199,504)(209,504){1} wire b6; //: /sn:0 {0}(177,697)(183,697)(183,705)(189,705)(189,759)(210,759){1} wire w23; //: /sn:0 {0}(946,140)(927,140)(927,463)(350,463){1} wire w24; //: /sn:0 {0}(946,145)(897,145)(897,555)(367,555){1} wire w36; //: /sn:0 /dp:1 {0}(346,557)(299,557)(299,552)(283,552){1} wire w1; //: /sn:0 {0}(948,345)(879,345)(879,161)(442,161){1} //: {2}(438,161)(391,161){3} //: {4}(387,161)(305,161){5} //: {6}(301,161)(277,161){7} //: {8}(303,163)(303,178)(346,178){9} //: {10}(389,163)(389,206)(399,206){11} //: {12}(440,163)(440,231)(460,231){13} wire w25; //: /sn:0 {0}(946,150)(931,150)(931,637)(372,637){1} wire a1; //: /sn:0 {0}(91,292)(167,292)(167,285)(212,285){1} wire a6; //: /sn:0 {0}(91,671)(200,671)(200,715)(210,715){1} wire w40; //: /sn:0 {0}(277,120)(946,120){1} wire b1; //: /sn:0 {0}(177,316)(202,316)(202,317)(212,317){1} wire w35; //: /sn:0 {0}(481,234)(488,234){1} //: {2}(492,234)(539,234){3} //: {4}(543,234)(631,234){5} //: {6}(635,234)(810,234)(810,340)(948,340){7} //: {8}(633,236)(633,288)(657,288){9} //: {10}(541,236)(541,306)(549,306){11} //: {12}(490,236)(490,253)(508,253){13} wire w30; //: /sn:0 {0}(955,648)(818,648)(818,402)(415,402){1} wire b4; //: /sn:0 {0}(177,533)(190,533)(190,580)(209,580){1} wire w17; //: /sn:0 {0}(91,434)(117,434)(117,472)(209,472){1} wire w22; //: /sn:0 {0}(946,135)(920,135)(920,365)(375,365){1} wire w53; //: /sn:0 /dp:1 {0}(354,584)(337,584)(337,571)(283,571){1} wire a5; //: /sn:0 {0}(91,584)(201,584)(201,631)(211,631){1} wire w62; //: /sn:0 {0}(352,780)(343,780)(343,773)(431,773)(431,686){1} //: {2}(433,684)(908,684)(908,370)(948,370){3} //: {4}(429,684)(403,684){5} //: {6}(399,684)(387,684)(387,683)(373,683){7} //: {8}(369,683)(357,683){9} //: {10}(371,685)(371,703)(322,703)(322,718)(331,718){11} //: {12}(401,686)(401,741)(326,741)(326,748)(339,748){13} wire w12; //: /sn:0 {0}(91,200)(194,200)(194,193)(204,193){1} wire w57; //: /sn:0 /dp:1 {0}(508,258)(491,258)(491,289)(286,289){1} wire w2; //: /sn:0 /dp:1 {0}(354,367)(321,367)(321,377)(289,377){1} wire w49; //: /sn:0 /dp:1 {0}(329,465)(299,465)(299,476)(283,476){1} wire w27; //: /sn:0 /dp:1 {0}(955,638)(835,638)(835,209)(420,209){1} wire w13; //: /sn:0 {0}(460,236)(278,236){1} wire w48; //: /sn:0 /dp:1 {0}(419,440)(357,440)(357,408)(289,408){1} wire w52; //: /sn:0 {0}(325,610)(301,610)(301,591)(283,591){1} wire w5; //: /sn:0 {0}(336,680)(326,680)(326,670)(425,670)(425,610){1} //: {2}(427,608)(926,608)(926,365)(948,365){3} //: {4}(423,608)(382,608){5} //: {6}(378,608)(358,608){7} //: {8}(354,608)(346,608){9} //: {10}(356,610)(356,623)(341,623)(341,634)(351,634){11} //: {12}(380,610)(380,656)(382,656){13} wire w33; //: /sn:0 /dp:1 {0}(331,723)(301,723)(301,720)(284,720){1} wire w29; //: /sn:0 {0}(955,643)(828,643)(828,309)(570,309){1} wire w47; //: /sn:0 /dp:1 {0}(549,311)(312,311)(312,308)(286,308){1} wire w42; //: /sn:0 {0}(278,215)(389,215)(389,211)(399,211){1} wire w50; //: /sn:0 {0}(327,525)(300,525)(300,515)(283,515){1} wire b5; //: /sn:0 {0}(177,611)(188,611)(188,663)(211,663){1} wire w26; //: /sn:0 {0}(946,155)(888,155)(888,721)(352,721){1} //: enddecls tran g4(.Z(w19), .I(d[6])); //: @(171,227) /sn:0 /R:2 /w:[ 0 4 3 ] /ss:1 tran g8(.Z(a1), .I(c[5])); //: @(85,292) /sn:0 /R:2 /w:[ 0 6 5 ] /ss:1 and g61 (.I0(w4), .I1(w52), .Z(w5)); //: @(336,608) /sn:0 /w:[ 0 0 9 ] tran g13(.Z(b2), .I(d[4])); //: @(171,390) /sn:0 /R:2 /w:[ 0 8 7 ] /ss:1 //: output g51 (sup) @(1183,99) /sn:0 /w:[ 0 ] //: output g58 (inf) @(1164,714) /sn:0 /w:[ 1 ] and g3 (.I0(w1), .I1(w45), .Z(w16)); //: @(357,181) /sn:0 /w:[ 9 1 1 ] //: joint g34 (w35) @(541, 234) /w:[ 4 -1 3 10 ] //: joint g37 (w35) @(633, 234) /w:[ 6 -1 5 8 ] //: joint g55 (w4) @(415, 524) /w:[ 5 -1 6 12 ] tran g2(.Z(w12), .I(c[6])); //: @(85,200) /sn:0 /R:2 /w:[ 0 4 3 ] /ss:1 //: joint g65 (w5) @(380, 608) /w:[ 5 -1 6 12 ] //: joint g59 (w4) @(444, 524) /w:[ 2 -1 4 1 ] comparateur1 g1 (.b(w3), .a(w43), .egal(w1), .bsupa(w41), .asupb(w40)); //: @(204, 108) /sz:(72, 64) /sn:0 /p:[ Li0>1 Li1>1 Ro0<7 Ro1<0 Ro2<0 ] //: joint g72 (w62) @(401, 684) /w:[ 5 -1 6 12 ] and g64 (.I0(w5), .I1(w6), .Z(w38)); //: @(393,659) /sn:0 /w:[ 13 0 0 ] comparateur1 g16 (.b(b1), .a(a1), .egal(w0), .bsupa(w47), .asupb(w57)); //: @(213, 277) /sz:(72, 64) /sn:0 /p:[ Li0>1 Li1>1 Ro0<0 Ro1<1 Ro2<1 ] tran g11(.Z(b1), .I(d[5])); //: @(171,316) /sn:0 /R:2 /w:[ 0 6 5 ] /ss:1 comparateur1 g10 (.b(w19), .a(w12), .egal(w13), .bsupa(w42), .asupb(w45)); //: @(205, 185) /sz:(72, 64) /sn:0 /p:[ Li0>1 Li1>1 Ro0<1 Ro1<0 Ro2<0 ] and g28 (.I0(w1), .I1(w13), .Z(w35)); //: @(471,234) /sn:0 /w:[ 13 0 0 ] //: joint g50 (w15) @(505, 438) /w:[ 2 -1 4 1 ] tran g19(.Z(b4), .I(d[2])); //: @(171,533) /sn:0 /R:2 /w:[ 0 12 11 ] /ss:1 //: joint g27 (w1) @(303, 161) /w:[ 5 -1 6 8 ] and g32 (.I0(w35), .I1(w47), .Z(w29)); //: @(560,309) /sn:0 /w:[ 11 0 1 ] //: input g6 (d) @(151,76) /sn:0 /w:[ 0 ] and g38 (.I0(w35), .I1(w0), .Z(w14)); //: @(668,291) /sn:0 /w:[ 9 1 9 ] and g69 (.I0(w62), .I1(w60), .Z(w61)); //: @(350,751) /sn:0 /w:[ 13 0 0 ] tran g7(.Z(w3), .I(d[7])); //: @(171,147) /sn:0 /R:2 /w:[ 0 2 1 ] /ss:1 //: output g57 (eg) @(1179,371) /sn:0 /w:[ 0 ] or g9 (.I0(w40), .I1(w16), .I2(w21), .I3(w22), .I4(w23), .I5(w24), .I6(w25), .I7(w26), .Z(sup)); //: @(957,137) /sn:0 /w:[ 1 0 0 0 0 0 0 0 1 ] and g53 (.I0(w4), .I1(w36), .Z(w24)); //: @(357,555) /sn:0 /w:[ 11 0 1 ] tran g20(.Z(a5), .I(c[1])); //: @(85,584) /sn:0 /R:2 /w:[ 0 14 13 ] /ss:1 or g15 (.I0(w41), .I1(w27), .I2(w29), .I3(w30), .I4(w31), .I5(w32), .I6(w38), .I7(w61), .Z(inf)); //: @(966,650) /sn:0 /w:[ 1 0 0 0 0 0 1 1 0 ] //: joint g31 (w35) @(490, 234) /w:[ 2 -1 1 12 ] //: joint g71 (w62) @(371, 683) /w:[ 7 -1 8 10 ] comparateur1 g39 (.b(b4), .a(a4), .egal(w52), .bsupa(w53), .asupb(w36)); //: @(210, 540) /sz:(72, 64) /sn:0 /p:[ Li0>1 Li1>1 Ro0<1 Ro1<1 Ro2<1 ] //: joint g67 (w5) @(425, 608) /w:[ 2 -1 4 1 ] and g68 (.I0(w62), .I1(w33), .Z(w26)); //: @(342,721) /sn:0 /w:[ 11 0 1 ] //: joint g43 (w14) @(720, 291) /w:[ 2 -1 4 1 ] //: joint g48 (w15) @(483, 438) /w:[ 5 -1 6 12 ] tran g17(.Z(w20), .I(d[3])); //: @(171,460) /sn:0 /R:2 /w:[ 0 10 9 ] /ss:1 tran g25(.Z(b6), .I(d[0])); //: @(171,697) /sn:0 /R:2 /w:[ 0 16 15 ] /ss:1 and g29 (.I0(w35), .I1(w1), .I2(w14), .I3(w15), .I4(w4), .I5(w5), .I6(w62), .I7(w64), .Z(eg)); //: @(959,357) /sn:0 /w:[ 7 0 3 3 3 3 3 1 1 ] and g62 (.I0(w5), .I1(w37), .Z(w25)); //: @(362,637) /sn:0 /w:[ 11 0 1 ] //: joint g73 (w62) @(431, 684) /w:[ 2 -1 4 1 ] and g42 (.I0(w14), .I1(w46), .Z(w30)); //: @(405,402) /sn:0 /w:[ 13 0 1 ] and g52 (.I0(w15), .I1(w50), .Z(w4)); //: @(338,523) /sn:0 /w:[ 0 0 9 ] //: joint g63 (w5) @(356, 608) /w:[ 7 -1 8 10 ] tran g5(.Z(w43), .I(c[7])); //: @(85,121) /sn:0 /R:2 /w:[ 0 2 1 ] /ss:1 tran g14(.Z(w17), .I(c[3])); //: @(85,434) /sn:0 /R:2 /w:[ 0 10 9 ] /ss:1 and g56 (.I0(w4), .I1(w53), .Z(w32)); //: @(365,582) /sn:0 /w:[ 13 0 1 ] comparateur1 g47 (.b(b5), .a(a5), .egal(w7), .bsupa(w6), .asupb(w37)); //: @(212, 623) /sz:(72, 64) /sn:0 /p:[ Li0>1 Li1>1 Ro0<1 Ro1<1 Ro2<1 ] and g44 (.I0(w14), .I1(w48), .Z(w15)); //: @(430,438) /sn:0 /w:[ 0 0 9 ] tran g24(.Z(a6), .I(c[0])); //: @(85,671) /sn:0 /R:2 /w:[ 0 16 15 ] /ss:1 and g21 (.I0(w1), .I1(w42), .Z(w27)); //: @(410,209) /sn:0 /w:[ 11 1 1 ] and g36 (.I0(w14), .I1(w2), .Z(w22)); //: @(365,365) /sn:0 /w:[ 11 0 1 ] tran g23(.Z(b5), .I(d[1])); //: @(171,611) /sn:0 /R:2 /w:[ 0 14 13 ] /ss:1 //: joint g41 (w14) @(704, 291) /w:[ 5 -1 6 12 ] comparateur1 g60 (.b(b6), .a(a6), .egal(w63), .bsupa(w60), .asupb(w33)); //: @(211, 704) /sz:(72, 89) /sn:0 /p:[ Li0>1 Li1>1 Ro0<1 Ro1<1 Ro2<1 ] //: joint g40 (w14) @(685, 291) /w:[ 7 -1 8 10 ] //: joint g54 (w4) @(377, 523) /w:[ 7 -1 8 10 ] comparateur1 g22 (.b(b2), .a(a2), .egal(w48), .bsupa(w46), .asupb(w2)); //: @(216, 368) /sz:(72, 51) /sn:0 /p:[ Li0>1 Li1>1 Ro0<1 Ro1<1 Ro2<1 ] //: input g0 (c) @(68,76) /sn:0 /w:[ 0 ] //: joint g26 (w1) @(389, 161) /w:[ 3 -1 4 10 ] //: joint g35 (w1) @(440, 161) /w:[ 1 -1 2 12 ] //: joint g45 (w15) @(452, 438) /w:[ 7 -1 8 10 ] and g46 (.I0(w15), .I1(w49), .Z(w23)); //: @(340,463) /sn:0 /w:[ 11 0 1 ] and g70 (.I0(w62), .I1(w63), .Z(w64)); //: @(363,783) /sn:0 /w:[ 0 0 0 ] and g66 (.I0(w5), .I1(w7), .Z(w62)); //: @(347,683) /sn:0 /w:[ 0 0 9 ] tran g12(.Z(a2), .I(c[4])); //: @(85,362) /sn:0 /R:2 /w:[ 0 8 7 ] /ss:1 tran g18(.Z(a4), .I(c[2])); //: @(85,510) /sn:0 /R:2 /w:[ 0 12 11 ] /ss:1 comparateur1 g33 (.b(w20), .a(w17), .egal(w50), .bsupa(w51), .asupb(w49)); //: @(210, 464) /sz:(72, 64) /sn:0 /p:[ Li0>1 Li1>1 Ro0<1 Ro1<1 Ro2<1 ] and g30 (.I0(w35), .I1(w57), .Z(w21)); //: @(519,256) /sn:0 /w:[ 13 0 1 ] and g49 (.I0(w15), .I1(w51), .Z(w31)); //: @(330,493) /sn:0 /w:[ 13 0 1 ] endmodule module multiplication(amul, resmul, bmul); //: interface /sz:(40, 40) /bd:[ ] output [7:0] resmul; //: /sn:0 {0}(215,272)(215,310)(237,310){1} input [7:0] amul; //: /sn:0 {0}(199,243)(199,186)(180,186){1} input [7:0] bmul; //: /sn:0 {0}(214,159)(231,159)(231,243){1} //: enddecls //: input g8 (amul) @(178,186) /sn:0 /w:[ 1 ] mult g1 (.A(amul), .B(bmul), .P(resmul)); //: @(215,259) /sn:0 /w:[ 0 1 0 ] //: output g10 (resmul) @(234,310) /sn:0 /w:[ 1 ] //: input g9 (bmul) @(212,159) /sn:0 /w:[ 0 ] endmodule module comparateur1(a, bsupa, b, asupb, egal); //: interface /sz:(40, 40) /bd:[ ] input b; //: /sn:0 {0}(115,320)(278,320){1} //: {2}(282,320)(349,320)(349,252)(388,252){3} //: {4}(392,252)(463,252){5} //: {6}(390,254)(390,438)(464,438){7} //: {8}(280,322)(280,352)(330,352){9} output egal; //: /sn:0 /dp:1 {0}(554,405)(663,405){1} output asupb; //: /sn:0 /dp:1 {0}(487,134)(619,134){1} output bsupa; //: /sn:0 {0}(484,250)(679,250){1} input a; //: /sn:0 {0}(117,130)(215,130)(215,131)(227,131){1} //: {2}(231,131)(257,131){3} //: {4}(261,131)(466,131){5} //: {6}(259,133)(259,173)(322,173){7} //: {8}(229,133)(229,443)(464,443){9} wire w7; //: /sn:0 {0}(466,136)(365,136)(365,352)(359,352){1} //: {2}(355,352)(346,352){3} //: {4}(357,354)(357,378)(463,378){5} wire w3; //: /sn:0 {0}(484,376)(497,376)(497,402)(533,402){1} wire w1; //: /sn:0 {0}(338,173)(438,173)(438,288){1} //: {2}(440,290)(443,290)(443,373)(463,373){3} //: {4}(438,292)(438,302)(453,302)(453,247)(463,247){5} wire w2; //: /sn:0 {0}(533,407)(495,407)(495,441)(485,441){1} //: enddecls and g4 (.I0(a), .I1(w7), .Z(asupb)); //: @(477,134) /sn:0 /w:[ 5 0 0 ] and g8 (.I0(w1), .I1(w7), .Z(w3)); //: @(474,376) /sn:0 /w:[ 3 5 0 ] //: joint g3 (a) @(229, 131) /w:[ 2 -1 1 8 ] //: joint g13 (b) @(280, 320) /w:[ 2 -1 1 8 ] //: input g2 (a) @(115,130) /sn:0 /w:[ 0 ] not g1 (.I(b), .Z(w7)); //: @(336,352) /sn:0 /w:[ 9 3 ] and g11 (.I0(b), .I1(a), .Z(w2)); //: @(475,441) /sn:0 /w:[ 7 9 1 ] //: output g16 (bsupa) @(676,250) /sn:0 /w:[ 1 ] //: joint g10 (w7) @(357, 352) /w:[ 1 -1 2 4 ] //: joint g6 (a) @(259, 131) /w:[ 4 -1 3 6 ] //: joint g9 (w1) @(438, 290) /w:[ 2 1 -1 4 ] //: input g7 (b) @(113,320) /sn:0 /w:[ 0 ] //: output g15 (asupb) @(616,134) /sn:0 /w:[ 1 ] //: output g17 (egal) @(660,405) /sn:0 /w:[ 1 ] and g5 (.I0(w1), .I1(b), .Z(bsupa)); //: @(474,250) /sn:0 /w:[ 5 5 0 ] or g14 (.I0(w3), .I1(w2), .Z(egal)); //: @(544,405) /sn:0 /w:[ 1 0 0 ] not g0 (.I(a), .Z(w1)); //: @(328,173) /sn:0 /w:[ 7 0 ] //: joint g12 (b) @(390, 252) /w:[ 4 -1 3 6 ] endmodule module convertisseur(fin, bit); //: interface /sz:(40, 40) /bd:[ ] input bit; //: /sn:0 {0}(272,187)(235,187)(235,183)(225,183){1} //: {2}(221,183)(201,183){3} //: {4}(199,181)(199,171)(214,171)(214,309)(249,309){5} //: {6}(197,183)(146,183){7} //: {8}(142,183)(104,183){9} //: {10}(102,181)(102,171)(117,171)(117,329)(249,329){11} //: {12}(100,183)(91,183){13} //: {14}(87,183)(77,183)(77,359)(249,359){15} //: {16}(89,185)(89,349)(249,349){17} //: {18}(102,185)(102,339)(249,339){19} //: {20}(144,185)(144,319)(249,319){21} //: {22}(199,185)(199,299)(249,299){23} //: {24}(223,185)(223,289)(249,289){25} output [7:0] fin; //: /sn:0 {0}(255,324)(331,324)(331,511)(361,511){1} //: enddecls //: joint g4 (bit) @(102, 183) /w:[ 9 10 12 18 ] //: joint g3 (bit) @(89, 183) /w:[ 13 -1 14 16 ] concat g2 (.I0(bit), .I1(bit), .I2(bit), .I3(bit), .I4(bit), .I5(bit), .I6(bit), .I7(bit), .Z(fin)); //: @(254,324) /sn:0 /w:[ 15 17 19 11 21 5 23 25 0 ] /dr:0 //: output g1 (fin) @(358,511) /sn:0 /w:[ 1 ] //: joint g6 (bit) @(199, 183) /w:[ 3 4 6 22 ] //: joint g7 (bit) @(223, 183) /w:[ 1 -1 2 24 ] //: joint g5 (bit) @(144, 183) /w:[ 7 -1 8 20 ] //: input g0 (bit) @(274,187) /sn:0 /R:2 /w:[ 0 ] endmodule module ual(op, nbb, resultat, nba); //: interface /sz:(40, 40) /bd:[ ] output [7:0] resultat; //: /sn:0 /dp:1 {0}(883,723)(915,723)(915,700){1} //: {2}(917,698)(927,698)(927,695)(947,695){3} //: {4}(949,693)(949,609)(995,609){5} //: {6}(949,697)(949,785)(897,785){7} //: {8}(915,696)(915,686)(900,686)(900,751)(889,751){9} //: {10}(913,698)(875,698){11} input [7:0] nba; //: /sn:0 {0}(93,531)(120,531)(120,669){1} //: {2}(122,671)(360,671){3} //: {4}(120,673)(120,678)(119,678)(119,733){5} //: {6}(121,735)(325,735){7} //: {8}(119,737)(119,806){9} //: {10}(121,808)(333,808){11} //: {12}(119,810)(119,896)(401,896){13} input [7:0] nbb; //: /sn:0 {0}(192,533)(198,533)(198,693)(208,693){1} //: {2}(210,691)(210,689)(383,689){3} //: {4}(210,695)(210,756){5} //: {6}(212,758)(348,758){7} //: {8}(210,760)(210,830){9} //: {10}(212,832)(355,832){11} //: {12}(210,834)(210,919)(419,919){13} input [2:0] op; //: /sn:0 {0}(786,453)(827,453)(827,540)(788,540){1} wire [7:0] w16; //: /sn:0 {0}(510,832)(371,832){1} wire w14; //: /sn:0 {0}(477,581)(477,540)(661,540){1} //: {2}(665,540)(742,540){3} //: {4}(746,540)(782,540){5} //: {6}(744,542)(744,546)(770,546)(770,561)(760,561){7} //: {8}(663,542)(663,607)(681,607)(681,613){9} wire w15; //: /sn:0 {0}(676,613)(676,593)(650,593)(650,579){1} wire w19; //: /sn:0 {0}(482,622)(482,610)(496,610)(496,600){1} wire [7:0] w38; //: /sn:0 {0}(859,698)(648,698)(648,677)(583,677){1} wire [7:0] w21; //: /sn:0 {0}(376,671)(541,671){1} wire w20; //: /sn:0 {0}(563,585)(563,598)(566,598)(566,610){1} wire w24; //: /sn:0 {0}(333,730)(333,707)(354,707){1} //: {2}(358,707)(571,707)(571,643){3} //: {4}(573,641)(875,641)(875,718){5} //: {6}(571,639)(571,631){7} //: {8}(356,709)(356,753){9} wire [7:0] w36; //: /sn:0 {0}(399,689)(471,689)(471,688)(541,688){1} wire [7:0] w41; //: /sn:0 {0}(873,751)(723,751)(723,818)(552,818){1} wire [7:0] w23; //: /sn:0 {0}(542,919)(435,919){1} wire w1; //: /sn:0 {0}(686,613)(686,600)(692,600)(692,573)(688,573){1} wire [7:0] w25; //: /sn:0 {0}(534,754)(498,754)(498,758)(364,758){1} wire [7:0] w8; //: /sn:0 {0}(417,896)(542,896){1} wire w30; //: /sn:0 {0}(341,803)(341,774)(361,774){1} //: {2}(365,774)(681,774)(681,678){3} //: {4}(683,676)(881,676)(881,746){5} //: {6}(681,674)(681,634){7} //: {8}(363,776)(363,827){9} wire [7:0] w22; //: /sn:0 {0}(534,738)(499,738)(499,735)(341,735){1} wire w12; //: /sn:0 {0}(496,584)(496,550)(568,550){1} //: {2}(572,550)(597,550){3} //: {4}(601,550)(648,550){5} //: {6}(652,550)(730,550)(730,550)(755,550){7} //: {8}(759,550)(782,550){9} //: {10}(757,552)(757,596)(750,596)(750,600){11} //: {12}(650,552)(650,563){13} //: {14}(599,552)(599,599)(576,599)(576,610){15} //: {16}(570,552)(570,564)(577,564)(577,585)(571,585)(571,610){17} wire w11; //: /sn:0 {0}(472,622)(472,610)(464,610)(464,530)(560,530){1} //: {2}(564,530)(620,530)(620,530)(683,530){3} //: {4}(687,530)(725,530){5} //: {6}(729,530)(782,530){7} //: {8}(727,532)(727,586)(755,586)(755,600){9} //: {10}(685,532)(685,562)(670,562)(670,573)(672,573){11} //: {12}(562,532)(562,542)(563,542)(563,569){13} wire [7:0] w44; //: /sn:0 {0}(881,785)(767,785)(767,909)(590,909){1} wire w10; //: /sn:0 {0}(427,914)(427,846){1} //: {2}(429,844)(750,844)(750,777){3} //: {4}(752,775)(889,775)(889,780){5} //: {6}(750,773)(750,621){7} //: {8}(425,844)(409,844)(409,891){9} wire w13; //: /sn:0 {0}(745,600)(745,577)(734,577)(734,561)(744,561){1} wire w33; //: /sn:0 {0}(477,622)(477,597){1} wire [7:0] w29; //: /sn:0 {0}(867,723)(835,723)(835,711)(652,711)(652,744)(586,744){1} wire w39; //: /sn:0 {0}(867,693)(867,649)(479,649){1} //: {2}(477,647)(477,643){3} //: {4}(477,651)(477,654)(385,654){5} //: {6}(381,654)(368,654)(368,666){7} //: {8}(383,656)(383,670)(391,670)(391,684){9} wire [7:0] w26; //: /sn:0 {0}(349,808)(510,808){1} //: enddecls and g61 (.I0(w12), .I1(w12), .I2(w20), .Z(w24)); //: @(571,621) /sn:0 /R:3 /w:[ 15 17 1 7 ] //: input g4 (op) @(784,453) /sn:0 /w:[ 0 ] soustract g51 (.bsous(w25), .asous(w22), .ressous(w29)); //: @(535, 727) /sz:(50, 40) /sn:0 /p:[ Li0>0 Li1>0 Ro0<1 ] bufif1 g34 (.Z(w16), .I(nbb), .E(w30)); //: @(361,832) /sn:0 /w:[ 1 11 9 ] multiplication g55 (.bmul(w36), .amul(w21), .resmul(w38)); //: @(542, 658) /sz:(40, 40) /sn:0 /p:[ Li0>1 Li1>1 Ro0<1 ] //: joint g3 (nbb) @(210, 693) /w:[ -1 2 1 4 ] bufif1 g65 (.Z(resultat), .I(w29), .E(w24)); //: @(873,723) /sn:0 /w:[ 0 0 5 ] //: input g2 (nbb) @(190,533) /sn:0 /w:[ 0 ] //: joint g72 (w24) @(571, 641) /w:[ 4 6 -1 3 ] //: joint g1 (nba) @(120, 671) /w:[ 2 1 -1 4 ] //: comment g64 /dolink:0 /link:"" @(495,624) /sn:0 /R:3 //: /line:"mul" //: /end and g16 (.I0(w1), .I1(w14), .I2(w15), .Z(w30)); //: @(681,624) /sn:0 /R:3 /w:[ 0 9 0 7 ] bufif1 g28 (.Z(w21), .I(nba), .E(w39)); //: @(366,671) /sn:0 /w:[ 0 3 7 ] //: joint g50 (w39) @(477, 649) /w:[ 1 2 -1 4 ] concat g19 (.I0(w12), .I1(w14), .I2(w11), .Z(op)); //: @(787,540) /sn:0 /w:[ 9 5 7 1 ] /dr:0 bufif1 g32 (.Z(w25), .I(nbb), .E(w24)); //: @(354,758) /sn:0 /w:[ 1 7 9 ] not g27 (.I(w12), .Z(w19)); //: @(496,590) /sn:0 /R:3 /w:[ 0 1 ] addition g38 (.badd(w16), .aadd(w26), .resadd(w41)); //: @(511, 798) /sz:(40, 42) /sn:0 /p:[ Li0>0 Li1>1 Ro0<1 ] //: joint g6 (resultat) @(949, 695) /w:[ -1 4 3 6 ] //: joint g53 (nba) @(119, 808) /w:[ 10 9 -1 12 ] //: joint g57 (w14) @(663, 540) /w:[ 2 -1 1 8 ] and g15 (.I0(w11), .I1(w12), .I2(w13), .Z(w10)); //: @(750,611) /sn:0 /R:3 /w:[ 9 11 0 7 ] //: joint g20 (w12) @(650, 550) /w:[ 6 -1 5 12 ] bufif1 g31 (.Z(w22), .I(nba), .E(w24)); //: @(331,735) /sn:0 /w:[ 1 7 0 ] //: joint g39 (w10) @(427, 844) /w:[ 2 -1 8 1 ] bufif1 g67 (.Z(resultat), .I(w41), .E(w30)); //: @(879,751) /sn:0 /w:[ 9 0 5 ] bufif1 g68 (.Z(resultat), .I(w44), .E(w10)); //: @(887,785) /sn:0 /w:[ 7 0 5 ] //: joint g43 (nbb) @(210, 758) /w:[ 6 5 -1 8 ] //: joint g17 (w12) @(757, 550) /w:[ 8 -1 7 10 ] bufif1 g25 (.Z(w26), .I(nba), .E(w30)); //: @(339,808) /sn:0 /w:[ 0 11 0 ] //: joint g29 (w12) @(570, 550) /w:[ 2 -1 1 16 ] not g62 (.I(w11), .Z(w1)); //: @(678,573) /sn:0 /w:[ 11 1 ] //: joint g73 (w30) @(681, 676) /w:[ 4 6 -1 3 ] //: joint g42 (nbb) @(210, 832) /w:[ 10 9 -1 12 ] //: comment g52 /dolink:0 /link:"" @(583,622) /sn:0 /R:3 //: /line:"sous" //: /end //: joint g63 (w24) @(356, 707) /w:[ 2 -1 1 8 ] //: joint g74 (w10) @(750, 775) /w:[ 4 6 -1 3 ] bufif1 g14 (.Z(w8), .I(nba), .E(w10)); //: @(407,896) /sn:0 /w:[ 0 13 9 ] not g56 (.I(w14), .Z(w33)); //: @(477,587) /sn:0 /R:3 /w:[ 0 1 ] //: output g5 (resultat) @(992,609) /sn:0 /w:[ 5 ] //: joint g44 (nba) @(119, 735) /w:[ 6 5 -1 8 ] bufif1 g47 (.Z(resultat), .I(w38), .E(w39)); //: @(865,698) /sn:0 /w:[ 11 0 0 ] //: joint g21 (w11) @(685, 530) /w:[ 4 -1 3 10 ] //: joint g24 (w14) @(744, 540) /w:[ 4 -1 3 6 ] //: comment g36 /dolink:0 /link:"" @(696,610) /sn:0 /R:3 //: /line:"add" //: /end not g23 (.I(w11), .Z(w20)); //: @(563,575) /sn:0 /R:3 /w:[ 13 0 ] //: comment g41 /dolink:0 /link:"" @(778,602) /sn:0 /R:3 //: /line:"div" //: /end //: joint g40 (w11) @(562, 530) /w:[ 2 -1 1 12 ] //: joint g54 (w30) @(363, 774) /w:[ 2 -1 1 8 ] bufif1 g22 (.Z(w23), .I(nbb), .E(w10)); //: @(425,919) /sn:0 /w:[ 1 13 0 ] not g26 (.I(w14), .Z(w13)); //: @(754,561) /sn:0 /R:2 /w:[ 7 1 ] and g35 (.I0(w19), .I1(w33), .I2(w11), .Z(w39)); //: @(477,633) /sn:0 /R:3 /w:[ 0 0 0 3 ] bufif1 g46 (.Z(w36), .I(nbb), .E(w39)); //: @(389,689) /sn:0 /w:[ 0 3 9 ] //: joint g70 (resultat) @(915, 698) /w:[ 2 8 10 1 ] //: input g0 (nba) @(91,531) /sn:0 /w:[ 0 ] division g66 (.bdiv(w23), .adiv(w8), .resdiv(w44)); //: @(543, 890) /sz:(46, 43) /sn:0 /p:[ Li0>0 Li1>1 Ro0<1 ] //: joint g18 (w11) @(727, 530) /w:[ 6 -1 5 8 ] not g30 (.I(w12), .Z(w15)); //: @(650,569) /sn:0 /R:3 /w:[ 13 1 ] //: joint g33 (w39) @(383, 654) /w:[ 5 -1 6 8 ] //: joint g49 (w12) @(599, 550) /w:[ 4 -1 3 14 ] endmodule module division(adiv, resdiv, bdiv); //: interface /sz:(40, 40) /bd:[ ] output [7:0] resdiv; //: /sn:0 {0}(303,294)(258,294)(258,268){1} input [7:0] bdiv; //: /sn:0 {0}(251,177)(264,177)(264,239){1} input [7:0] adiv; //: /sn:0 {0}(222,203)(232,203)(232,239){1} wire [7:0] w0; //: /sn:0 {0}(197,304)(197,337)(238,337)(238,268){1} //: enddecls led g13 (.I(w0)); //: @(197,297) /sn:0 /w:[ 0 ] /type:3 div g2 (.A(adiv), .B(bdiv), .Q(resdiv), .R(w0)); //: @(248,255) /sn:0 /w:[ 1 1 1 1 ] //: input g11 (adiv) @(220,203) /sn:0 /w:[ 0 ] //: output g14 (resdiv) @(300,294) /sn:0 /w:[ 0 ] //: input g12 (bdiv) @(249,177) /sn:0 /w:[ 0 ] endmodule module main; //: root_module supply0 w0; //: /sn:0 {0}(48,160)(48,201){1} supply0 w35; //: /sn:0 {0}(-6,177)(-6,167)(-21,167)(-21,225)(-70,225){1} //: {2}(-72,223)(-72,186)(-75,186)(-75,180){3} //: {4}(-74,225)(-82,225){5} //: {6}(-84,223)(-84,185)(-85,185)(-85,180){7} //: {8}(-86,225)(-89,225)(-89,219)(-93,219){9} //: {10}(-95,217)(-95,180){11} //: {12}(-97,219)(-107,219){13} //: {14}(-109,217)(-109,183)(-105,183)(-105,180){15} //: {16}(-111,219)(-115,219)(-115,180){17} wire w6; //: /sn:0 {0}(-231,160)(-231,133)(-166,133)(-166,128){1} wire w7; //: /sn:0 {0}(195,177)(230,177)(230,138){1} wire w16; //: /sn:0 {0}(117,269)(140,269){1} wire w14; //: /sn:0 {0}(-231,176)(-231,204)(-231,204)(-231,226){1} //: {2}(-229,228)(-144,228){3} //: {4}(-140,228)(82,228)(82,264)(96,264){5} //: {6}(-142,230)(-142,607)(-118,607){7} //: {8}(-233,228)(-272,228){9} wire w15; //: /sn:0 {0}(96,269)(75,269)(75,238)(-148,238){1} //: {2}(-152,238)(-209,238){3} //: {4}(-211,236)(-211,180){5} //: {6}(-213,238)(-272,238){7} //: {8}(-150,240)(-150,617)(-118,617){9} wire w19; //: /sn:0 /dp:1 {0}(-161,128)(-161,144)(-211,144)(-211,164){1} wire [7:0] w4; //: /sn:0 {0}(222,133)(113,133){1} //: {2}(111,131)(111,68){3} //: {4}(109,133)(72,133){5} wire [7:0] w3; //: /sn:0 /dp:1 {0}(37,133)(-80,133)(-80,174){1} wire w21; //: /sn:0 {0}(-272,278)(-67,278){1} //: {2}(-63,278)(-40,278)(-40,370)(-37,370){3} //: {4}(-65,276)(-65,180){5} wire [2:0] w28; //: /sn:0 {0}(-112,617)(185,617)(185,616)(193,616){1} wire [7:0] w20; //: /sn:0 {0}(-278,263)(-315,263)(-315,168){1} wire w24; //: /sn:0 /dp:1 {0}(-99,336)(-124,336)(-124,258)(-272,258){1} wire [1:0] w23; //: /sn:0 {0}(-31,375)(36,375)(36,371)(50,371){1} //: {2}(54,371)(107,371){3} //: {4}(52,369)(52,316)(42,316){5} wire [7:0] w1; //: /sn:0 {0}(193,589)(153,589)(153,463)(259,463)(259,401){1} //: {2}(259,397)(259,358)(429,358)(429,327)(419,327){3} //: {4}(257,399)(249,399){5} wire [1:0] w25; //: /sn:0 {0}(-93,341)(5,341)(5,339)(59,339){1} //: {2}(63,339)(107,339){3} //: {4}(61,337)(61,289)(44,289){5} wire w18; //: /sn:0 {0}(-272,298)(-45,298)(-45,180){1} wire [7:0] w8; //: /sn:0 {0}(289,612)(436,612)(436,584){1} wire w22; //: /sn:0 {0}(156,269)(172,269)(172,312){1} wire w2; //: /sn:0 {0}(-272,248)(-199,248){1} //: {2}(-195,248)(-156,248)(-156,249){3} //: {4}(-154,251)(70,251)(70,274)(96,274){5} //: {6}(-156,253)(-156,627)(-118,627){7} //: {8}(-197,246)(-197,150)(-156,150)(-156,128){9} wire w11; //: /sn:0 {0}(-115,63)(53,63){1} //: {2}(55,61)(55,60)(81,60){3} //: {4}(85,60)(106,60){5} //: {6}(83,62)(83,177)(179,177){7} //: {8}(55,65)(55,82){9} //: {10}(53,84)(4,84)(4,107){11} //: {12}(55,86)(55,110){13} wire w12; //: /sn:0 /dp:1 {0}(-272,288)(-58,288){1} //: {2}(-54,288)(-49,288)(-49,380)(-37,380){3} //: {4}(-56,286)(-56,276)(-55,276)(-55,180){5} wire w10; //: /sn:0 /dp:1 {0}(-99,346)(-132,346)(-132,268)(-272,268){1} wire [7:0] w13; //: /sn:0 {0}(193,550)(176,550)(176,483)(306,483)(306,375){1} //: {2}(306,371)(306,322)(308,322)(308,274){3} //: {4}(310,272)(342,272)(342,133)(238,133){5} //: {6}(306,272)(282,272)(282,245)(266,245){7} //: {8}(304,373)(249,373){9} wire [7:0] w5; //: /sn:0 {0}(107,405)(54,405)(54,427)(84,427){1} //: {2}(88,427)(128,427)(128,1)(111,1)(111,52){3} //: {4}(86,429)(86,480){5} wire w9; //: /sn:0 {0}(4,123)(4,182)(62,182)(62,160){1} wire w26; //: /sn:0 {0}(-161,107)(-161,63)(-131,63){1} //: enddecls //: joint g4 (w11) @(55, 63) /w:[ -1 2 1 8 ] bufif1 g8 (.Z(w4), .I(w13), .E(w7)); //: @(232,133) /sn:0 /R:2 /w:[ 0 5 1 ] not g13 (.I(w11), .Z(w7)); //: @(185,177) /sn:0 /w:[ 7 0 ] led g3 (.I(w13)); //: @(259,245) /sn:0 /R:1 /w:[ 7 ] /type:3 //: joint g34 (w1) @(259, 399) /w:[ -1 2 4 1 ] //: joint g37 (w25) @(61, 339) /w:[ 2 4 1 -1 ] //: joint g2 (w11) @(55, 84) /w:[ -1 9 10 12 ] //: supply0 g1 (w0) @(48,207) /sn:0 /w:[ 1 ] led g11 (.I(w5)); //: @(86,487) /sn:0 /R:2 /w:[ 5 ] /type:3 //: dip g16 (w20) @(-315,158) /sn:0 /w:[ 1 ] /st:43 and g10 (.I0(w6), .I1(w19), .I2(w2), .Z(w26)); //: @(-161,117) /sn:0 /R:1 /w:[ 1 0 9 0 ] //: joint g28 (w35) @(-84, 225) /w:[ 5 6 8 -1 ] concat g19 (.I0(w10), .I1(w24), .Z(w25)); //: @(-94,341) /sn:0 /w:[ 0 0 0 ] /dr:0 //: joint g27 (w35) @(-72, 225) /w:[ 1 2 4 -1 ] //: joint g32 (w13) @(306, 373) /w:[ -1 2 8 1 ] not g6 (.I(w26), .Z(w11)); //: @(-125,63) /sn:0 /w:[ 1 0 ] //: joint g38 (w23) @(52, 371) /w:[ 2 4 1 -1 ] //: joint g7 (w4) @(111, 133) /w:[ 1 2 4 -1 ] //: joint g9 (w11) @(83, 60) /w:[ 4 -1 3 6 ] reg g15 (.rw(w22), .donnee(w5), .registre2(w23), .registre1(w25), .donreg2(w1), .donreg1(w13)); //: @(108, 313) /sz:(140, 113) /sn:0 /p:[ Ti0>1 Li0>0 Li1>3 Li2>3 Ro0<5 Ro1<9 ] concat g20 (.I0(w12), .I1(w21), .Z(w23)); //: @(-32,375) /sn:0 /w:[ 3 3 0 ] /dr:0 //: joint g31 (w5) @(86, 427) /w:[ 2 -1 1 4 ] //: joint g39 (w14) @(-142, 228) /w:[ 4 -1 3 6 ] not g48 (.I(w15), .Z(w19)); //: @(-211,174) /sn:0 /R:1 /w:[ 5 1 ] //: joint g43 (w13) @(308, 272) /w:[ 4 -1 6 3 ] concat g17 (.I0(w18), .I1(w12), .I2(w21), .I3(w10), .I4(w24), .I5(w2), .I6(w15), .I7(w14), .Z(w20)); //: @(-277,263) /sn:0 /R:2 /w:[ 0 0 0 1 1 0 7 9 0 ] /dr:1 concat g25 (.I0(w18), .I1(w12), .I2(w21), .I3(w35), .I4(w35), .I5(w35), .I6(w35), .I7(w35), .Z(w3)); //: @(-80,175) /sn:0 /R:1 /w:[ 1 5 5 3 7 11 15 17 1 ] /dr:0 //: joint g29 (w35) @(-95, 219) /w:[ 9 10 12 -1 ] not g42 (.I(w16), .Z(w22)); //: @(146,269) /sn:0 /w:[ 1 0 ] bufif1 g5 (.Z(w5), .I(w4), .E(w11)); //: @(111,62) /sn:0 /R:1 /w:[ 3 3 5 ] ual g14 (.op(w28), .nbb(w1), .nba(w13), .resultat(w8)); //: @(194, 522) /sz:(94, 112) /sn:0 /p:[ Li0>1 Li1>0 Li2>0 Ro0<0 ] //: joint g44 (w2) @(-197, 248) /w:[ 2 8 1 -1 ] not g47 (.I(w14), .Z(w6)); //: @(-231,170) /sn:0 /R:1 /w:[ 0 0 ] led g21 (.I(w8)); //: @(436,577) /sn:0 /w:[ 1 ] /type:3 //: joint g24 (w21) @(-65, 278) /w:[ 2 4 1 -1 ] led g36 (.I(w25)); //: @(37,289) /sn:0 /R:1 /w:[ 5 ] /type:1 //: joint g41 (w2) @(-156, 251) /w:[ 4 3 -1 6 ] //: joint g23 (w12) @(-56, 288) /w:[ 2 4 1 -1 ] //: joint g40 (w15) @(-150, 238) /w:[ 1 -1 2 8 ] //: joint g46 (w14) @(-231, 228) /w:[ 2 1 8 -1 ] //: joint g45 (w15) @(-211, 238) /w:[ 3 4 6 -1 ] or g22 (.I0(w14), .I1(w15), .I2(w2), .Z(w16)); //: @(107,269) /sn:0 /w:[ 5 0 5 0 ] ram g0 (.A(w3), .D(w4), .WE(w11), .OE(w9), .CS(w0)); //: @(55,134) /sn:0 /w:[ 0 5 13 1 0 ] //: supply0 g26 (w35) @(-6,183) /sn:0 /w:[ 0 ] led g35 (.I(w23)); //: @(35,316) /sn:0 /R:1 /w:[ 5 ] /type:1 not g12 (.I(w11), .Z(w9)); //: @(4,113) /sn:0 /R:3 /w:[ 11 0 ] concat g18 (.I0(w2), .I1(w15), .I2(w14), .Z(w28)); //: @(-113,617) /sn:0 /w:[ 7 9 7 0 ] /dr:0 //: joint g30 (w35) @(-109, 219) /w:[ 13 14 16 -1 ] led g33 (.I(w1)); //: @(412,327) /sn:0 /R:1 /w:[ 3 ] /type:3 endmodule module reg(donnee, registre2, registre1, donreg2, rw, donreg1); //: interface /sz:(40, 40) /bd:[ ] input [1:0] registre1; //: /sn:0 {0}(768,451)(914,451)(914,418)(870,418)(870,364){1} //: {2}(872,362)(887,362)(887,262)(877,262){3} //: {4}(868,362)(497,362)(497,522)(516,522){5} supply1 w1; //: /sn:0 {0}(787,371)(787,383)(753,383){1} //: {2}(751,381)(751,316){3} //: {4}(751,312)(751,260)(751,260)(751,239){5} //: {6}(751,235)(751,159)(256,159){7} //: {8}(749,237)(739,237)(739,238)(373,238){9} //: {10}(749,314)(501,314){11} //: {12}(749,383)(737,383)(737,384)(648,384){13} output [7:0] donreg2; //: /sn:0 /dp:1 {0}(614,539)(614,545){1} //: {2}(616,547)(626,547)(626,523)(641,523){3} //: {4}(614,549)(614,567)(539,567)(539,535){5} input rw; //: /sn:0 {0}(864,284)(864,287)(925,287){1} //: {2}(929,287)(930,287)(930,241)(893,241)(893,97)(684,97)(684,24){3} //: {4}(927,289)(927,327)(919,327){5} input [1:0] registre2; //: /sn:0 /dp:1 {0}(240,519)(114,519){1} input [7:0] donnee; //: /sn:0 {0}(746,63)(756,63)(756,48)(732,48)(732,19)(692,19){1} output [7:0] donreg1; //: /sn:0 {0}(263,532)(263,548)(328,548)(328,519)(345,519){1} wire w6; //: /sn:0 {0}(171,429)(158,429)(158,391){1} //: {2}(160,389)(572,389){3} //: {4}(158,387)(158,321){5} //: {6}(160,319)(425,319){7} //: {8}(158,317)(158,245){9} //: {10}(160,243)(297,243){11} //: {12}(158,241)(158,164)(180,164){13} wire w7; //: /sn:0 {0}(373,248)(764,248)(764,256)(774,256){1} wire w14; //: /sn:0 {0}(750,280)(658,280)(658,394)(648,394){1} wire [7:0] w15; //: /sn:0 {0}(609,400)(609,489)(559,489){1} //: {2}(555,489)(281,489)(281,503){3} //: {4}(557,491)(557,506){5} wire w3; //: /sn:0 {0}(790,256)(848,256){1} wire [7:0] w0; //: /sn:0 {0}(334,233)(334,42)(340,42)(340,20)(335,20){1} //: {2}(333,18)(333,8)(348,8)(348,20)(460,20){3} //: {4}(464,20)(606,20){5} //: {6}(610,20)(620,20)(620,19)(676,19){7} //: {8}(608,22)(608,34)(609,34)(609,379){9} //: {10}(462,22)(462,309){11} //: {12}(333,22)(333,32)(217,32)(217,154){13} wire w8; //: /sn:0 {0}(784,244)(769,244)(769,169)(256,169){1} wire [7:0] w17; //: /sn:0 {0}(245,503)(245,460){1} //: {2}(247,458)(521,458)(521,506){3} //: {4}(243,458)(217,458)(217,175){5} wire w12; //: /sn:0 {0}(766,280)(848,280){1} wire w2; //: /sn:0 {0}(800,244)(848,244){1} wire [7:0] w10; //: /sn:0 /dp:1 {0}(269,503)(269,483)(460,483){1} //: {2}(464,483)(545,483)(545,506){3} //: {4}(462,481)(462,330){5} wire w13; //: /sn:0 {0}(761,268)(511,268)(511,324)(501,324){1} wire [7:0] w5; //: /sn:0 /dp:1 {0}(257,503)(257,468)(336,468){1} //: {2}(340,468)(533,468)(533,506){3} //: {4}(338,466)(338,359)(334,359)(334,254){5} wire w9; //: /sn:0 {0}(777,268)(848,268){1} //: enddecls //: input g8 (donnee) @(744,63) /sn:0 /w:[ 0 ] //: joint g4 (w0) @(333, 20) /w:[ 1 2 -1 12 ] //: supply1 g13 (w1) @(798,371) /sn:0 /w:[ 0 ] //: input g34 (registre2) @(112,519) /sn:0 /w:[ 1 ] register g3 (.Q(w15), .D(w0), .EN(w14), .CLR(w1), .CK(w6)); //: @(609,389) /sn:0 /w:[ 0 9 1 13 3 ] register g2 (.Q(w10), .D(w0), .EN(w13), .CLR(w1), .CK(w6)); //: @(462,319) /sn:0 /w:[ 5 11 1 11 7 ] register g1 (.Q(w5), .D(w0), .EN(w7), .CLR(w1), .CK(w6)); //: @(334,243) /sn:0 /w:[ 5 0 0 9 11 ] //: joint g16 (w1) @(751, 383) /w:[ 1 2 12 -1 ] //: joint g11 (w6) @(158, 389) /w:[ 2 4 -1 1 ] //: joint g28 (w5) @(338, 468) /w:[ 2 4 1 -1 ] //: joint g10 (w6) @(158, 319) /w:[ 6 8 -1 5 ] //: joint g27 (w10) @(462, 483) /w:[ 2 4 1 -1 ] //: input g32 (registre1) @(766,451) /sn:0 /w:[ 0 ] demux g19 (.I(registre1), .E(rw), .Z0(w2), .Z1(w3), .Z2(w9), .Z3(w12)); //: @(864,262) /sn:0 /R:3 /w:[ 3 0 1 1 1 1 ] bufif1 g6 (.Z(w0), .I(donnee), .E(rw)); //: @(686,19) /sn:0 /R:2 /w:[ 7 1 3 ] //: joint g7 (w0) @(608, 20) /w:[ 6 -1 5 8 ] //: joint g9 (w6) @(158, 243) /w:[ 10 12 -1 9 ] //: output g31 (donreg2) @(638,523) /sn:0 /w:[ 3 ] //: joint g15 (w1) @(751, 237) /w:[ -1 6 8 5 ] not g20 (.I(w9), .Z(w13)); //: @(771,268) /sn:0 /R:2 /w:[ 0 0 ] //: joint g29 (w17) @(245, 458) /w:[ 2 -1 4 1 ] not g17 (.I(w2), .Z(w8)); //: @(794,244) /sn:0 /R:2 /w:[ 0 0 ] mux g25 (.I0(w17), .I1(w5), .I2(w10), .I3(w15), .S(registre1), .Z(donreg2)); //: @(539,522) /sn:0 /w:[ 3 3 3 5 5 5 ] //: joint g5 (w0) @(462, 20) /w:[ 4 -1 3 10 ] //: joint g14 (w1) @(751, 314) /w:[ -1 4 10 3 ] not g21 (.I(w12), .Z(w14)); //: @(760,280) /sn:0 /R:2 /w:[ 0 0 ] mux g24 (.I0(w17), .I1(w5), .I2(w10), .I3(w15), .S(registre2), .Z(donreg1)); //: @(263,519) /sn:0 /w:[ 0 0 0 3 0 0 ] //: input g23 (rw) @(917,327) /sn:0 /w:[ 5 ] //: joint g26 (w15) @(557, 489) /w:[ 1 -1 2 4 ] //: joint g35 (donreg2) @(614, 547) /w:[ 2 1 -1 4 ] register g0 (.Q(w17), .D(w0), .EN(w8), .CLR(w1), .CK(w6)); //: @(217,164) /sn:0 /w:[ 5 13 1 7 13 ] //: joint g22 (rw) @(927, 287) /w:[ 2 -1 1 4 ] clock g12 (.Z(w6)); //: @(184,430) /sn:0 /R:2 /w:[ 0 ] /omega:100 /phi:0 /duty:50 not g18 (.I(w3), .Z(w7)); //: @(784,256) /sn:0 /R:2 /w:[ 0 1 ] //: output g30 (donreg1) @(342,519) /sn:0 /w:[ 1 ] //: joint g33 (registre1) @(870, 362) /w:[ 2 -1 4 1 ] endmodule module addition(badd, resadd, aadd); //: interface /sz:(40, 40) /bd:[ ] output [7:0] resadd; //: /sn:0 {0}(195,213)(195,279)(211,279){1} input [7:0] badd; //: /sn:0 {0}(211,184)(211,97)(161,97){1} supply0 w12; //: /sn:0 {0}(247,211)(247,198)(219,198){1} input [7:0] aadd; //: /sn:0 {0}(161,123)(179,123)(179,184){1} wire w3; //: /sn:0 {0}(89,190)(89,198)(171,198){1} //: enddecls led g4 (.I(w3)); //: @(89,183) /sn:0 /w:[ 0 ] /type:0 //: supply0 g3 (w12) @(247,217) /sn:0 /w:[ 0 ] //: input g6 (badd) @(159,97) /sn:0 /w:[ 1 ] //: output g7 (resadd) @(208,279) /sn:0 /w:[ 1 ] //: input g5 (aadd) @(159,123) /sn:0 /w:[ 0 ] add g0 (.A(aadd), .B(badd), .S(resadd), .CI(w12), .CO(w3)); //: @(195,200) /sn:0 /w:[ 1 0 0 1 1 ] endmodule module soustract(asous, bsous, ressous); //: interface /sz:(40, 40) /bd:[ ] supply1 w6; //: /sn:0 {0}(108,273)(127,273)(127,267){1} output [7:0] ressous; //: /sn:0 /dp:1 {0}(84,288)(84,505)(219,505)(219,312)(200,312){1} input [7:0] bsous; //: /sn:0 {0}(102,-245)(114,-245)(114,-231){1} //: {2}(116,-229)(191,-229)(191,-154){3} //: {4}(193,-152)(347,-152)(347,-101)(334,-101)(334,-88){5} //: {6}(191,-150)(191,3){7} //: {8}(112,-229)(111,-229)(111,-165){9} input [7:0] asous; //: /sn:0 {0}(-3,-231)(14,-231)(14,-196){1} //: {2}(12,-194)(-93,-194)(-93,-60){3} //: {4}(-91,-58)(95,-58)(95,117){5} //: {6}(-93,-56)(-93,25){7} //: {8}(14,-192)(14,-165){9} wire w7; //: /sn:0 {0}(111,-123)(111,-41)(117,-41){1} wire [7:0] w16; //: /sn:0 {0}(41,103)(41,53)(189,53)(189,24){1} wire w4; //: /sn:0 {0}(33,-47)(33,-72)(17,-72)(17,-123){1} wire [7:0] w0; //: /sn:0 {0}(178,154)(178,149)(98,149)(98,138){1} wire [7:0] w20; //: /sn:0 {0}(181,175)(181,200)(100,200)(100,208){1} wire [7:0] w1; //: /sn:0 {0}(100,259)(100,224){1} wire [7:0] w8; //: /sn:0 {0}(-90,46)(-90,53)(36,53)(36,103){1} wire w12; //: /sn:0 {0}(38,-47)(38,-71)(54,-71)(54,-123){1} wire [7:0] w11; //: /sn:0 {0}(159,-45)(186,-45)(186,-27){1} //: {2}(184,-25)(100,-25)(100,117){3} //: {4}(186,-23)(186,3){5} wire [7:0] w2; //: /sn:0 {0}(68,259)(68,194)(39,194)(39,124){1} wire w10; //: /sn:0 {0}(6,253)(6,273)(60,273){1} wire w13; //: /sn:0 {0}(36,-26)(36,-10)(22,-10){1} wire [7:0] w5; //: /sn:0 {0}(-88,25)(-88,6)(-57,6){1} //: {2}(-53,6)(-20,6){3} //: {4}(-55,4)(-55,-102)(329,-102)(329,-88){5} wire [7:0] w9; //: /sn:0 {0}(183,154)(183,149)(332,149)(332,-67){1} //: enddecls comparateur8 g4 (.d(bsous), .c(asous), .eg(w12), .inf(w7), .sup(w4)); //: @(-15, -164) /sz:(144, 40) /sn:0 /p:[ Ti0>9 Ti1>9 Bo0<1 Bo1<0 Bo2<1 ] or g8 (.I0(w4), .I1(w12), .Z(w13)); //: @(36,-36) /sn:0 /R:3 /w:[ 0 0 0 ] convertisseur g13 (.bit(w7), .fin(w11)); //: @(118, -84) /sz:(40, 67) /sn:0 /p:[ Li0>1 Ro0<0 ] //: input g3 (asous) @(-5,-231) /sn:0 /w:[ 0 ] //: supply1 g2 (w6) @(138,267) /sn:0 /w:[ 1 ] not g1 (.I(w20), .Z(w1)); //: @(100,214) /sn:0 /R:3 /w:[ 1 1 ] and g11 (.I0(asous), .I1(w5), .Z(w8)); //: @(-90,36) /sn:0 /R:3 /w:[ 7 0 0 ] //: joint g16 (w5) @(-55, 6) /w:[ 2 4 1 -1 ] //: joint g10 (asous) @(14, -194) /w:[ -1 1 2 8 ] //: joint g19 (w11) @(186, -25) /w:[ -1 1 2 4 ] //: joint g6 (bsous) @(114, -229) /w:[ 2 1 8 -1 ] led g7 (.I(w10)); //: @(6,246) /sn:0 /w:[ 0 ] /type:0 convertisseur g9 (.bit(w13), .fin(w5)); //: @(-19, -22) /sz:(40, 40) /sn:0 /p:[ Ri0>1 Lo0<3 ] or g15 (.I0(w8), .I1(w16), .Z(w2)); //: @(39,114) /sn:0 /R:3 /w:[ 1 0 1 ] //: joint g20 (asous) @(-93, -58) /w:[ 4 3 -1 6 ] //: joint g17 (bsous) @(191, -152) /w:[ 4 3 -1 6 ] and g14 (.I0(w11), .I1(bsous), .Z(w16)); //: @(189,14) /sn:0 /R:3 /w:[ 5 7 1 ] //: input g5 (bsous) @(100,-245) /sn:0 /w:[ 0 ] and g21 (.I0(asous), .I1(w11), .Z(w0)); //: @(98,128) /sn:0 /R:3 /w:[ 5 3 1 ] add g0 (.A(w2), .B(w1), .S(ressous), .CI(w6), .CO(w10)); //: @(84,275) /sn:0 /w:[ 0 0 0 0 1 ] or g22 (.I0(w0), .I1(w9), .Z(w20)); //: @(181,165) /sn:0 /R:3 /w:[ 0 0 0 ] and g18 (.I0(w5), .I1(bsous), .Z(w9)); //: @(332,-77) /sn:0 /R:3 /w:[ 5 5 1 ] //: output g12 (ressous) @(203,312) /sn:0 /R:2 /w:[ 1 ] endmodule