Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
fanghuaqi committed Mar 30, 2022
2 parents a077984 + 22e72aa commit 9d82143
Show file tree
Hide file tree
Showing 185 changed files with 1,209 additions and 386 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Library
*.o.*
logs*
log*
Log*
*.map
*.srec
*.verilog
*.log
67 changes: 63 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variables:
NUCLEI_SDK: git@gito:software/library/nuclei-sdk.git
SDK_BRANCH: dev_xlspike_next
SOC: xlspike
SDK_BRANCH: develop
SOC: demosoc
RUNTARGET: qemu
IMAGE: rego.corp.nucleisys.com/software/sdkbuild
IMAGE_TAG: latest
Expand All @@ -19,8 +19,12 @@ stages:

build_doc:
stage: build
interruptible: true
retry: 1
only:
refs:
- master
- develop
changes:
- NMSIS/doc/source/**/**/**/*
- .gitlab-ci.yml
Expand All @@ -36,6 +40,7 @@ build_doc:
before_script:
- apt update
- apt install -y doxygen python3 make latexmk texlive-base texlive-latex-extra python3-pip
- pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
- pip3 install -r NMSIS/doc/requirements.txt
script:
- cd NMSIS/doc
Expand All @@ -48,7 +53,12 @@ build_doc:

build_library:
stage: build
interruptible: true
retry: 1
only:
refs:
- master
- develop
artifacts:
when: always
name: "nmsis_library-${CI_COMMIT_SHA::8}"
Expand All @@ -68,7 +78,12 @@ build_library:

build_align_library:
stage: build
interruptible: true
retry: 1
only:
refs:
- master
- develop
artifacts:
when: always
name: "nmsis_align_library-${CI_COMMIT_SHA::8}"
Expand All @@ -86,6 +101,12 @@ build_align_library:

.test_job_template: &test_job_template_default
stage: test
timeout: 4h
interruptible: true
only:
refs:
- master
- develop
before_script:
# prepare for docker ssh environment
## https://docs.gitlab.com/ee/ci/ssh_keys/#ssh-keys-when-using-the-docker-executor
Expand All @@ -99,7 +120,10 @@ build_align_library:
# https://serverfault.com/questions/469052/ssh-failing-from-script-working-on-command-line-git
- ssh-keyscan gito > ~/.ssh/known_hosts
- apt install -y python3 python3-pip
- pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
- python3 -m pip install --upgrade pip
- pip3 install prettytable==2.1.0 psutil==5.8.0 pyserial==3.5 markdown
- export SDK_COPY_OBJECTS="elf,map"
dependencies:
- build_library

Expand All @@ -114,14 +138,17 @@ test_nn_library:
script:
- git clone -b $SDK_BRANCH $NUCLEI_SDK NMSIS/nuclei_sdk
- export NUCLEI_SDK_ROOT=$(readlink -f NMSIS/nuclei_sdk)
- pip3 install -r $NUCLEI_SDK_ROOT/tools/scripts/requirements.txt
- export NUCLEI_SDK_NMSIS=$(readlink -f NMSIS)
- export NMSIS_LOGS=$NUCLEI_SDK_NMSIS/Logs
# change ilm/dlm size from 64K to 1M for demosoc
- sed -i "s/64K/1M/g" $NUCLEI_SDK_ROOT/SoC/demosoc/Board/nuclei_fpga_eval/Source/GCC/gcc_demosoc_ilm.ld
- mkdir $NMSIS_LOGS
- source NMSIS/env.sh
- export SILENT=1
- cd NMSIS
- make gen_nnref_lib
- python3 $NUCLEI_SDK_ROOT/tools/scripts/nsdk_cli/nsdk_bench.py --appcfg Scripts/Runner/nmsis_nn.json --logdir $NMSIS_LOGS/nmsis_nn --parallel=-j --run_target $RUNTARGET --run
- python3 $NUCLEI_SDK_ROOT/tools/scripts/nsdk_cli/nsdk_bench.py --appcfg Scripts/Runner/nmsis_nn.json --logdir $NMSIS_LOGS/nmsis_nn --parallel=-j --make_options "SIMU=$RUNTARGET" --run_target $RUNTARGET --run

