OpenCores
URL https://opencores.org/ocsvn/linkruncca/linkruncca/trunk

Subversion Repositories linkruncca

[/] [linkruncca/] [trunk/] [sim/] [CCA.sh] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 jaytang
#!/bin/sh
2
 
3
img="testimage/mandrill.pgm"
4
 
5
 
6
# image exist?
7
if [ ! -f $img ];
8
        then
9
        echo $img not found!
10
        exit
11
fi
12
 
13
# get image size and update header/parameters for simulation and verilog files
14
w=`identify -format '%w' $img`
15
h=`identify -format '%h' $img`
16
echo "char fname[]=\"$img\";" > sim.h
17
echo "unsigned int imwidth=$w;" >> sim.h
18
echo "unsigned int imheight=$h;" >> sim.h
19
echo "parameter imwidth=$w;" > ../src/cca.vh
20
echo "parameter imheight=$h;" >> ../src/cca.vh
21
#-----------------------------------------------
22
 
23
# verilator compilation
24
if [ -d "obj_dir" ];
25
        then
26
        rm -rf obj_dir
27
fi
28
verilator -Wall --cc "../src/LinkRunCCA.v" --exe sim_main.cpp -I"../src"
29
cd obj_dir
30
make -j -f VLinkRunCCA.mk "VLinkRunCCA"
31
cd ..
32
#-----------------------------------------------
33
 
34
# Simulation
35
echo
36
echo "****************************Simulation Start****************************"
37
obj_dir/VLinkRunCCA
38
echo
39
echo "****************************Simulation Ended****************************"
40
#-----------------------------------------------
41
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.