-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a tool to query ORAssistant #6226
Draft
palaniappan-r
wants to merge
43
commits into
The-OpenROAD-Project:master
Choose a base branch
from
palaniappan-r:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+694
−4
Draft
Changes from 39 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
fdd34df
ora: add basic orassistant api call command
palaniappan-r 13453ac
ora: add boost json lib
palaniappan-r ad67b3a
ora: remove context flag
palaniappan-r 59108fd
ora: remove context flag, use boost json to parse response
palaniappan-r c03c44d
ora: remove context flag
palaniappan-r 0dd9809
ora: install boost json in docker container
palaniappan-r 972e8d8
ora: add tool entry in logger
palaniappan-r 3608133
ora: add set_bothost command
palaniappan-r 11e1fb4
ora: save bothost url to file
palaniappan-r 581f947
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r a885998
ora: update dockerfile
palaniappan-r 68096d7
ora: revert builder dockerfile
palaniappan-r 119617e
ora: add curl to dependency installer script
palaniappan-r ec4c653
ora: add curl and openssl to dependency installer script
palaniappan-r a5c7e96
style: fix formatting
palaniappan-r a167887
ora: remove default tests
palaniappan-r 504d82c
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r fb30cf7
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r 4cf083c
ora: remove log statement
palaniappan-r 72de8cd
ora: add tests
palaniappan-r e64dd2b
ora: add mock API server initialization in regression tests
palaniappan-r 68e8156
ora: replace FastAPI mock server with HTTPServer implementation
palaniappan-r 056562f
ora: add regression test script definition for 'ora' tool
palaniappan-r c44816c
ora: update copyright year to 2024
palaniappan-r d2ac50f
ora: update copyright year to 2024 and remove host url file
palaniappan-r c2b240c
ora: use dev versions of openssl and curl
palaniappan-r 0d310e4
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r 2f51f9e
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r b9b8839
ora: display host file path for ORAssistant host configuration
palaniappan-r 26f18fa
ora: add libcurl and boost dependencies for RHEL and Debian packages
palaniappan-r 2825ff3
ora: remove libboost-json-dev from Debian package installation
palaniappan-r 144d8c7
ora: update set_bothost log message
palaniappan-r 6819aa0
ora: update set_bothost test
palaniappan-r d97ee0b
ora: update ORAssistant host file path to use ~/.local directory and …
palaniappan-r 598212e
ora: silence logs and implement auto shutdown after 15 seconds for mo…
palaniappan-r 1664333
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r 9d0e2c5
Merge remote-tracking branch 'upstream/master'
palaniappan-r a29904d
ora: add consent management and local directory checks
palaniappan-r e367e39
ora: update regression tests
palaniappan-r efb1e27
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r 408c945
ora: update copyright year to 2025
palaniappan-r b80a499
ora: fix stray changes
palaniappan-r dc94695
Merge branch 'The-OpenROAD-Project:master' into master
palaniappan-r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,7 @@ _installCommonDev() { | |
tar -xf boost_${boostVersionUnderscore}.tar.gz | ||
cd boost_${boostVersionUnderscore} | ||
./bootstrap.sh --prefix="${boostPrefix}" | ||
./b2 install --with-iostreams --with-test --with-serialization --with-system --with-thread -j $(nproc) | ||
./b2 install --with-iostreams --with-test --with-serialization --with-system --with-thread --with-json -j $(nproc) | ||
else | ||
echo "Boost already installed." | ||
fi | ||
|
@@ -332,6 +332,7 @@ _installUbuntuPackages() { | |
git \ | ||
groff \ | ||
lcov \ | ||
libcurl4-openssl-dev \ | ||
libffi-dev \ | ||
libgomp1 \ | ||
libomp-dev \ | ||
|
@@ -424,7 +425,9 @@ _installRHELPackages() { | |
tcl-thread-devel \ | ||
tcllib \ | ||
wget \ | ||
zlib-devel | ||
zlib-devel \ | ||
libcurl-devel \ | ||
boost-devel | ||
|
||
yum install -y \ | ||
https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/bison-3.7.4-5.el9.x86_64.rpm \ | ||
|
@@ -570,6 +573,7 @@ _installDebianPackages() { | |
libpcre3-dev \ | ||
libreadline-dev \ | ||
libtcl${tclver} \ | ||
libcurl4-openssl-dev \ | ||
pandoc \ | ||
python3-dev \ | ||
qt5-image-formats-plugins \ | ||
|
@@ -579,7 +583,7 @@ _installDebianPackages() { | |
unzip \ | ||
wget \ | ||
zlib1g-dev | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. stray change? |
||
if [[ $1 == 10 ]]; then | ||
apt-get install -y --no-install-recommends \ | ||
libpython3.7 \ | ||
|
@@ -920,4 +924,4 @@ esac | |
if [[ ! -z ${saveDepsPrefixes} ]]; then | ||
mkdir -p "$(dirname $saveDepsPrefixes)" | ||
echo "$CMAKE_PACKAGE_ROOT_ARGS" > $saveDepsPrefixes | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test/results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright (c) 2024, The Regents of the University of | ||
# California | ||
# All rights reserved. | ||
# | ||
# This program is free software: you can redistribute it | ||
# and/or modify it under the terms of the GNU General | ||
# Public License as published by the Free Software | ||
# Foundation, either version 3 of the License, or (at your | ||
# option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be | ||
# useful, but WITHOUT ANY WARRANTY; without even the | ||
# implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
# PARTICULAR PURPOSE. See the GNU General Public License | ||
# for more details. | ||
# | ||
# You should have received a copy of the GNU General | ||
# Public License along with this program. If not, see | ||
# <https://www.gnu.org/licenses/>. | ||
include("openroad") | ||
|
||
project(ora) | ||
|
||
swig_lib(NAME ora | ||
NAMESPACE ora | ||
I_FILE src/Ora.i | ||
SCRIPTS src/Ora.tcl | ||
) | ||
|
||
target_sources(ora | ||
PRIVATE | ||
src/MakeOra.cc | ||
src/Ora.cc | ||
) | ||
|
||
target_include_directories(ora | ||
PUBLIC | ||
include | ||
) | ||
|
||
find_package(CURL REQUIRED) | ||
find_package(Boost REQUIRED COMPONENTS json) | ||
|
||
target_include_directories(ora | ||
PUBLIC ${CURL_INCLUDE_DIRS} | ||
PUBLIC ${Boost_INCLUDE_DIRS} | ||
) | ||
|
||
target_link_libraries(ora | ||
OpenSTA | ||
odb | ||
${CURL_LIBRARIES} | ||
Boost::json | ||
) | ||
|
||
messages( | ||
TARGET ora | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) 2024, The Regents of the University of California | ||
// All rights reserved. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
#ifndef MAKE_ORA_H | ||
#define MAKE_ORA_H | ||
|
||
namespace ora { | ||
class Ora; | ||
} | ||
|
||
namespace ord { | ||
|
||
class OpenRoad; | ||
|
||
ora::Ora* makeOra(); | ||
void deleteOra(ora::Ora* ora); | ||
void initOra(OpenRoad* openroad); | ||
|
||
} // namespace ord | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright (c) 2024, The Regents of the University of California | ||
// All rights reserved. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
#include <curl/curl.h> | ||
#include <tcl.h> | ||
|
||
#include <boost/json.hpp> | ||
|
||
#include "odb/db.h" | ||
|
||
namespace utl { | ||
class Logger; | ||
} | ||
|
||
namespace ora { | ||
|
||
using utl::Logger; | ||
|
||
class Ora | ||
{ | ||
public: | ||
Ora(); | ||
~Ora(); | ||
void init(Tcl_Interp* tcl_interp, odb::dbDatabase* db, utl::Logger* logger); | ||
void askbot(const char* pos_arg1); | ||
void setBotHost(const char* host); | ||
void setSourceFlag(bool sourceFlag); | ||
void setConsent(const char* consent); | ||
|
||
private: | ||
odb::dbDatabase* db_; | ||
bool sourceFlag_; | ||
std::string hostUrl; | ||
std::string localDirPath; | ||
void checkLocalDir(); | ||
|
||
Logger* logger_ = nullptr; | ||
}; | ||
|
||
} // namespace ora |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) 2024, The Regents of the University of California | ||
// All rights reserved. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
#include "ora/MakeOra.hh" | ||
|
||
#include "ora/Ora.hh" | ||
#include "ord/OpenRoad.hh" | ||
|
||
namespace ord { | ||
|
||
ora::Ora* makeOra() | ||
{ | ||
return new ora::Ora; | ||
} | ||
|
||
void deleteOra(ora::Ora* ora) | ||
{ | ||
delete ora; | ||
} | ||
|
||
void initOra(OpenRoad* openroad) | ||
{ | ||
utl::Logger* logger = openroad->getLogger(); | ||
openroad->getOra()->init(openroad->tclInterp(), openroad->getDb(), logger); | ||
} | ||
|
||
} // namespace ord |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there a change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.