250 likes | 270 Views
Learn how to set up CSE account, use Xming for remote login, and complete the first OSP assignment. Access OSP manual sections, copy necessary files, edit code, compile, run simulator, and debug effectively.
E N D
OSP Tutorial An Introduction
Getting to OSP • Obtain a CSE account • Recommend xming to remote log in from USF Website • https://rc.usf.edu/trac/doc/wiki/XmingInstall • Log Into grad • grad.cse.usf.edu
Getting to Know OSP • Manual is Your Friend!!!! • Read OSP Manual 1.1-1.4 to gain an understanding of programming in OSP • Read subsequent sections in 1 for an understanding of specific modules in OSP
Guide for First Assignment • Log into grad.cse.usf.edu server • Copy necessary files from /home/csee1/ospuser/HW109.solaris
Guide for First Assignment • Copy necessary files to your computer or to a working directory: • Makefile • inter.c • timeint.c • dialog.c • inter.o
Guide for First Assignment • Follow directions on assignment handout for modifying the Makefile • Use knowledge from other modules in OSP to edit timeint.c • Use favorite C editor to edit the file or pico under Unix.
Guide for First Assignment • When finished editing timeint.c file, upload files to directory on grad if necessary • On grad, in the directory where your files are located type “make” to compile the program • Type OSP to run the simulator (See 2.2 and 2.3 in manual)
Guide for First Assignment • Compile OSP (ignoring warning messages): 234 grad: make cc -c -g dialog.c cc -c -g inter.c cc -c -g timeint.c cc /home/csee1/ospuser/HW109.solaris/osp.odialog.ointer.otimeint.o -lm -g –o OSP 235 grad: OSP –d par.high ... output is redirected to 'simulation.run' ... wait ... FINITA
Guide for First Assignment • Table 2.1 shows simulator parameters • Recommended Interactive and Trace modes to view simulation steps
Guide for First Assignment • Example of step in OSP
Guide for First Assignment • Can put numbers in a file for parameters and load this file using OSP “your_parameter_filename” (see pg77) • Tips for debugging: • OSP –d enters debugging mode • View simulator results using a text editor in simulation.run (ex. PICO)
Guide for First Assignment • Successful Simulator Run:
Guide for First Assignment • Once timeint.c completed, go on to inter.c • Once inter.c is completed, time to hand in! • Hand-In (See pg. 82 in manual) • Run the hand_in script located in the OSP directory from the directory with your files
Guide for First Assignment • Pick the compiler (here gcc, you use cc)
Guide for First Assignment • Enter the parameter file name • There are two parameter files, one is less intense than the other. First run the par.trace file.
Guide for First Assignment • Enter any necessary comments in the comments field • Hopefully all runs well!
Guide for First Assignment • Now enter the next parameter file par.high
Guide for First Assignment • Again enter any necessary comments
Guide for First Assignment • If you see this, you pat yourself on the back!
Guide for First Assignment • Press enter to close • Verify your submission worked by looking at simulation.run
Guide for First Assignment • Debugging Mode:
Guide for First Assignment • For your result comparison with the simulators’ results, use the run.high parameter file. • Section 2.4 talks about interpreting the results.