test_dsp_library:
<<: *test_job_template_default
Expand All @@ -134,16 +161,24 @@ test_dsp_library:
script:
- git clone -b $SDK_BRANCH $NUCLEI_SDK NMSIS/nuclei_sdk
- export NUCLEI_SDK_ROOT=$(readlink -f NMSIS/nuclei_sdk)
- pip3 install -r $NUCLEI_SDK_ROOT/tools/scripts/requirements.txt
- export NUCLEI_SDK_NMSIS=$(readlink -f NMSIS)
- export NMSIS_LOGS=$NUCLEI_SDK_NMSIS/Logs
# change ilm/dlm size from 64K to 1M for demosoc
- sed -i "s/64K/1M/g" $NUCLEI_SDK_ROOT/SoC/demosoc/Board/nuclei_fpga_eval/Source/GCC/gcc_demosoc_ilm.ld
- mkdir $NMSIS_LOGS
- source NMSIS/env.sh
- export SILENT=1
- cd NMSIS
- python3 $NUCLEI_SDK_ROOT/tools/scripts/nsdk_cli/nsdk_bench.py --appcfg Scripts/Runner/nmsis_dsp.json --logdir $NMSIS_LOGS/nmsis_dsp --parallel=-j --run_target $RUNTARGET --run
- python3 $NUCLEI_SDK_ROOT/tools/scripts/nsdk_cli/nsdk_bench.py --appcfg Scripts/Runner/nmsis_dsp.json --logdir $NMSIS_LOGS/nmsis_dsp --parallel=-j --make_options "SIMU=$RUNTARGET" --run_target $RUNTARGET --run

release_benchmark:
stage: release
interruptible: true
only:
refs:
- master
- develop
artifacts:
name: "nmsis_test_log-${CI_COMMIT_SHA::8}"
paths:
Expand All @@ -155,6 +190,30 @@ release_benchmark:
script:
- ls -lh NMSIS/Logs

release_nmsis:
stage: release
interruptible: true
only:
refs:
- master
- develop
artifacts:
name: "nmsis_release-${CI_COMMIT_SHA::8}"
paths:
- NMSIS/Core
- NMSIS/DSP/Include
- NMSIS/DSP/PrivateInclude
- NMSIS/NN/Include
- NMSIS/Library
- NMSIS/npk.yml
- NMSIS/build.mk
expire_in: 2 day
dependencies:
- build_library
script:
- ls -lh NMSIS/Library
- cat NMSIS/npk.yml

deploy_website:
stage: release
only:
Expand Down
25 changes: 13 additions & 12 deletions Device/Nuclei/NUCLEI_N/Source/GCC/gcc_NUCLEI_N.ld
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ SECTIONS

.ialign :
{
. = ALIGN(4);
/* Create a section label as _ilm which located at flash */
PROVIDE( _ilm = . );
} >flash AT>flash
Expand Down Expand Up @@ -170,13 +171,6 @@ SECTIONS
KEEP (*(SORT_NONE(.fini)))
} >flash AT>flash

. = ALIGN(4);

PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
PROVIDE( _eilm = . );

.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
Expand Down Expand Up @@ -233,6 +227,11 @@ SECTIONS
KEEP (*(.dtors))
} >flash AT>flash

PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
PROVIDE (_eilm = .);

.lalign :
{
. = ALIGN(4);
Expand Down Expand Up @@ -267,8 +266,6 @@ SECTIONS
PROVIDE( _edata = . );
PROVIDE( edata = . );

. = ALIGN(8);

PROVIDE( _fbss = . );
PROVIDE( __bss_start = . );

Expand All @@ -279,7 +276,12 @@ SECTIONS
PROVIDE( __tls_end = . );
} >ram AT>ram

.bss (NOLOAD) :
.tbss_space (NOLOAD) : ALIGN(8)
{
. = . + SIZEOF(.tbss);
} >ram AT>ram

.bss (NOLOAD) : ALIGN(8)
{
*(.sbss*)
*(.gnu.linkonce.sb.*)
Expand All @@ -289,7 +291,6 @@ SECTIONS
. = ALIGN(4);
} >ram AT>ram

. = ALIGN(16);
PROVIDE( _end = . );
PROVIDE( end = . );

