SMOK
and Cebollita
. (See the Files section of
the main assignment page.)
$ cebsim --version UI version: 2.4 (Build 41) Debugger version: 2.4 (Build 41) DebuggableMachine version: 2.4 (Build 41) CebMachine version: 2.4 (Build 41) OSHandler version: 2.4 (Build 41)
Warning: You actually need V7.1.9 of SMOK to complete this project. See this page for why (and for why I'm not updating this image.)
cygwin
, navigate to the directory in which you want to
create the directory of project files. Issue the cvs
command
given in the Files section of
the main assignment page.
A new directory, smokCacheProject
, is created.
smokCacheProject
folder. Double-click on file smokCacheProject.sln
. Visual Studio
starts. Select the Build menu, then Build Solution. Stuff happens.
When it's over you should see (in a pane near the bottom, with high likelihood):
---------------------- Done ---------------------- Build: 1 succeeded, 0 failed, 0 skipped
You've just compiled and linked the code for the degenerate cache
implementations. A folder named executables
should have been
created in your smokCacheProject
folder, and inside it you should
find file smokCachePackage.smokdll
. That's the executable version
of your code. (It cannot be run on its own, however, only
from SMOK
.)
SMOK
. Select the Edit menu, then Edit Smok Env Vars.
Append the path to your executables
directory
(e.g., O:\cse378\hw6\smokCacheProject\executables
). Use a
semi-colon to separate this new path element from what was there already.
This setting will be remembered, so you won't have to do it again for a particular kind of machine (i.e., lab or home).![]()
SMOK
and restart it. Select the View menu, then
Package Information, then smokCachePackage.
Shut down![]()
SMOK
.
Note: If you attempt to build your code while running
a SMOK
process, you will get an error like this:
Linking...
LINK : fatal error LNK1168: cannot open Executables/smokCachePackage.smokdll for writing
Build log was saved at "file://c:\cse378\smokCacheProject\Debug\BuildLog.htm"
smokCacheComponent - 1 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
This is because Visual Studio is unable to overwrite the output executable
file while it is in use.
Here's what this looks like for me. What it looks like for you will probably be a bit different, as Visual Studio is squirrelly about what is placed where (or even shown -- if you don't see a pane at all try diciphering the View menu to see if you can get it to come up).
Don't shut down Visual Studio yet.
SMOK
:
A (purple)![]()
ICache
component is created.
SMOK
by selecting the Debug menu, then Processes... Find the SMOK
process in the list and hit Attach. Make sure Native is selected, then
hit OK, then Close.
SMOK
and type ctrl-f (step).
Visual Studio asserts itself. The yellow arrow shows you that you've
reached a breakpoint. The bottom left pane shows the values of variables
used in that statement; the bottom right the call stack.
I've annotated some of the toolbar buttons near the upper right in red.
We reached this breakpoint because the![]()
ComputeOutput
method
is called at each clock up.
ComputeOutput
breakpoint.
This is because SMOK
simulates to the middle of a cycle
(after up but before down) before stopping, so that when you look
at the outputs on the display they are correct, given that the inputs
may have changed due to latching at clock down of the last cycle.
SMOK
is running, waiting for user input.