4 # ________ _________ ____ / __ \/ ___/
5 # / ___/ _ \/ ___/ __ \/ __ \/ / / /\__ \
6 # / / / __/ /__/ /_/ / / / / /_/ /___/ /
7 # /_/ \___/\___/\____/_/ /_/\____//____/
9 # ======================================================================
12 # author: Christoph RĂ¼thing, University of Paderborn
13 # description: The setup script to generate a complete EDK-Project
14 # from a base design, ther ReconOS components and the
17 # ======================================================================
23 echo "ERROR: No configuration file specified"
27 echo "Generating EDK Projekt ..."
29 # source the specified configuration file
32 echo "ERROR: Configuration file not found"
37 if [ -z "$num_reconf_hwts" ]
42 if [ -z "$num_static_hwts" ]
46 if [ $num_reconf_regions -gt 14 ]
48 echo "WARNING: you have specified more than 14 reconfigurable regions."
49 echo " Since the default ucf contains only presets for 14 reconfigurable regions"
50 echo " you must specify your own area groups."
53 num_hwts
=$
(($num_static_hwts+$num_reconf_regions))
55 echo "Copying base design and ReconOS hardware ..."
57 edk
=edk_
${RECONOS_ARCH}_
${RECONOS_OS}
59 # copy base design and pcores
60 cp -r ${RECONOS}/designs/${RECONOS_ARCH}_${RECONOS_OS}_${base_design} $edk
62 cp -r ${RECONOS}/pcores
/* $edk/pcores
64 echo "Generating ReconOS system ..."
67 find $edk/pcores
-type f
-exec reconos_preproc.sh
{} $num_hwts {} \
;
69 echo "Linking in HWTs ..."
74 for hwt
in $static_hwts
76 ln -sf ..
/..
/${hwt%#*} .
79 for hwt
in $reconf_hwts
81 ln -sf ..
/..
/${hwt%#*} .
89 mv system.mhs system.mhs.orig
91 if [ $num_reconf_hwts -ne 0 ]
94 python
${RECONOS}/tools
/python
/mhsaddhwts.py
"-reconf" $RECONOS_ARCH system.mhs.orig
$num_static_hwts $num_reconf_regions $static_hwts "reconos_hwt_idle_v1_00_a" > system_static.mhs
95 ln -s system_static.mhs system.mhs
97 for hwt
in $reconf_hwts
99 python
${RECONOS}/tools
/python
/mhsaddhwts.py
"-reconf" $RECONOS_ARCH system.mhs.orig
$num_static_hwts $num_reconf_regions $static_hwts $hwt > system_reconf_
$hwt.mhs
103 for i
in $
(seq 0 $
(($num_reconf_regions-1)))
105 sed -i "s/#INST \"hwt_reconf_$i\"/INST \"hwt_reconf_$i\"/" data
/system.ucf
106 sed -i "s/#AREA_GROUP \"pblock_hwt_reconf_$i\"/AREA_GROUP \"pblock_hwt_reconf_$i\"/" data
/system.ucf
112 python
${RECONOS}/tools
/python
/mhsaddhwts.py
$RECONOS_ARCH system.mhs.orig
$num_static_hwts 0 $static_hwts > system.mhs
114 python
${RECONOS}/tools
/python
/mhsaddhwts.py
"-nommu" $RECONOS_ARCH system.mhs.orig
$num_static_hwts 0 $static_hwts > system.mhs