@@ -22,8 +22,8 @@ properties([parameters([
22
22
booleanParam(name : ' debug_fdf_uram' , defaultValue : false , description : ' Debug the FDF for cl_uram_example.' ),
23
23
booleanParam(name : ' fdf_ddr_comb' , defaultValue : false , description : ' run FDF for cl_dram_dma ddr combinations.' ),
24
24
booleanParam(name : ' disable_runtime_tests' , defaultValue : false , description : ' Option to disable runtime tests.' ),
25
- booleanParam(name : ' use_test_ami' , defaultValue : false , description : ' This option asks for the test AMI from Jenkins' )
26
-
25
+ booleanParam(name : ' use_test_ami' , defaultValue : false , description : ' This option asks for the test AMI from Jenkins' ),
26
+ booleanParam( name : ' internal_simulations ' , defaultValue : false , description : ' This option asks for default agent from Jenkins ' )
27
27
])])
28
28
29
29
// =============================================================================
@@ -133,6 +133,19 @@ def sdaccel_example_default_map = [ '2017.4' : [ 'Hello_World_1ddr': 'SDAccel/ex
133
133
]
134
134
]
135
135
136
+ def simulator_tool_default_map = [ ' 2017.4' : [ ' vivado' : ' xilinx/SDx/2017.4_04112018' ,
137
+ ' vcs' : ' vcs-mx/L-2016.06-1' ,
138
+ ' questa' : ' questa/10.6b' ,
139
+ ' ies' : ' incisive/15.20.063'
140
+ ],
141
+ ' 2018.2' : [ ' vivado' : ' xilinx/SDx/2018.2_06142018' ,
142
+ ' vcs' : ' vcs-mx/N-2017.12-SP1-1' ,
143
+ ' questa' : ' questa/10.6c_1' ,
144
+ ' ies' : ' incisive/15.20.063'
145
+ ]
146
+ ]
147
+
148
+
136
149
// Get serializable entry set
137
150
@NonCPS def entrySet (m ) {m. collect {k , v -> [key : k, value : v]}}
138
151
@@ -150,6 +163,10 @@ def get_task_label(Map args=[ : ]) {
150
163
echo " Test AMI Requested"
151
164
task_label = task_label + ' _test'
152
165
}
166
+ if (params. internal_simulations) {
167
+ echo " internal simulation agent requested"
168
+ task_label = ' f1'
169
+ }
153
170
154
171
echo " Label Requested: $task_label "
155
172
return task_label
@@ -341,27 +358,56 @@ if (test_fpga_tools) {
341
358
}
342
359
}
343
360
361
+
344
362
if (test_sims) {
345
363
all_tests[' Run Sims' ] = {
346
364
stage(' Run Sims' ) {
347
365
def cl_names = [' cl_uram_example' , ' cl_dram_dma' , ' cl_hello_world' ]
366
+ def simulators = [' vivado' ]
348
367
def sim_nodes = [:]
368
+ if (params. internal_simulations) {
369
+ simulators = [' vcs' , ' ies' , ' questa' , ' vivado' ]
370
+ }
349
371
for (x in cl_names) {
350
372
for (y in xilinx_versions) {
351
- String xilinx_version = y
352
- String cl_name = x
353
- String node_name = " Sim ${ cl_name} ${ xilinx_version} "
354
- String key = " test_${ cl_name} __"
355
- String report_file = " test_sims_${ cl_name} _${ xilinx_version} .xml"
356
- sim_nodes[node_name] = {
373
+ for ( z in simulators) {
374
+ String xilinx_version = y
375
+ String cl_name = x
376
+ String simulator = z
377
+ String node_name = " Sim ${ cl_name} ${ xilinx_version} "
378
+ String key = " test_${ cl_name} __"
379
+ String report_file = " test_sims_${ cl_name} _${ xilinx_version} .xml"
380
+ def tool_module_map = simulator_tool_default_map. get(xilinx_version)
381
+ String vcs_module = tool_module_map. get(' vcs' )
382
+ String questa_module = tool_module_map. get(' questa' )
383
+ String ies_module = tool_module_map. get(' ies' )
384
+ String vivado_module = tool_module_map. get(' vivado' )
385
+ if (params. internal_simulations) {
386
+ report_file = " test_sims_${ cl_name} _${ xilinx_version} _${ simulator} .xml"
387
+ }
388
+ sim_nodes[node_name] = {
357
389
node(get_task_label(task : ' simulation' , xilinx_version : xilinx_version)) {
358
390
checkout scm
359
391
try {
360
- sh """
361
- set -e
362
- source $WORKSPACE /shared/tests/bin/setup_test_hdk_env.sh
363
- python2.7 -m pytest -v $WORKSPACE /hdk/tests/simulation_tests/test_sims.py -k \" ${ key} \" --junit-xml $WORKSPACE /${ report_file}
364
- """
392
+ if (params. internal_simulations) {
393
+ sh """
394
+ set -e
395
+ module purge
396
+ module load python/2.7.9
397
+ module load ${ vivado_module}
398
+ module load ${ vcs_module}
399
+ module load ${ questa_module}
400
+ module load ${ ies_module}
401
+ source $WORKSPACE /hdk_setup.sh
402
+ python2.7 -m pytest -v $WORKSPACE /hdk/tests/simulation_tests/test_sims.py -k \" ${ key} \" --junit-xml $WORKSPACE /${ report_file} --Simulator ${ simulator}
403
+ """
404
+ } else {
405
+ sh """
406
+ set -e
407
+ source $WORKSPACE /shared/tests/bin/setup_test_hdk_env.sh
408
+ python2.7 -m pytest -v $WORKSPACE /hdk/tests/simulation_tests/test_sims.py -k \" ${ key} \" --junit-xml $WORKSPACE /${ report_file} --Simulator ${ simulator}
409
+ """
410
+ }
365
411
} catch (exc) {
366
412
echo " ${ node_name} failed: archiving results"
367
413
archiveArtifacts artifacts : " hdk/cl/examples/${ cl_name} /verif/sim/**" , fingerprint : true
@@ -377,6 +423,7 @@ if (test_sims) {
377
423
}
378
424
}
379
425
}
426
+ }
380
427
}
381
428
parallel sim_nodes
382
429
}
0 commit comments