If you are unfamiliar with SDF, follow the steps below to learn how to install and run the SDF tools.
This process will compile the assembler (C++), simulator (C++) on a recent Linux or BSD computer.
Requirements: GCC 3.4+, and GNU Make
Use subversion to check out the latest version:
username: guest
password: Password2013
$ svn co http://csrl.unt.edu/svn/tools/sdf --username=guest
Change to the directory you just downloaded:
$ cd sdf/
Setup your environment:
$ source env.sh
Build the application suite:
$ make
You are now ready to run the tests and see what is and isn't working in the compiler or give the simulator something to do by writing an assembly language program for it.
To run the tests:
$ make test
To run an assembly language program the sourcing env.sh should have correctly setup your path to the bin/ directory that contains the sdfsim application.
You will need to link a device file for input and output:
$ ln -s /dev/stdin stdin.dev; ln -s /dev/stdout stdout.dev
Now if you have a program written in assembly you could execute it as follows.
$ sdf -S stats.log prime.sda Assemble successfully! CONTEXT REGISTERS = 96 FRAME SIZE = 256 FRAMES PER PROCESSOR = 256 REGISTER SETS PER PROCESSOR = 64 Instruction Cache Direct Mapped has been built Instruction Cache has been built Frame Cache has been built FRAME ALLOCATION POLICY = STACK [WARNING] No I-structure data file found Starting simulation, version , 0.9.2 101 1 GREAT! PROGRAM TERMINATED NORMALLY! Instruction Cache has been deleted Frame Cache has been deleted $
In this case I input the number 101 and the program responded with 1 (true). In the case you entered an non-prime like 1 it would indicate 0 (false).
Interesting command line options to sdf:
-D: do not delete .sdf and .dat files -L file: save log file -T file: save trace file -P file: save pipeline file -S file: save statistics file -C file: save cache statistics file -d: enable debug mode (use multiple times for more detail) -p {cq|st|sh}: frame alloc policy: cq=circular queue, st=stack, sh=stackh -f int: maximum number of frames -F int: frame size in words -r int: number of register sets -a int: reassign start address -t int: terminate at clock cycle -n int: take snapshot at clock cycle -s int: number of SPs -e int: number of EPs
The Scale based SDF compiler is no longer available due to licensing issues.