How to set up Mocha
You need to execute these commands from a Linux machine.
Follow these instructions:
- cd /cse/classes/CMPE293
- If you are using bash, then do
source bash_setup
If you are using csh or tcsh, then do
source csh_setup
- Run Mocha by mocha & or, if you want to do it in text
mode, mocha -t
- Notice that if you use Mocha in text mode, you can also write
scripts, and do: mocha -t < script > output
This is particularly convenient if you are running over and over the
same commands (for example, the read_module command when you try to
compile!)
- You will find the examples for the class and homework in the
directory /cse/classes/CMPE293/class-examples
The directory /cse/classes/CMPE293/mocha/examples contains
additional examples.
Note: The version of Mocha I put here is slightly different
from the one you can find on the main Mocha webpage
http://www-cad.eecs.berkeley.edu/~mocha
For Homework 1, either version is fine.
For later assignments, you need to use the version set up here.
Luca de Alfaro
luca@soe.ucsc.edu