Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14
LogicWorks 4 Tutorials
Jianjian Song
Department of Electrical and Computer Engineering
Rose-Hulman Institute of Technology
March 2003
Table of Contents
1 LogicWorks 4 Installation and update .............................................................................................2
2 Tutorial #1: Introduction to LogicWorks 4........................................................................................2
2.1 Objectives .............................................................................................................................2
2.2 Starting LogicWorks 4 on your laptop.......................................................................................2
2.3 Obtaining and placing gates in schematic window.....................................................................2
2.4 Connecting gates ...................................................................................................................2
2.5 Labeling inputs and output signals and pins .............................................................................3
2.6 Connecting binary switches to input pins..................................................................................3
2.7 Connecting binary probes to outputs of the circuit.....................................................................3
2.8 Verifying logic function of the circuit with binary switches and probes .........................................3
2.9 Connecting clock devices to input pins and changing clock period..............................................3
2.10 Displaying and Changing gate delay time .............................................................................4
2.11 Setting trigger ....................................................................................................................4
2.12 Verifying logic function of the circuit with clocks.....................................................................4
2.13 Verifying logic function of the circuit with device delay............................................................5
2.14 Copying schematic and waveform to PowerPoint or Word......................................................5
2.15 Creating signals with no waveform in a timing diagram ..........................................................5
3 Tutorial #2: Device symbols and sub-circuits...................................................................................6
3.1 Objectives .............................................................................................................................6
3.2 Example sub-circuit: 74LS08 4 2-input AND gates ....................................................................6
3.3 Draw the schematic of the following turn-signal circuit without clocks..........................................6
3.4 Create Port Connectors ..........................................................................................................6
3.5 Create a device symbol for the turn-signal circuit ......................................................................7
3.6 Create a new library, my_library and save the symbol in it................................................8
3.7 Save your turn-signal sub-circuit to another file. ........................................................................8
3.8 Construct a turn-signal test circuit with the device symbol..........................................................8
3.9 Create a sub-circuit and device symbol with Top-Down approach ..............................................8
3.10 Edit a device from a library ..................................................................................................9
4 Tutorial #3: A 4-Bit Counter Device with Bus Pins..........................................................................10
4.1 Objectives: to create a sub-circuit and device symbol with bus pins..........................................10
4.2 Create bus port connectors ...................................................................................................10
4.3 Create a 4-bit counter sub-circuit with bus port connectors ......................................................11
4.4 Create a 4-bit counter device symbol with bus pins.................................................................11
4.5 Create a 4-bit counter with the counter symbol .......................................................................12
4.6 Different pin names in a top-level circuit and Bus Pin Information .............................................12
4.7 Debugging techniques ..........................................................................................................13
4.8 Modifying a bus port in a subcircuit........................................................................................13
5 Tutorial #4: Making a ROM device with a hex file ..........................................................................14
5.1 Objective: to create a ROM device that is initialized by reading a text file. .................................14
5.2 Create a plain text file...........................................................................................................14
5.3 Create a Rom that is initialized from a file...............................................................................14
Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 2 of 14
1 LogicWorks 4 Installation and update
Install LogicWorks 4 from the CD from the book LogicWorks 4 Interactive Circuit Design
Software. You will need to install an update patch LW410Update.exe that is available from
http://www.capilano.com/LogicWorks/lw400/lw4update.html or http://www.rosehulman.edu/class/ee/song/ece130/.
2 Tutorial #1: Introduction to LogicWorks 4
2.1 Objectives
o To build the following turn-signal circuit.
o To verify function of the circuit with no device delay.
o To find the output of the circuit, assuming 10-unit delay per gate.
o To export the circuit diagram and waveform to PowerPoint or Word.
0
0
0
0 0
0
160,160
80,80
40,40
Flash(F)
Left(L)
Left_turn(LT)
Right_turn(RT)
Right(R)
L R F LT RT
0 0 0 0 0
0 0 1 1 1
0 1 0 0 1
0 1 1 0 1
1 0 0 1 0
1 0 1 1 0
1 1 0 X X
1 1 1 X X
2.2 Starting LogicWorks 4 on your laptop
After you start LogicWorks 4, you should see a tool palette, a simulation palette, a schematic
circuit and symbol editor window, a timing diagram window, and a device library palette.
2.3 Obtaining and placing gates in schematic window
On the device library palette, choose “Simulation Gate.clf” with the left mouse button. Find twoinput
AND gate, AND-2. Double click the left mouse button to pick AND-2. Move the cursor to
the schematic window. Press one of the four arrow keys on the keyboard to change orientation of
the device.
Each time the left mouse button is pressed a copy of the chosen device is placed on the schematic
window. Click the right mouse button to drop the device.
Do the same for two-input OR gates OR-2 and inverters that is denoted NOT gate in the library.
You can rearrange the gate positions by picking one up and dragging it with the left mouse
button.
You can copy a gate by choosing it and choosing Edit->Copy (Control-C) and then Pasting it.
2.4 Connecting gates
To connect two pins with a wire, select the end of one pin with left mouse button and pressing
and dragging the cursor to the end of the other pin. The wire can be placed piece by piece at right
Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 3 of 14
angles by dragging and releasing the wire. A replaced wire can be rerouted by selecting and
dragging it in any direction.
2.5 Labeling inputs and output signals and pins
Click on the text icon (button with letter A) in the Tool Palette. The cursor becomes a pencil. Use
the pencil to pick a wire to be named by clicking on the wire. If your pencil is close to a pin, you
may pick a pin instead of a wire. You can number the pin by giving it a pin number. Pin numbers
can be seen by right clicking on a device and choosing Device Info->Pin Info. By default, pin
numbers are in blue and signal names are in pink.
Choose a wire instead of a pin. Type a name for the wire and then press the enter key.
A signal name can be changed by double clicking on it and then making a change. The name can
be dragged to another location while still associated with the same wire. Conflict will occur if two
wires have the same name.
Label all the signals as shown in the given circuit. Right clicking will restore cursor.
2.6 Connecting binary switches to input pins
Select Simulation IO.clf in the device library palette. Choose Binary Switch. Connect one binary
switch to one input signal of the circuit.
A binary switch can be turn on and off by clicking on it. To modify a binary switch after its
placement, press Shift key and the left mouse button together.
2.7 Connecting binary probes to outputs of the circuit
Double click Binary Probe from the Simulation IO library. Move cursor to Schematic Window.
Connect one probe on each of the two circuit outputs.
0
0
0
0 0
0
0
1
0
1
0
1
1
0
Flash(F)
Left(L)
Left_turn(LT)
Right_turn(RT)
Right(R)
2.8 Verifying logic function of the circuit with binary switches and probes
Notice that the probe values may change when the binary switches change state.
Selecting binary switch values to generate all eight possible input combinations and record the
output probe values. This is one way to verify the function of the circuit.
2.9 Connecting clock devices to input pins and changing clock period
Remove the binary switches by pressing Shift key and the left mouse button while cursor is on a
switch and then pressing Delete key. You can also use the Zip tool to remove any device.
Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 4 of 14
Select Clock from the Simulation IO library. Connect one clock to each input pin.
Notice waveforms are being generated in the timing diagram window. To slow the wavefor
jianjian เพลง logicworks 4 สอน ( 5 / 15 / 03 ) หน้า 1 จาก 14
เพลง
jianjian logicworks 4 สอนภาควิชา
วิศวกรรมไฟฟ้าและคอมพิวเตอร์สถาบันเทคโนโลยีแห่งกุหลาบฮัลเมิ่นมีนาคม 2003
สารบัญ
1 logicworks 4 ติดตั้งและปรับปรุง ............................................................................................. 2
2 สอน# 1 : แนะนำ logicworks 4 . . .2.1 วัตถุประสงค์ ............................................................................................................................. ............................................................................... 2
2
2 เริ่ม logicworks 4 แล็ปท็อปของคุณบน ....................................................................................... 2
23 การวางประตูและหน้าต่างแผนผัง ..................................................................... 2 ประตูเชื่อมต่อ ................................................................................................................... 2
2.4 2.5 ฉลากปัจจัยการผลิตและการส่งสัญญาณและขาออก ............................................................................. 3
26 การเชื่อมต่อสวิตช์ไบนารีที่หมุดใส่ .................................................................................. 3
2.7 ต่อไบนารี probes เพื่อพัฒนาวงจร ..................................................................... 3
2.8 ตรวจสอบตรรกะการทำงานของวงจรสวิทช์แบบไบนารีและฟิวส์ ......................................... 3
29 อุปกรณ์นาฬิกาและนาฬิกาใส่พินเปลี่ยนระยะเวลา .............................................. 3
2.10 การแสดงและการประวิงเวลาประตู ............................................................................. 4
2.11 การเรียก .................................................................................................................... 4
212 การตรวจสอบตรรกะการทำงานของวงจรนาฬิกา ..................................................................... 4
2.13 การตรวจสอบตรรกะการทำงานของวงจรกับอุปกรณ์ ............................................................ ล่าช้า 5
2.14 เลียนแบบแผนผังและสัญญาณไปยัง PowerPoint หรือ Word ...................................................... 5
215 การสร้างสัญญาณไม่มีสัญญาณใน Timing Diagram .......................................................... 5
3 กวดวิชา# 2 : สัญลักษณ์อุปกรณ์และวงจรย่อย ................................................................................... 6
3.1 วัตถุประสงค์ ............................................................................................................................. 6
3วงจรย่อย 2 ตัวอย่าง : 74ls08 4 2-input และประตู .................................................................... 6
3 วาดแผนผังของต่อไปนี้เปิดสัญญาณวงจรไม่มีนาฬิกา .......................................... 6
3.4 สร้างการเชื่อมต่อพอร์ต .......................................................................................................... 6
35 สร้างอุปกรณ์สัญลักษณ์สำหรับการเปิดสัญญาณวงจร ......................................................................
7 3.6 สร้างห้องสมุดใหม่ my_library และบันทึกสัญลักษณ์ใน ................................................ 8
3.7 บันทึกของคุณเปิดสัญญาณวงจรย่อยไปยังไฟล์อื่น ........................................................................ 8
38 สร้างเปิดสัญญาณทดสอบวงจรกับอุปกรณ์สัญลักษณ์ .......................................................... 8
3.9 สร้างวงจรย่อยและอุปกรณ์สัญลักษณ์ด้านบนลงวิธีการ .............................................. 8
3.10 แก้ไขอุปกรณ์จากห้องสมุด .................................................................................................. 9
4 กวดวิชา# 3 :เป็น 4-bit อุปกรณ์เคาน์เตอร์ ด้วยหมุด รถบัส .......................................................................... 10
4.1 วัตถุประสงค์ : เพื่อสร้างวงจรย่อยและอุปกรณ์สัญลักษณ์ ด้วยหมุด รถบัส .......................................... 10
4.2 สร้างการเชื่อมต่อพอร์ตบัส ................................................................................................... 10
43 สร้าง 4-bit เคาน์เตอร์ย่อยวงจรเชื่อมต่อพอร์ตบัส ...................................................... 11
4.4 สร้าง 4-bit นับอุปกรณ์สัญลักษณ์ ด้วยหมุด รถบัส ................................................................. 11
4.5 สร้างเคาน์เตอร์ 4-bit มีสัญลักษณ์เคาน์เตอร์ ....................................................................... 12
4ชื่อ 6 พินที่แตกต่างกันในระดับวงจรและข้อมูลรถขา ............................................. 12
4.7 การดีบักเทคนิค .......................................................................................................... 13
4.8 การรถบัสพอร์ตในแบบ ........................................................................................ 13
5 # 4 : การกวดวิชาทำให้อุปกรณ์รอมกับ HEX ไฟล์ .......................................................................... 14
5.1 วัตถุประสงค์ : เพื่อสร้างรอมอุปกรณ์ที่เริ่มต้นด้วยการอ่านแฟ้มข้อความ ................................. 14
5.2 สร้างไฟล์ข้อความธรรมดา ........................................................................................................... 14
53 สร้างรอมที่เริ่มต้นจาก ............................................................................... ไฟล์ 14
jianjian เพลง logicworks 4 สอน ( 5 / 15 / 03 ) หน้า 2 จาก 14
1 logicworks 4 ติดตั้งและปรับปรุง logicworks 4
ติดตั้งจากแผ่นซีดีจากหนังสือ logicworks 4 แบบโต้ตอบการออกแบบวงจร
ซอฟต์แวร์ คุณจะต้องติดตั้งแพทช์อัปเดต lw410update .exe ที่สามารถใช้ได้จาก
http://www.capilano.com/logicworks/lw400/lw4update.html หรือ http : / / www.rosehulman . edu / class / ee / เพลง / ece130 / .
# 2 กวดวิชา 1 : บทนำ
o logicworks 4 2.1 วัตถุประสงค์เพื่อสร้างวงจรไฟเลี้ยว ดังต่อไปนี้
o เพื่อตรวจสอบการทำงานของวงจรที่ไม่มีอุปกรณ์หน่วงเวลา
O ค้นหาออกจรสมมติหน่วงเวลา 10 หน่วย ต่อประตู .
o เพื่อส่งออกและแผนภาพวงจรสัญญาณไปยัง PowerPoint หรือ Word .
0
0
1
0
0
0
160160 80,80 40,40 แฟลช ( F )
ซ้าย ( L )
left_turn ( LT )
right_turn ( RT ) ขวา ( R )
L R F LT RT
0 0 0 0 0
0 0 1 1 1 0 0 1 1
0
0
1 1 0 1 1 0 0 1 0 1 0 1 1 0
0
1
1 x 1 x 1 x 1 x
2
4 เริ่ม logicworks บนแล็ปท็อปของคุณหลังจากที่คุณเริ่ม logicworks 4 , คุณควรจะเห็น เครื่องมือจานสี , จำลองวงจร
สีวงจรสัญลักษณ์การแก้ไขหน้าต่าง , หน้าต่าง Timing Diagram และอุปกรณ์ห้องสมุด 2.3 การขอรับ และการวางจาน
ประตูหน้าต่างแผนผังบนอุปกรณ์ห้องสมุดสี เลือก " จำลองประตู . CLF " ด้วยปุ่มซ้ายของเมาส์ ค้นหาและ twoinput
ประตู and-2 . ดับเบิลคลิกปุ่มซ้ายของเมาส์เพื่อเลือก and-2 . ย้ายเคอร์เซอร์
หน้าต่างแผนผังกดหนึ่งสี่ปุ่มลูกศรบนแป้นพิมพ์เพื่อเปลี่ยนการวางแนวของ
แต่ละครั้งใช้อุปกรณ์ เมาส์ปุ่มซ้ายกดคัดลอกของอุปกรณ์ที่เลือกวางไว้บนหน้าต่างแผนผัง
คลิกที่ปุ่มเมาส์ขวาเพื่อวางอุปกรณ์
ทำเหมือนเข้าหรือสองประตู or-2 และอินเวอร์เตอร์ที่เขียนไม่ได้ประตูห้องสมุด
คุณสามารถจัดเรียงประตูตำแหน่งโดยการเลือกหนึ่งขึ้นและลากด้วยเมาส์ปุ่มซ้าย
.
คุณสามารถคัดลอกประตูโดยการเลือกและเลือกแก้ไข -- > คัดลอก ( ควบคุม C - ) และวางลง .
2.4 ประตูเชื่อมต่อเพื่อเชื่อมสองหมุดด้วยลวด เลือกปลายหนึ่งสลักด้วยปุ่ม เมาส์ซ้ายและกด
และลากเคอร์เซอร์ไปยังจุดสิ้นสุดของขาอื่น ๆลวดสามารถวางชิ้นโดยชิ้นขวา
jianjian เพลง logicworks 4 สอน ( 5 / 15 / 03 ) หน้า 3 จาก 14
มุมโดยการลากและปล่อยลวด เปลี่ยนเป็นลวดที่สามารถเปลี่ยนเส้นทางโดยการเลือกและลากไปในทิศทางใด ๆ
.
2.5 ฉลากปัจจัยการผลิตและการส่งสัญญาณและคลิกที่หมุด
บนไอคอนข้อความออก ( ปุ่มที่มีตัวอักษร ) ในเครื่องมือจานสี เคอร์เซอร์จะกลายเป็นดินสอ ใช้
ดินสอเลือกลวดจะถูกตั้งชื่อโดยการคลิกบนลวด ถ้าดินสอใกล้ขาคุณ
อาจเลือกเข็มกลัดแทนลวด คุณสามารถให้หมายเลข PIN หมายเลขมัน หมายเลข
สามารถเห็นได้โดยการคลิกขวาที่อุปกรณ์และการเลือกอุปกรณ์ข้อมูล - > ขาข้อมูล โดยค่าเริ่มต้น , pin
ตัวเลขในชื่อสีฟ้าและสัญญาณในสีชมพู .
เลือกลวดแทนเข็มพิมพ์ชื่อสำหรับลวดและจากนั้นกดปุ่ม Enter .
สัญญาณชื่อสามารถเปลี่ยนได้โดยดับเบิลคลิกมันและการเปลี่ยนแปลง ชื่อสามารถ
ถูกลากไปยังสถานที่อื่นในขณะที่ยังเกี่ยวข้องกับสายเดียวกัน ความขัดแย้งจะเกิดขึ้นถ้าสองสายที่มีชื่อเดียวกัน
.
ป้ายสัญญาณทั้งหมดตามที่แสดงในให้วงจร คลิกขวาจะเรียกคืนเคอร์เซอร์ .
26 การเชื่อมต่อสวิตช์แบบใส่หมุด
เลือกจำลอง io.clf ในอุปกรณ์ห้องสมุดสี เลือกสลับแบบไบนารี เชื่อมต่อหนึ่งนารี
สลับสัญญาณหนึ่งของวงจร .
เปลี่ยนไบนารีที่สามารถเปิดและปิดได้โดยคลิกที่ การแก้ไขเปลี่ยนเลขฐานสองหลังจาก
จัดวางคีย์ Shift กดปุ่มซ้ายของเมาส์กัน .
2.7 ต่อไบนารี probes เพื่อพัฒนาวงจร
ดับเบิลคลิกที่ตัวไบนารีจากการจำลอง IO ห้องสมุด ย้ายเคอร์เซอร์ไปที่หน้าต่างแผนผัง
เชื่อมต่อหนึ่งตรวจสอบแต่ละของทั้งสองวงจรเอาท์พุท
0
0
0
0 0
0
0
1
0
1
0
1
1
0
แฟลช ( F )
ซ้าย ( L )
left_turn ( LT )
right_turn ( RT ขวา ( R ) )
2.8 ตรวจสอบตรรกะการทำงานของวงจรสวิทช์แบบไบนารีและ probes
สังเกตว่าวัดค่าอาจจะเปลี่ยนเมื่อสองสวิทช์เปลี่ยนสถานะ .
การเลือกเปลี่ยนค่าเพื่อสร้างไบนารีทั้งหมดแปดใส่ไปได้ชุดและบันทึก
ออกตรวจสอบค่า นี้เป็นวิธีหนึ่งในการตรวจสอบการทำงานของอุปกรณ์เชื่อมต่อวงจร .
2.9 นาฬิกาพินใส่และเปลี่ยนเวลานาฬิกาเอาสวิตช์
ไบนารีโดยการกด Shift และปุ่มซ้ายของเมาส์ในขณะที่เคอร์เซอร์บน
เปลี่ยนแล้วกดลบคีย์นอกจากนี้คุณยังสามารถใช้เพื่อลบซิปเครื่องมืออุปกรณ์ใด ๆ .
jianjian เพลง logicworks 4 สอน ( 5 / 15 / 03 ) หน้า 4 จาก 14
เลือกนาฬิกาจากการจำลอง IO ห้องสมุด เชื่อมต่อหนึ่งนาฬิกาแต่ละอินพุตขา
สังเกตรูปคลื่นถูกสร้างขึ้นในหน้าต่างแผนผังเวลา ช้า wavefor
การแปล กรุณารอสักครู่..
