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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_avnet_lx9microbard/] [synthesis/] [xilinx/] [3_program_fpga.sh] - Blame information for rev 157

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 157 olivier.gi
#!/bin/bash
2
###############################################################################
3
#                                                                             #
4
#                       Xilinx RAM update script for LINUX                    #
5
#                                                                             #
6
###############################################################################
7
 
8
###############################################################################
9
#                            Parameter Check                                  #
10
###############################################################################
11
EXPECTED_ARGS=1
12
if [ $# -ne $EXPECTED_ARGS ]; then
13
    echo ""
14
    echo "ERROR          : wrong number of arguments"
15
    echo "USAGE          : ./3_program_fpga <prom name>"
16
    echo "EXAMPLE        : ./3_program_fpga    leds"
17
    echo ""
18
    echo "AVAILABLE TESTS:"
19
    for fullfile in ./bitstreams/*.mcs ; do
20
        filename=$(basename "$fullfile")
21
        filename="${filename%.*}"
22
        echo "                  - $filename"
23
    done
24
    echo ""
25
    exit 1
26
fi
27
 
28
###############################################################################
29
#                     Check if the required files exist                       #
30
###############################################################################
31
promfile=./bitstreams/$1.mcs;
32
 
33
if [ ! -e $promfile ]; then
34
    echo "Specified PROM file doesn't exist: $promfile"
35
    exit 1
36
fi
37
 
38
###############################################################################
39
#                           Update FPGA Bitstream                             #
40
###############################################################################
41
 
42
# Move to the XFLOW workspace
43
cd ./WORK
44
 
45
# Copy PROM & bitstream in working directory
46
cp -f ../bitstreams/$1.bit .
47
cp -f ../bitstreams/$1.mcs .
48
 
49
# Copy the impact script and update it
50
cp ../scripts/impact_program_fpga.batch ./impact_program_fpga.batch
51
sed -i "s/PROM_NAME/$1/g"  ./impact_program_fpga.batch
52
 
53
# Program FPGA
54
impact -batch ./impact_program_fpga.batch
55
 
56
# Return to the root directory
57
cd ../

powered by: WebSVN 2.1.0

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