The implemententation is derived from GSL
Version: 2.5
Link to zip archive gsl-2.5.tar.gz
Link to GSL documentation
Current implementation is based on ev_runtime
build framework
- RHEL6.6/CentOS
- Metaware EV with nSIM64
- gcc v6.2.0
- CMake v3.8 or higher
- Make v3.82 or higher
gsl-for-synopsys
reuses the following components of ev_runtime
:
- build framework
- HW configurations
- prebuilt libraries:
mwlib, evthreads and crt
The project contains libraries with test applications, example applications and configuration code
The configuration code structure is similar to ev_runtime
The project includes a set of libraries. Each library has:
-
separate folder
Ex: blas, block and so on -
C library code and C test application code
-
build scripts
Makefile
CMakeLists.txt
cmake/<library_name>.cmake - CMake library package -
test part [optional] C test code is usually placed in test.c file
build scripts are placed in test sub-folder like
cblas/test/(Makefile and CMakeLists.txt)
Note: test application is not a library so it has no *.cmake
The project includes a set of examples.
- Descriptions of all examples are located in one folder doc
- C code of all examples are located in sub-folder - doc/examples
- Reference outputs of all examples are located in sub-folder - doc/examples
- Each example has a sub-folder for build scripts like:
doc/examples/blas/(Makefile and CMakeLists.txt)
- config folder
The folder contains general Make/CMake scripts for libraries, library tests and examples - install folder
It's generated during compilation. It is used for same purpose asev_runtime
install folder:
keeps C headers, built libraries and CMake packages - include folder
Extra CMake package. It is used to ensure consistency withev_runtime
code/build structure.
During compilation it collects all common C headers and places them into install/include folder - top Makefile file
The file contains of all pre-requisites targets and general targets: install/all/build/clean for libraries, library tests and examples - setup.sh
The script initializes and checks the environment
usage:
source setup.sh
or
source setup.sh -check
- README.md
This file. - GSL original build system scripts
Original GSL build system is based on Autoconf. There are a lot of configuration files with extensions
*.in
,*.am
. They are not used in this package and are left in the repo for information purpose
There are also several original BASH scripts which are not used.
- Environment variable
EV_GSL_HOME
should be set and point to topgsl-for-synopsys
folder - C define
SYNOPSYS_ARC_HSEV
is used in patched code places - Inlining is activated. See
HAVE_INLINE
in config/cmake/Modules/gsl.cmake - GSL float implementations
Different platforms could supportfloat
different ways. Functiongsl_ieee_set_mode()
is used for setup float.
Dummy function for ARC is placed here:
/gsl-for-synopsys/ieee-utils/fp-arc_ev.c
It is assumed that the developer already has pre-built ev_runtime
with required HW configurations.
cd <your_dir>
git clone git@github.com:foss-for-synopsys-dwc-arc-processors/gsl-for-synopsys.git
cd gsl-for-synopsys
source ./setup.sh [-check]
# Build and run system is same as in ev_runtime
# Developers can use Makefile install
target to build all libraries, tests and examples
# parallel compilation is supported by -jN
Makefile option,
# where N
is number of CPUs
# Ex: build Linux native with Release on 8 cores
make install -j8 EVSS_CFG=ev_native EVSS_DBG=0
# Ex: build ARC with Debug
make install -j8 EVSS_CFG=EV61_full_cnn880_demo_haps80_2.12a EVSS_DBG=1
cd gsl-for-synopsys/cblas/test
# you should see a folder like **build_ev_native_release**
ls
# run tests on Linux
make run EVSS_CFG=ev_native EVSS_DBG=0
# run tests on ARC nSIM
make run EVSS_CFG=EV61_full_cnn880_demo_haps80_2.12a EVSS_DBG=1
# run on HAPS
make haps-load haps-reset run EVSS_CFG=EV61_full_cnn880_demo_haps80_2.12a EVSS_DBG=1 HAPS=1
cd gsl-for-synopsys/doc/examples/blas
make run EVSS_CFG=ev_native EVSS_DBG=0
and same steps as described in cblas
library test example above.