//: version "1.6f" //: property discardChanges = 1 module main; //: root_module wire w7; //: /sn:0 {0}(682,363)(697,363)(697,375){1} wire s0; //: {0}(750,310)(780,310){1} wire w4; //: /sn:0 {0}(702,345)(702,375){1} wire c0; //: {0}(598,268)(704,268)(704,310){1} //: {2}(706,312)(729,312){3} //: {4}(704,314)(704,324){5} wire c1; //: {0}(700,396)(700,433){1} //: {2}(702,435)(725,435){3} //: {4}(700,437)(700,447){5} wire s1; //: /dp:1 {0}(746,433)(781,433){1} wire a1; //: {0}(598,427)(638,427){1} //: {2}(642,427)(650,427){3} //: {4}(640,429)(640,483)(657,483){5} wire b1; //: {0}(598,462)(632,462){1} //: {2}(634,460)(634,432)(650,432){3} //: {4}(634,464)(634,488)(657,488){5} wire w8; //: /sn:0 {0}(678,486)(693,486)(693,498){1} wire a0; //: /dp:1 {0}(598,304)(642,304){1} //: {2}(646,304)(654,304){3} //: {4}(644,306)(644,360)(661,360){5} wire b0; //: /dp:1 {0}(598,339)(636,339){1} //: {2}(638,337)(638,309)(654,309){3} //: {4}(638,341)(638,365)(661,365){5} wire c2; //: {0}(783,530)(696,530)(696,519){1} wire w10; //: /sn:0 {0}(725,430)(697,430){1} //: {2}(693,430)(671,430){3} //: {4}(695,432)(695,447){5} wire w5; //: /sn:0 {0}(698,468)(698,498){1} wire w9; //: /sn:0 {0}(729,307)(701,307){1} //: {2}(697,307)(675,307){3} //: {4}(699,309)(699,324){5} //: enddecls //: joint g8 (c1) @(700, 435) /w:[ 2 1 -1 4 ] nand g4 (.I0(w8), .I1(w5), .Z(c2)); //: @(696,509) /sn:0 /R:3 /w:[ 1 1 1 ] //: comment g61 /dolink:1 /link:"@T/edwire_tut.v" @(630,100) /sn:0 /anc:1 //: /line:"Editing Wires" //: /end led g37 (.I(s0)); //: @(787,310) /sn:0 /R:3 /w:[ 1 ] /type:0 xor g34 (.I0(w10), .I1(c1), .Z(s1)); //: @(736,433) /sn:0 /w:[ 0 3 0 ] //: comment g13 /dolink:0 /link:"@T/edit1_tut.v" @(630,70) /sn:0 /anc:1 //: /line:"Basic Editing Modes" //: /end //: comment g3 /dolink:0 /link:"" @(29,249) /anc:1 //: /line:"5) Open the \"Tool\" menu and select \"Bit Width\" to bring up the ribbon" //: /line:"cable tool. This will also cause a text entry labeled \"Bits:\" to appear" //: /line:"in the lower right corner of the main window. Click in the entry box" //: /line:"and enter a number between 1 and 32. Now click on a wire to set it to" //: /line:"the indicated bit width." //: /line:"" //: /line:"6) Double click on a wire to open the wire properties box. You can" //: /line:"change the signal name, make the signal name visible, or set the bit" //: /line:"width of the wire. The wire properties box can also be opened from" //: /line:"the popup menu by right clicking on the wire." //: /line:"" //: /line:"7) Open the \"Tool\" menu and select \"Move/Connect\" to return to the" //: /line:"basic editing tool. Now double click (or right click and select" //: /line:"\"Properties...\") on an XOR gate here to open the properties box for" //: /line:"the gate. You can change the name of the gate, make the name visible" //: /line:"by undoing the \"hide\" option, and add or delete ports." //: /line:"" //: /line:"8) Right click on a gate and turn on the \"Anchor\" flag for a gate." //: /line:"Now try to move the gate (it shouldn't move). This feature can be" //: /line:"used to prevent accidentally moving things you want to keep in a fixed" //: /line:"position." //: /end //: comment g2 /dolink:0 /link:"" @(29,38) /anc:1 //: /line:"1) Click on a gate with the left mouse button. Try dragging the gate to" //: /line:"a new position and watch how the wires move with the gate." //: /line:"" //: /line:"2) Open the \"Tool\" menu and select \"Cut Wire\" to bring up the wire cutter tool." //: /line:"Click the wire cutter somewhere along a wire to cut it. Loose segments" //: /line:"or segments leading to a joint will be automatically cleaned up. You can also" //: /line:"change modes by right clicking in an empty area and then selecting a mode from" //: /line:"\"Tool\" in the popup menu." //: /line:"" //: /line:"3) Open the \"Tool\" menu and select \"Invert\" to bring up the inverting tool." //: /line:"Click the inverter bubble near the input or output of a gate to add or" //: /line:"delete an inverter." //: /line:"" //: /line:"4) Open the \"Tool\" menu and select \"Delete Gate\" to bring up the IC extractor" //: /line:"tool. Click on a gate to delete it. You can also delete a gate by selecting" //: /line:"it and pressing the \"Delete\" key, or by right clicking and selecting \"Delete\"." //: /end nand g1 (.I0(w7), .I1(w4), .Z(c1)); //: @(700,386) /sn:0 /R:3 /w:[ 1 1 0 ] //: switch g11 (a1) @(581,427) /sn:0 /w:[ 0 ] /st:0 //: comment g16 /dolink:1 /link:"@T/module_tut.v" @(630,115) /sn:0 /anc:1 //: /line:"Using Modules" //: /end //: joint g10 (a1) @(640, 427) /w:[ 2 -1 1 4 ] nand g28 (.I0(a0), .I1(b0), .Z(w7)); //: @(672,363) /sn:0 /w:[ 5 5 0 ] led g19 (.I(s1)); //: @(788,433) /sn:0 /R:3 /w:[ 1 ] /type:0 //: switch g27 (c0) @(581,268) /sn:0 /w:[ 0 ] /st:0 //: joint g32 (w9) @(699, 307) /w:[ 1 -1 2 4 ] //: joint g38 (b1) @(634, 462) /w:[ -1 2 1 4 ] nand g6 (.I0(a1), .I1(b1), .Z(w8)); //: @(668,486) /sn:0 /w:[ 5 5 0 ] nand g9 (.I0(w10), .I1(c1), .Z(w5)); //: @(698,458) /sn:0 /R:3 /w:[ 5 5 0 ] //: joint g7 (w10) @(695, 430) /w:[ 1 -1 2 4 ] //: frame g15 @(600,25) /sn:0 /anc:1 /wi:213 /ht:149 /tx:"Tutorials" //: comment g20 /dolink:1 /link:"@T/create_tut.v" @(630,55) /sn:0 /anc:1 //: /line:"Creating a Circuit" //: /end nand g31 (.I0(w9), .I1(c0), .Z(w4)); //: @(702,335) /sn:0 /R:3 /w:[ 5 5 0 ] led g39 (.I(c2)); //: @(790,530) /sn:0 /R:3 /w:[ 0 ] /type:0 //: comment g17 /dolink:1 /link:"@T/sim_tut.v" @(630,130) /sn:0 /anc:1 //: /line:"Combinational Simulation" //: /end //: switch g25 (a0) @(581,304) /sn:0 /w:[ 0 ] /st:0 //: joint g29 (a0) @(644, 304) /w:[ 2 -1 1 4 ] //: comment g14 /dolink:1 /link:"@T/seqsim_tut.v" @(630,145) /sn:0 /anc:1 //: /line:"Sequential Simulation" //: /end //: switch g36 (b1) @(581,462) /sn:0 /w:[ 0 ] /st:0 //: comment g21 /dolink:1 /link:"@T/edit2_tut.v" @(630,85) /sn:0 /anc:1 //: /line:"Group Editing Features" //: /end xor g24 (.I0(w9), .I1(c0), .Z(s0)); //: @(740,310) /sn:0 /w:[ 0 3 0 ] xor g23 (.I0(a0), .I1(b0), .Z(w9)); //: @(665,307) /sn:0 /w:[ 3 3 3 ] xor g35 (.I0(a1), .I1(b1), .Z(w10)); //: @(661,430) /sn:0 /w:[ 3 3 3 ] //: comment g22 /dolink:0 /link:"" @(605,70) /sn:0 /anc:1 //: /line:"->" //: /end //: comment g0 /dolink:0 /link:"" @(8,10) /anc:1 //: /line:"This tutorial introduces the basic editing features of TkGate." //: /end //: switch g26 (b0) @(581,339) /sn:0 /w:[ 0 ] /st:0 //: comment g18 /dolink:1 /link:"@T/welcome_tut.v" @(630,40) /sn:0 /anc:1 //: /line:"TkGate Introduction" //: /end //: joint g30 (b0) @(638, 339) /w:[ -1 2 1 4 ] //: joint g33 (c0) @(704, 312) /w:[ 2 1 -1 4 ] endmodule