EEE3050 Theory on Computer Architectures (Spring 2017) HW1:...

20
EEE3050 Theory on Computer Architectures (Spring 2017) Prof. Jinkyu Jeong ModelSim Tutorial 2017.05.11 TA 이규선 (GYUSUN LEE) / 안민우 (MINWOO AHN) Computer Systems Laboratory

Transcript of EEE3050 Theory on Computer Architectures (Spring 2017) HW1:...

Page 1: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

EEE3050 Theory on Computer Architectures (Spring 2017)Prof. Jinkyu Jeong

ModelSim Tutorial2017.05.11

TA 이규선(GYUSUN LEE) / 안민우(MINWOO AHN)

Computer Systems Laboratory

Page 2: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Contents

Computer Systems Laboratory

▪ Installation

▪ ModelSim▪ Composition▪ Create the project▪ Compile▪ Simulate▪ Waveform▪ Run

Page 3: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Installation

Computer Systems Laboratory

▪ Windows: ModelSim PE student edition / Altera Starter edition

▪ http://www.mentor.com/company/higher_ed/modelsim-student-edition

▪ Linux: ModelSim-Altera Starter edition for linux

▪ http://vineeshvs.blogspot.kr/2014/02/installing-and-using-modelsim-in-ubuntu.html

Page 4: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Installation on Windows

Computer Systems Laboratory

Page 5: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Installation on Windows

Computer Systems Laboratory

▪ Right after the installation, you can visit this page▪ Fill the form to get the student license of ModelSim▪ This page below should be accessed by link of installation process

Page 6: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Installation on Windows

Computer Systems Laboratory

▪ After completing the form, you can get the email from Mentor Graphics▪ Save the attached file with the name “student_license.dat” to the top level installation directory composition▪ Detail information is in email contents

Page 7: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Composition

Computer Systems Laboratory

▪ When you run the ModelSim, the following window comes.▪ Click [File] -> [New] -> [Project for new project file].

Page 8: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Create the project

Computer Systems Laboratory

▪ You can write project name and select location.▪ Project location should consist of “English” path(Don’t use c:/바탕화면/).▪ Check the [Reference Library Mappings].

Page 9: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Create the project

Computer Systems Laboratory

▪ Add Existing File : Add all existing files we gave.▪ Check the [Reference from current location].▪ You should select files we give to add to project.

Page 10: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Create the project

Computer Systems Laboratory

▪ You can see the files added to the project in the workspace window.

Page 11: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Create the project

Computer Systems Laboratory

▪ You should copy test data files in the created project path.

Page 12: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Compile

Computer Systems Laboratory

▪ After modifying the files, save and compile all files in project. (Compile All)

Page 13: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Compile

Computer Systems Laboratory

▪ You can see status change (?) -> (V), when compile is successful.

Page 14: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Compile

Computer Systems Laboratory

▪ Compile Fail : Error message in transcript and status change (X)

Page 15: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Simulate

Computer Systems Laboratory

▪ If there is no compile error, run simulation.▪ Select [Simulate] -> [Start Simulation]▪ Select [+work] -> [test_bench]

Page 16: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Simulate

Computer Systems Laboratory

▪ You can see this window.

Page 17: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Waveform

Computer Systems Laboratory

▪ You can see wave window.▪ Drag ‘dut’ to gray box.

Page 18: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Run

Computer Systems Laboratory

▪ Run simulation and you can see waveform.

Page 19: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Simulate

Computer Systems Laboratory

▪ You can see this window.

Page 20: EEE3050 Theory on Computer Architectures (Spring 2017) HW1: …csl.skku.edu/uploads/EEE3050S17/ModelSim_Tutorial.pdf · 2017-05-11 · ModelSim Tutorial 2017.05.11 TA 이규선(GYUSUN

Run

Computer Systems Laboratory