Skip to content

Commit

Permalink
Merge branch 'master' into mpl2-constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
AcKoucher committed Nov 21, 2024
2 parents b167f22 + c00d748 commit ff00b88
Show file tree
Hide file tree
Showing 144 changed files with 4,079 additions and 1,386 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ project(OpenROAD VERSION 1
)

set(OPENROAD_HOME ${PROJECT_SOURCE_DIR})
set(OPENROAD_SHARE ${CMAKE_INSTALL_PREFIX}/share/openroad)

# Default c++ standard used unless otherwise specified in target_compile_features.
set(CMAKE_CXX_STANDARD 17 CACHE STRING "the C++ standard to use for this project")
Expand Down Expand Up @@ -178,13 +179,15 @@ target_compile_definitions(openroad PRIVATE ENABLE_CHARTS)

# Build man pages (Optional)

# Use the processor_count command to get the number of cores
include(ProcessorCount)
ProcessorCount(PROCESSOR_COUNT)
message("Number of processor cores: ${PROCESSOR_COUNT}")

option(BUILD_MAN "Enable building man pages" OFF)
if(BUILD_MAN)
message(STATUS "man is enabled")

# Use the processor_count command to get the number of cores
include(ProcessorCount)
ProcessorCount(PROCESSOR_COUNT)
message(STATUS "Number of processor cores: ${PROCESSOR_COUNT}")

