From f6875bad07780e66c712a885cab6ee56a49a1ba2 Mon Sep 17 00:00:00 2001 From: Radek Isa Date: Tue, 19 Nov 2024 12:36:37 +0100 Subject: [PATCH 1/4] feat(ver-pcie): add clone method to configuration for pcie agents --- comp/ver/pcie/ifg_setup.sv | 72 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/comp/ver/pcie/ifg_setup.sv b/comp/ver/pcie/ifg_setup.sv index 173493936..48283dc8a 100644 --- a/comp/ver/pcie/ifg_setup.sv +++ b/comp/ver/pcie/ifg_setup.sv @@ -14,6 +14,20 @@ class ifg_config_setup; int unsigned ifg_low = 0; int unsigned ifg_high = 18; + virtual function ifg_config_setup clone(); + ifg_config_setup ret = new(); + this.copy(ret); + return ret; + endfunction + + function void copy(ifg_config_setup cl); + cl.rand_count = this.rand_count; + cl.ifg_enabled = this.ifg_enabled; + cl.ifg_disabled = this.ifg_disabled; + cl.ifg_low = this.ifg_low; + cl.ifg_high = this.ifg_high; + endfunction + function void display(string prefix = ""); $write("=================================================\n"); $write("== %s\n", prefix); @@ -38,6 +52,18 @@ class ifg_config_setup_slow extends ifg_config_setup; rand_rand_count inside {[rand_count_min:rand_count_max]}; }; + virtual function ifg_config_setup clone(); + ifg_config_setup_slow ret = new(); + this.copy(ret); + return ret; + endfunction + + function void copy(ifg_config_setup_slow cl); + super.copy(cl); + cl.rand_count_min = this.rand_count_min; + cl.rand_count_max = this.rand_count_max; + endfunction + function void post_randomize(); this.rand_count = rand_rand_count; this.ifg_enabled = 90; @@ -59,6 +85,18 @@ class ifg_config_setup_fast extends ifg_config_setup; rand_rand_count inside {[rand_count_min:rand_count_max]}; }; + virtual function ifg_config_setup clone(); + ifg_config_setup_fast ret = new(); + this.copy(ret); + return ret; + endfunction + + function void copy(ifg_config_setup_fast cl); + super.copy(cl); + cl.rand_count_min = this.rand_count_min; + cl.rand_count_max = this.rand_count_max; + endfunction + function void post_randomize(); this.rand_count = rand_rand_count; this.ifg_enabled = 0; @@ -104,6 +142,25 @@ class ifg_config_setup_rand extends ifg_config_setup; rand_ifg_high inside {[ifg_high_min:ifg_high_max]}; }; + virtual function ifg_config_setup clone(); + ifg_config_setup_rand ret = new(); + this.copy(ret); + return ret; + endfunction + + function void copy(ifg_config_setup_rand cl); + cl.ifg_enabled_min = this.ifg_enabled_min; + cl.ifg_enabled_max = this.ifg_enabled_max; + cl.ifg_disabled_min = this.ifg_disabled_min; + cl.ifg_disabled_max = this.ifg_disabled_max; + cl.ifg_low_min = this.ifg_low_min; + cl.ifg_low_max = this.ifg_low_max; + cl.ifg_high_min = this.ifg_high_min; + cl.ifg_high_max = this.ifg_high_max; + cl.rand_count_min = this.rand_count_min; + cl.rand_count_max = this.rand_count_max; + endfunction + function void post_randomize(); this.rand_count = rand_rand_count; this.ifg_enabled = rand_ifg_enabled; @@ -202,6 +259,21 @@ class ifg_config_setup_lib extends ifg_config_setup; IFG_RAND_SLOW :/ dist_rand_slow, IFG_RAND_FAST :/ dist_rand_fast, IFG_RAND_LONG_SPACES :/ dist_rand_long_spaces}; }; + virtual function ifg_config_setup clone(); + ifg_config_setup_lib ret = new(); + this.copy(ret); + return ret; + endfunction + + function void copy(ifg_config_setup_lib cl); + cl.dist_slow = this.dist_slow; + cl.dist_fast = this.dist_fast; + cl.dist_rand_slow = this.dist_rand_slow; + cl.dist_rand_medium = this.dist_rand_medium; + cl.dist_rand_fast = this.dist_rand_fast; + cl.dist_rand_long_spaces = this.dist_rand_long_spaces; + endfunction + function void post_randomize(); assert(ifg[ifg_type].randomize()); this.rand_count = ifg[ifg_type].rand_count; From 63b58df3fc4e62ab3d9d966603f6d8c042cb3023 Mon Sep 17 00:00:00 2001 From: Radek Isa Date: Tue, 3 Dec 2024 13:55:23 +0100 Subject: [PATCH 2/4] feat(multiver): print set combination when dry run is set --- build/scripts/multi_ver/multi_ver.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build/scripts/multi_ver/multi_ver.py b/build/scripts/multi_ver/multi_ver.py index 918c1034b..2f506d44e 100644 --- a/build/scripts/multi_ver/multi_ver.py +++ b/build/scripts/multi_ver/multi_ver.py @@ -199,12 +199,13 @@ def run_modelsim(fdo_file, test_name, manual=False, gui=False, coverage=False, e comb_name = " ".join(comb) print(f"Running combination: {key} ({comb_name})") - result = run_modelsim(args.fdo_file, f'{test_name_prefix}{key}', coverage=args.coverage, env=env) - if result == 0: # detect failure - print(f"Run SUCCEEDED ({test_name_prefix}{key})") - else: - print(f"Run FAILED ({test_name_prefix}{key})") - FAIL = True + if (not args.dry_run): + result = run_modelsim(args.fdo_file, f'{test_name_prefix}{key}', coverage=args.coverage, env=env) + if result == 0: # detect failure + print(f"Run SUCCEEDED ({test_name_prefix}{key})") + else: + print(f"Run FAILED ({test_name_prefix}{key})") + FAIL = True # backup transcript # system("cp transcript transcript_"+"_".join(c)) @@ -226,8 +227,8 @@ def run_modelsim(fdo_file, test_name, manual=False, gui=False, coverage=False, e SETTING = create_setting_from_combination(SETTINGS, test_setings) env = apply_setting(args.test_pkg_file, SETTING, PKG_MOD_SED) + print("Running combination: " + " ".join(test_setings)) if (not args.dry_run): - print("Running combination: " + " ".join(test_setings)) result = run_modelsim(args.fdo_file, f'{test_name_prefix}{test_name}', True, (not args.command_line), coverage=args.coverage, env=env) if (result == 0): # detect failure print("Run SUCCEEDED (" + " ".join(test_setings) + ")") From ad8da4d7cd0c7c441bb99c82a2291e9c1ee066ac Mon Sep 17 00:00:00 2001 From: Radek Isa Date: Mon, 9 Dec 2024 12:19:03 +0100 Subject: [PATCH 3/4] feat(dma-medusa-ver): add test with parameter combination for current card --- tests/jenkins/ver_dma_medusa_new.jenkins | 81 ++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 tests/jenkins/ver_dma_medusa_new.jenkins diff --git a/tests/jenkins/ver_dma_medusa_new.jenkins b/tests/jenkins/ver_dma_medusa_new.jenkins new file mode 100644 index 000000000..499a46309 --- /dev/null +++ b/tests/jenkins/ver_dma_medusa_new.jenkins @@ -0,0 +1,81 @@ +/* + * ver_dma_medusa.jenkins: Jenkins configuration script + * Copyright (C) 2021 CESNET z. s. p. o. + * Author(s): Jakub Cabal + */ + +// ///////////////////////////////////////////////////////////////////////////// +// Add engines for automatic Jenkins verifications into the following list +// FORMAT: +// [ 'name' , 'path_to_ver' , 'fdo_file.fdo' , 'test_pkg.sv/.vhd' , 'settings.py' ] +def COMPONENTS = [\ + ['Basic Tests' , 'extra/dma-medusa/ver' , 'top_level.fdo' , 'tbench/test_pkg.sv' , 'ver_setings_new.py' ],\ +] +// ///////////////////////////////////////////////////////////////////////////// + +library 'liberouter' + +// Set triggering only once every 2 days +properties([ + pipelineTriggers([cron('H H(0-2) */2 * *')]) +]) + +// Jenkins configuration for multiple modules +node('preklad') { + lock(label:"resources-${env.NODE_NAME}", quantity: 1) { + // Clean old builds + cleanBuilds() + + // fetch sources from GIT + checkout scm + // clean artifacts possibly left by previous builds + sh "git clean -df" + + def failed = [] + // run verification of every component + for(c in COMPONENTS) { + // parse + def name = c[0] + def path = c[1] + def fdo = c[2] + def pkg = c[3] + def settings = c[4] + def repo_root = pwd() + def multi_ver = "$repo_root/build/scripts/multi_ver/multi_ver.py" + // exec vsim + try { // try-catch is a hack to continue even after the first failed verification + timeout(time: 12, unit: 'HOURS') { + stage("$name") { + dir("$path") { + sh "python3 $multi_ver -p \"$name\" $fdo $pkg $settings" + } + } + } + } catch(err) { + currentBuild.result = 'FAILURE' // still propagate failure status to Jenkins + failed.add("$name") + } finally { // collect interesting files + archiveArtifacts "$path/transcript*" // verification log + } + } + + // send out emails if failure is detected + if(currentBuild.result == "FAILURE") { + println "FAILED on components: ${failed}." + emailext \ + recipientProviders: [culprits(), developers()], + to: 'cabal@cesnet.cz, isa@cesnet.cz', + subject: "[Jenkins] ${currentBuild.currentResult} ${env.JOB_NAME} #${currentBuild.number}", + body: """\ + The build of the repository ${env.JOB_NAME} #${currentBuild.number} ends up with status ${currentBuild.currentResult} on components: ${failed}. You can find build log in the attachments. + + For more details see ${env.BUILD_URL}. + + Yours sincerely + Jenkins\ + """.stripIndent(), + attachLog: true, + compressLog: true + } + } +} From d4d328c55ea2fddc7f53f56fa07f64293f5d5984 Mon Sep 17 00:00:00 2001 From: Jakub Cabal Date: Tue, 10 Dec 2024 12:12:37 +0100 Subject: [PATCH 4/4] chore(NDK): update DMA Medusa submodule --- extra/dma-medusa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/dma-medusa b/extra/dma-medusa index 9aebc29ae..3ce18568f 160000 --- a/extra/dma-medusa +++ b/extra/dma-medusa @@ -1 +1 @@ -Subproject commit 9aebc29ae3d881561041e9608b08e234a3bb3c27 +Subproject commit 3ce18568f1d76685dc8cb9a529d2226c28854508