Expand All @@ -298,7 +299,7 @@ SECTIONS
* 2. __heap_start and __heap_end symbol need to be defined
* 3. reserved at least __HEAP_SIZE space for heap
*/
.heap (NOLOAD) :
.heap (NOLOAD) : ALIGN(16)
{
. = ALIGN(16);
PROVIDE( __heap_start = . );
Expand Down
47 changes: 18 additions & 29 deletions Device/Nuclei/NUCLEI_N/Source/GCC/startup_NUCLEI_N.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,7 @@

.weak eclic_msip_handler
.weak eclic_mtip_handler
.weak eclic_irq19_handler
.weak eclic_irq20_handler
.weak eclic_irq21_handler
.weak eclic_irq22_handler
.weak eclic_irq23_handler
.weak eclic_irq24_handler
.weak eclic_irq25_handler
.weak eclic_irq26_handler
.weak eclic_irq27_handler
.weak eclic_irq28_handler
.weak eclic_irq29_handler
.weak eclic_irq30_handler
.weak eclic_irq31_handler
/* TODO: add vendor interrupt handlers */

.globl vector_base
.type vector_base, @object
Expand Down Expand Up @@ -83,22 +71,23 @@ vector_base:
DECLARE_INT_HANDLER default_intexc_handler /* 16: Reserved */
DECLARE_INT_HANDLER default_intexc_handler /* 17: Reserved */
DECLARE_INT_HANDLER default_intexc_handler /* 18: Reserved */
DECLARE_INT_HANDLER eclic_irq19_handler /* 19: Interrupt 19 */

DECLARE_INT_HANDLER eclic_irq20_handler /* 20: Interrupt 20 */
DECLARE_INT_HANDLER eclic_irq21_handler /* 21: Interrupt 21 */
DECLARE_INT_HANDLER eclic_irq22_handler /* 22: Interrupt 22 */
DECLARE_INT_HANDLER eclic_irq23_handler /* 23: Interrupt 23 */

DECLARE_INT_HANDLER eclic_irq24_handler /* 24: Interrupt 24 */
DECLARE_INT_HANDLER eclic_irq25_handler /* 25: Interrupt 25 */
DECLARE_INT_HANDLER eclic_irq26_handler /* 26: Interrupt 26 */
DECLARE_INT_HANDLER eclic_irq27_handler /* 27: Interrupt 27 */

DECLARE_INT_HANDLER eclic_irq28_handler /* 28: Interrupt 28 */
DECLARE_INT_HANDLER eclic_irq29_handler /* 29: Interrupt 29 */
DECLARE_INT_HANDLER eclic_irq30_handler /* 30: Interrupt 30 */
DECLARE_INT_HANDLER eclic_irq31_handler /* 31: Interrupt 31 */
/* TODO: Adjust Vendor Defined External Interrupts */
DECLARE_INT_HANDLER default_intexc_handler /* 19: Interrupt 19 */

DECLARE_INT_HANDLER default_intexc_handler /* 20: Interrupt 20 */
DECLARE_INT_HANDLER default_intexc_handler /* 21: Interrupt 21 */
DECLARE_INT_HANDLER default_intexc_handler /* 22: Interrupt 22 */
DECLARE_INT_HANDLER default_intexc_handler /* 23: Interrupt 23 */

DECLARE_INT_HANDLER default_intexc_handler /* 24: Interrupt 24 */
DECLARE_INT_HANDLER default_intexc_handler /* 25: Interrupt 25 */
DECLARE_INT_HANDLER default_intexc_handler /* 26: Interrupt 26 */
DECLARE_INT_HANDLER default_intexc_handler /* 27: Interrupt 27 */

DECLARE_INT_HANDLER default_intexc_handler /* 28: Interrupt 28 */
DECLARE_INT_HANDLER default_intexc_handler /* 29: Interrupt 29 */
DECLARE_INT_HANDLER default_intexc_handler /* 30: Interrupt 30 */
DECLARE_INT_HANDLER default_intexc_handler /* 31: Interrupt 31 */


/*** Startup Code Section ***/
Expand Down
25 changes: 13 additions & 12 deletions Device/Nuclei/NUCLEI_NX/Source/GCC/gcc_NUCLEI_NX.ld
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ SECTIONS

.ialign :
{
. = ALIGN(4);
/* Create a section label as _ilm which located at flash */
PROVIDE( _ilm = . );
} >flash AT>flash
Expand Down Expand Up @@ -170,13 +171,6 @@ SECTIONS
KEEP (*(SORT_NONE(.fini)))
} >flash AT>flash

. = ALIGN(4);

PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
PROVIDE( _eilm = . );

.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
Expand Down Expand Up @@ -233,6 +227,11 @@ SECTIONS
KEEP (*(.dtors))
} >flash AT>flash

PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
PROVIDE (_eilm = .);

.lalign :
{
. = ALIGN(4);
Expand Down Expand Up @@ -267,8 +266,6 @@ SECTIONS
PROVIDE( _edata = . );
PROVIDE( edata = . );

. = ALIGN(8);

PROVIDE( _fbss = . );
PROVIDE( __bss_start = . );

Expand All @@ -279,7 +276,12 @@ SECTIONS
PROVIDE( __tls_end = . );
} >ram AT>ram

.bss (NOLOAD) :
.tbss_space (NOLOAD) : ALIGN(8)
{
. = . + SIZEOF(.tbss);
} >ram AT>ram

.bss (NOLOAD) : ALIGN(8)
{
*(.sbss*)
*(.gnu.linkonce.sb.*)
Expand All @@ -289,7 +291,6 @@ SECTIONS
. = ALIGN(4);
} >ram AT>ram

. = ALIGN(16);
PROVIDE( _end = . );
PROVIDE( end = . );

Expand All @@ -298,7 +299,7 @@ SECTIONS
* 2. __heap_start and __heap_end symbol need to be defined
* 3. reserved at least __HEAP_SIZE space for heap
*/
.heap (NOLOAD) :
.heap (NOLOAD) : ALIGN(16)
{
. = ALIGN(16);
PROVIDE( __heap_start = . );
Expand Down
Loading

0 comments on commit 9d82143

Please sign in to comment.