add_custom_target(
man_page ALL
COMMAND make clean && make preprocess && make all -j${PROCESSOR_COUNT}
Expand All @@ -193,6 +196,5 @@ if(BUILD_MAN)

# Based on ${CMAKE_INSTALL_PREFIX}, we want to go to ${CMAKE_INSTALL_PREFIX}/share/man
set(MANPAGE_DIR ${OPENROAD_HOME}/docs/cat)
install(DIRECTORY ${MANPAGE_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man)

install(DIRECTORY ${MANPAGE_DIR} DESTINATION ${OPENROAD_SHARE}/man)
endif()
26 changes: 12 additions & 14 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,17 @@ def getParallelTests(String image) {
return ret;
}

timeout(time: 2, unit: 'HOURS') {
node {
stage('Checkout') {
checkout scm;
}
def DOCKER_IMAGE;
stage('Build and Push Docker Image') {
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}
parallel(getParallelTests(DOCKER_IMAGE));
stage('Send Email Report') {
sendEmail();
}
node {
stage('Checkout') {
checkout scm;
}
def DOCKER_IMAGE;
stage('Build and Push Docker Image') {
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}
parallel(getParallelTests(DOCKER_IMAGE));
stage('Send Email Report') {
sendEmail();
}
}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ flowchart LR
subgraph ORFlow
direction TB
style ORFlow fill:#ffffff00, stroke-width:0px
A[Verilog\n+ libraries\n + constraints] --> FLOW
A[Verilog
+ libraries
+ constraints] --> FLOW
style A fill:#74c2b5,stroke:#000000,stroke-width:4px
subgraph FLOW
style FLOW fill:#FFFFFF00,stroke-width:4px
Expand All @@ -64,7 +66,8 @@ flowchart LR
style G fill:#ff6666,stroke:#000000,stroke-width:4px
end
FLOW --> H[GDSII\n Final Layout]
FLOW --> H[GDSII
Final Layout]
%% H --- H1[ ]
%% style H1 stroke-width:0px, fill: #FFFFFF00
%% linkStyle 11 stroke-width:0px
Expand Down
11 changes: 11 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
openroad = (nixpkgs.lib.callPackageWith pkgs) ./default.nix {
flake = self;
};
openroad-release = all.openroad.overrideAttrs (fa: pa: {
pname = "openroad-release";
version = "24Q3";
src = pkgs.fetchFromGitHub {
owner = "The-OpenROAD-Project";
repo = "OpenROAD";
rev = fa.version;
fetchSubmodules = true;
sha256 = "sha256-Ye9XJcoUxtg031eazT4qrexvyN0jZHd8/kmvAr/lPzk=";
};
});
default = all.openroad;
};
in
Expand Down
6 changes: 5 additions & 1 deletion include/ord/InitOpenRoad.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@

#include <tcl.h>

#include <string>

namespace ord {

// Call this inside of Tcl_Main.
void initOpenRoad(Tcl_Interp* interp);
void initOpenRoad(Tcl_Interp* interp,
const char* log_filename,
const char* metrics_filename);
} // namespace ord
4 changes: 3 additions & 1 deletion include/ord/OpenRoad.hh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ class OpenRoad
// OpenRoad object and/or any other tools they need to reference.
static OpenRoad* openRoad();
static void setOpenRoad(OpenRoad* app, bool reinit_ok = false);
void init(Tcl_Interp* tcl_interp);
void init(Tcl_Interp* tcl_interp,
const char* log_filename,
const char* metrics_filename);

Tcl_Interp* tclInterp() { return tcl_interp_; }
utl::Logger* getLogger() { return logger_; }
Expand Down
4 changes: 3 additions & 1 deletion include/ord/Tech.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class Tech
public:
// interp is only passed by standalone OR as it gets its
// interpreter from Tcl_Main.
Tech(Tcl_Interp* interp = nullptr);
Tech(Tcl_Interp* interp = nullptr,
const char* log_filename = nullptr,
const char* metrics_filename = nullptr);
~Tech();

void readLef(const std::string& file_name);
Expand Down
68 changes: 37 additions & 31 deletions jenkins/Jenkinsfile.coverage
Original file line number Diff line number Diff line change
@@ -1,49 +1,55 @@
@Library('utils@or-v2.0.1') _

timeout(time: 2, unit: 'HOURS') {
node {
node {

stage('Checkout'){
checkout scm;
}
stage('Checkout'){
checkout scm;
}

def DOCKER_IMAGE;
stage('Build and Push Docker Image') {
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}
def DOCKER_IMAGE;
stage('Build and Push Docker Image') {
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}

docker.image(DOCKER_IMAGE).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
stage('Build for Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh label: 'Build OpenROAD', script: './etc/Build.sh -no-warnings -coverage';
}
docker.image(DOCKER_IMAGE).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock') {
stage('Build for Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh label: 'Build OpenROAD', script: './etc/Build.sh -no-warnings -coverage';
}
}

stage('Dynamic Code Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
stage('Dynamic Code Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 2, unit: 'HOURS') {
sh './etc/CodeCoverage.sh dynamic';
}
}
}

stage('Publish Code Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
publishHTML([
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false,
reportDir: 'coverage-output',
reportFiles: 'index.html',
reportName: 'Dynamic Code Coverage',
reportTitles: ''
]);
}
stage('Publish Code Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
publishHTML([
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: false,
reportDir: 'coverage-output',
reportFiles: 'index.html',
reportName: 'Dynamic Code Coverage',
reportTitles: ''
]);
}
}

stage('Send Email Report') {
sendEmail();
stage('Save Artifacts') {
sh label: "Save code coverage results", script: "find . -name results -type d -exec tar zcvf code-coverage.tgz {} '+'";
archiveArtifacts artifacts: "code-coverage.tgz";
}

}

stage('Send Email Report') {
sendEmail();
}

}
44 changes: 22 additions & 22 deletions jenkins/Jenkinsfile.coverity
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
@Library('utils@or-v2.0.1') _

timeout(time: 2, unit: 'HOURS') {
node {
node {

stage('Checkout'){
checkout scm;
}
stage('Checkout'){
checkout scm;
}

def DOCKER_IMAGE;
stage('Build and Push Docker Image') {
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}
def DOCKER_IMAGE;
stage('Build and Push Docker Image') {
DOCKER_IMAGE = dockerPush('ubuntu22.04', 'openroad');
echo "Docker image is ${DOCKER_IMAGE}";
}

docker.image(DOCKER_IMAGE).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins/cov-latest:/root/cov-latest') {
stage("Setup") {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
}
stage('Run Static Code Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
withCredentials([string(credentialsId: 'COVERITY_TOKEN', variable: 'TOKEN')]) {
docker.image(DOCKER_IMAGE).inside('--user=root --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /home/jenkins/cov-latest:/root/cov-latest') {
stage("Setup") {
sh label: 'Configure git', script: "git config --system --add safe.directory '*'";
}
stage('Run Static Code Coverage') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
withCredentials([string(credentialsId: 'COVERITY_TOKEN', variable: 'TOKEN')]) {
timeout(time: 2, unit: 'HOURS') {
sh label: 'CodeCoverage Script', script: '''
export PATH=/root/cov-latest/bin:$PATH
./etc/CodeCoverage.sh static ${TOKEN}
''';
}
}
archiveArtifacts artifacts: 'openroad.tgz';
}
archiveArtifacts artifacts: 'openroad.tgz';
}
}

stage('Send Email Report') {
sendEmail();
}

stage('Send Email Report') {
sendEmail();
}

}
8 changes: 6 additions & 2 deletions jenkins/Jenkinsfile.nightly
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ node {
}
stage("Run ${name}") {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh "python3 src/drt/test/run-ispd.py --program ${WORKSPACE}/build/src/openroad --tests ispd${ispd_year}_test${test_to_run}";
timeout(time: 8, unit: 'HOURS') {
sh "python3 src/drt/test/run-ispd.py --program ${WORKSPACE}/build/src/openroad --tests ispd${ispd_year}_test${test_to_run}";
}
}
}
stage("Save ${name} Results") {
Expand All @@ -68,7 +70,9 @@ node {
}
stage('Run GPL Tests') {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
sh './src/gpl/test/regression-large';
timeout(time: 2, unit: 'HOURS') {
sh './src/gpl/test/regression-large';
}
}
}
stage('Save GPL Results') {
Expand Down
5 changes: 0 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -484,11 +484,6 @@ endif()
# executable
install(TARGETS openroad DESTINATION bin)


if(BUILD_MAN)
install(DIRECTORY ${MANPAGE_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man)
endif()

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

add_custom_target(openroad_tags etags -o TAGS
Expand Down
Loading

0 comments on commit ff00b88

Please sign in to comment.