Skip to content

Commit

Permalink
removed extraneous regression_tests.tcl to fit in new format
Browse files Browse the repository at this point in the history
Signed-off-by: andyfox-rushc <[email protected]>
  • Loading branch information
andyfox-rushc committed Dec 21, 2024
2 parents 3e9fa08 + 64073a7 commit b017e97
Show file tree
Hide file tree
Showing 242 changed files with 9,303 additions and 9,667 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ add_subdirectory(test)
target_compile_definitions(openroad PRIVATE GPU)
target_compile_definitions(openroad PRIVATE BUILD_PYTHON)
target_compile_definitions(openroad PRIVATE BUILD_GUI)
target_compile_definitions(openroad PRIVATE ENABLE_CHARTS)

####################################################################

Expand Down
29 changes: 2 additions & 27 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,8 @@ def baseTests(String image) {
currentBuild.result = 'FAILURE';
}
sh label: 'Save ctest results', script: 'tar zcvf results-ctest.tgz build/Testing';
archiveArtifacts artifacts: 'results-ctest.tgz';
}
}
}

base_tests['Unit Tests Tcl'] = {
node {
withDockerContainer(args: '-u root', image: image) {
stage('Setup Tcl Tests') {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
checkout scm;
unstash 'install';
}
stage('Unit Tests TCL') {
try {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 30, unit: 'MINUTES') {
sh label: 'Tcl regression', script: './test/regression';
}
}
} catch (e) {
echo 'Failed regressions';
currentBuild.result = 'FAILURE';
}
sh label: 'Save Tcl results', script: "find . -name results -type d -exec tar zcvf {}.tgz {} ';'";
archiveArtifacts artifacts: '**/results.tgz';
}
sh label: 'Save results', script: "find . -name results -type d -exec tar zcvf {}.tgz {} ';'";
archiveArtifacts artifacts: 'results-ctest.tgz, **/results.tgz';
}
}
}
Expand Down
9 changes: 7 additions & 2 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,19 @@ _installCommonDev() {

# spdlog
spdlogPrefix=${PREFIX:-"/usr/local"}
if [[ ! -d ${spdlogPrefix}/include/spdlog ]]; then
installed_version="none"
if [ -d ${spdlogPrefix}/include/spdlog ]; then
installed_version=`grep "#define SPDLOG_VER_" ${spdlogPrefix}/include/spdlog/version.h | sed 's/.*\s//' | tr '\n' '.' | sed 's/\.$//'`
fi
if [ ${installed_version} != ${spdlogVersion} ]; then
cd "${baseDir}"
git clone --depth=1 -b "v${spdlogVersion}" https://github.com/gabime/spdlog.git
cd spdlog
${cmakePrefix}/bin/cmake -DCMAKE_INSTALL_PREFIX="${spdlogPrefix}" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DSPDLOG_BUILD_EXAMPLE=OFF -B build .
${cmakePrefix}/bin/cmake --build build -j $(nproc) --target install
echo "spdlog ${spdlogVersion} installed (from ${installed_version})."
else
echo "spdlog already installed."
echo "spdlog ${spdlogVersion} already installed."
fi
CMAKE_PACKAGE_ROOT_ARGS+=" -D spdlog_ROOT=$(realpath $spdlogPrefix) "

Expand Down
1 change: 0 additions & 1 deletion include/ord/OpenRoad.hh
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ class OpenRoad
static bool getGPUCompileOption();
static bool getPythonCompileOption();
static bool getGUICompileOption();
static bool getChartsCompileOption();

protected:
~OpenRoad();
Expand Down
2 changes: 1 addition & 1 deletion jenkins/Jenkinsfile.coverage
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ node {

stage('Dynamic Code Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 2, unit: 'HOURS') {
timeout(time: 3, unit: 'HOURS') {
sh './etc/CodeCoverage.sh dynamic';
}
}
Expand Down
31 changes: 30 additions & 1 deletion src/Exception-py.i
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,49 @@
///////////////////////////////////////////////////////////////////////////////

%{
#include <stdlib.h>

#include <boost/stacktrace.hpp>
#include <sstream>

#include "ord/OpenRoad.hh"
#include "utl/Logger.h"
%}

%exception {
try { $function }
catch (std::bad_alloc &) {
fprintf(stderr, "Error: out of memory.");
exit(0);
abort();
}
// This catches std::runtime_error (utl::error) and sta::Exception.
catch (std::exception &excp) {
auto* openroad = ord::OpenRoad::openRoad();
if (openroad != nullptr) {
auto* logger = openroad->getLogger();
if (logger->debugCheck(utl::ORD, "trace", 1)) {
std::stringstream trace;
trace << boost::stacktrace::stacktrace();
logger->report("Stack trace");
logger->report(trace.str());
}
}

PyErr_SetString(PyExc_RuntimeError, excp.what());
SWIG_fail;
}
catch (...) {
auto* openroad = ord::OpenRoad::openRoad();
if (openroad != nullptr) {
auto* logger = openroad->getLogger();
if (logger->debugCheck(utl::ORD, "trace", 1)) {
std::stringstream trace;
trace << boost::stacktrace::stacktrace();
logger->report("Stack trace");
logger->report(trace.str());
}
}

PyErr_SetString(PyExc_Exception, "Unknown exception");
SWIG_fail;
}
Expand Down
20 changes: 19 additions & 1 deletion src/Exception.i
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,34 @@

%{
#include <new>
#include <stdlib.h>

#include <boost/stacktrace.hpp>
#include <sstream>

#include "ord/OpenRoad.hh"
#include "utl/Logger.h"
%}

%exception {
try { $function }
catch (std::bad_alloc &) {
fprintf(stderr, "Error: out of memory.");
exit(1);
abort();
}
// This catches std::runtime_error (utl::error) and sta::Exception.
catch (std::exception &excp) {
auto* openroad = ord::OpenRoad::openRoad();
if (openroad != nullptr) {
auto* logger = openroad->getLogger();
if (logger->debugCheck(utl::ORD, "trace", 1)) {
std::stringstream trace;
trace << boost::stacktrace::stacktrace();
logger->report("Stack trace");
logger->report(trace.str());
}
}

Tcl_ResetResult(interp);
Tcl_AppendResult(interp, excp.what(), nullptr);
return TCL_ERROR;
Expand Down
3 changes: 1 addition & 2 deletions src/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,7 @@ static void showSplash()
ord::OpenRoad::getGitDescribe());
logger->report(
"Features included (+) or not (-): "
"{}Charts {}GPU {}GUI {}Python{}",
ord::OpenRoad::getChartsCompileOption() ? "+" : "-",
"{}GPU {}GUI {}Python{}",
ord::OpenRoad::getGPUCompileOption() ? "+" : "-",
ord::OpenRoad::getGUICompileOption() ? "+" : "-",
ord::OpenRoad::getPythonCompileOption() ? "+" : "-",
Expand Down
5 changes: 0 additions & 5 deletions src/OpenRoad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,4 @@ bool OpenRoad::getGUICompileOption()
return BUILD_GUI;
}

bool OpenRoad::getChartsCompileOption()
{
return ENABLE_CHARTS;
}

} // namespace ord
6 changes: 0 additions & 6 deletions src/OpenRoad.i
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,6 @@ openroad_gui_compiled()
return ord::OpenRoad::getGUICompileOption();
}

const bool
openroad_charts_compiled()
{
return ord::OpenRoad::getChartsCompileOption();
}

void
read_lef_cmd(const char *filename,
const char *lib_name,
Expand Down
35 changes: 19 additions & 16 deletions src/ant/include/ant/AntennaChecker.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#pragma once

#include <map>
#include <mutex>
#include <queue>
#include <set>

Expand Down Expand Up @@ -177,15 +178,12 @@ class AntennaChecker
getViolatedWireLength(odb::dbNet* net, int routing_level);
bool isValidGate(odb::dbMTerm* mterm);
void buildLayerMaps(odb::dbNet* net, LayerToGraphNodes& node_by_layer_map);
void checkNet(odb::dbNet* net,
bool verbose,
bool report_if_no_violation,
std::ofstream& report_file,
odb::dbMTerm* diode_mterm,
float ratio_margin,
int& net_violation_count,
int& pin_violation_count,
Violations& antenna_violations);
int checkNet(odb::dbNet* net,
bool verbose,
bool save_report,
odb::dbMTerm* diode_mterm,
float ratio_margin,
Violations& antenna_violations);
void saveGates(odb::dbNet* db_net,
LayerToGraphNodes& node_by_layer_map,
int node_count);
Expand All @@ -198,13 +196,13 @@ class AntennaChecker
NodeInfo& node_info,
float ratio_margin,
bool verbose,
bool report);
bool report,
ViolationReport& net_report);
void writeReport(std::ofstream& report_file, bool verbose);
void printReport();
int checkGates(odb::dbNet* db_net,
bool verbose,
bool report_if_no_violation,
std::ofstream& report_file,
bool save_report,
odb::dbMTerm* diode_mterm,
float ratio_margin,
GateToLayerToNodeInfo& gate_info,
Expand All @@ -216,23 +214,27 @@ class AntennaChecker
NodeInfo& info,
float ratio_margin,
bool verbose,
bool report);
bool report,
ViolationReport& net_report);
bool checkPSR(odb::dbNet* db_net,
odb::dbTechLayer* tech_layer,
NodeInfo& info,
float ratio_margin,
bool verbose,
bool report);
bool report,
ViolationReport& net_report);
bool checkCAR(odb::dbNet* db_net,
odb::dbTechLayer* tech_layer,
const NodeInfo& info,
bool verbose,
bool report);
bool report,
ViolationReport& net_report);
bool checkCSR(odb::dbNet* db_net,
odb::dbTechLayer* tech_layer,
const NodeInfo& info,
bool verbose,
bool report);
bool report,
ViolationReport& net_report);

odb::dbDatabase* db_{nullptr};
odb::dbBlock* block_{nullptr};
Expand All @@ -243,6 +245,7 @@ class AntennaChecker
std::string report_file_name_;
std::vector<odb::dbNet*> nets_;
std::map<odb::dbNet*, ViolationReport> net_to_report_;
std::mutex map_mutex_;
// consts
static constexpr int max_diode_count_per_gate = 10;
};
Expand Down
Loading

0 comments on commit b017e97

Please sign in to comment.