Skip to content

Commit 009516c

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenROAD into secure-jhkim-test
2 parents 926fcf3 + 8881d16 commit 009516c

9 files changed

Lines changed: 42 additions & 18 deletions

File tree

MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ bazel_dep(name = "bazel-orfs")
151151
# To bump version, run: bazelisk run @bazel-orfs//:bump
152152
git_override(
153153
module_name = "bazel-orfs",
154-
commit = "f8e4ced47dc2c9d15aea97d734eba55a50f35666",
154+
commit = "72078ddd575513b35bd3cdfdb5c115949fc44e97",
155155
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
156156
)
157157

@@ -160,10 +160,10 @@ orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
160160
# To bump version, run: bazelisk run @bazel-orfs//:bump
161161
orfs.default(
162162
# Official image https://hub.docker.com/r/openroad/orfs/tags
163-
image = "docker.io/openroad/orfs:v3.0-3444-g669e62e5",
163+
image = "docker.io/openroad/orfs:v3.0-3455-g9638e97b",
164164
# Use OpenROAD of this repo instead of from the docker image
165165
openroad = "//:openroad",
166-
sha256 = "9f9c6c0817eba504c56cdf613bf1bcc00054164500a276de894a4cb1f48b69a6",
166+
sha256 = "7d6478d96c474f29f21e700f723d30b70d44e88686c3801688a22b35c35698e7",
167167
)
168168
use_repo(orfs, "com_github_nixos_patchelf_download")
169169
use_repo(orfs, "docker_orfs")

MODULE.bazel.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/run-clang-tidy-cached.cc

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ B=${0%%.cc}; [ "$B" -nt "$0" ] || c++ -std=c++17 -o"$B" "$0" && exec "$B" "$@";
3232
// CLANG_TIDY_CONFIG = override configuration file in kConfig.clang_tidy_file
3333
// CACHE_DIR = where to put the cached content; default ~/.cache
3434
// CLANG_TIDY_JOBS = Number of tasks to run in parallel.
35+
// COMPILE_JSON = where to find cmake compile commands;
36+
// default build/compile_commands.json
3537

3638
// This file shall be c++17 self-contained; not using any re2 or absl niceties.
3739
#include <unistd.h>
@@ -282,7 +284,8 @@ class ClangTidyRunner
282284
// Given a work-queue in/out-file, process it. Using system() for portability.
283285
// Empties work_queue.
284286
void RunClangTidyOn(ContentAddressedStore& output_store,
285-
std::list<filepath_contenthash_t>* work_queue)
287+
std::list<filepath_contenthash_t>* work_queue,
288+
std::string_view compile_json_str)
286289
{
287290
if (work_queue->empty()) {
288291
return;
@@ -319,9 +322,10 @@ class ClangTidyRunner
319322
const std::string tmp_out = final_out.string() + uniquifier + ".tmp";
320323
// Putting the file to clang-tidy early in the command line so that
321324
// it is easy to find with `ps` or `top`.
322-
const std::string command = clang_tidy_ + " '" + work.first.string()
323-
+ "'" + clang_tidy_args_ + "> '" + tmp_out
324-
+ "' 2>/dev/null";
325+
const std::string command
326+
= clang_tidy_ + " -p " + std::string(compile_json_str) + " '"
327+
+ work.first.string() + "'" + clang_tidy_args_ + "> '" + tmp_out
328+
+ "' 2>/dev/null";
325329
const int r = system(command.c_str());
326330
#ifdef WIFSIGNALED
327331
// NOLINTBEGIN
@@ -629,14 +633,15 @@ int main(int argc, char* argv[])
629633
return EXIT_FAILURE;
630634
}
631635

632-
auto compdb_ts = fs::last_write_time("compile_commands.json", ec);
636+
std::string_view compile_json_str
637+
= EnvWithFallback("COMPILE_JSON", "build/compile_commands.json");
638+
auto compdb_ts = fs::last_write_time(compile_json_str, ec);
633639
if (ec.value() != 0) {
634640
compdb_ts = fs::last_write_time("compile_flags.txt", ec);
635641
}
636642
if (ec.value() != 0) {
637-
std::cerr << "No compilation db compile_commands.json or compile_flags.txt "
638-
<< "found; create that first. For cmake projects, often simply\n"
639-
<< "\tln -s build/compile_commands.json .\n";
643+
std::cerr << "No compilation db " << compile_json_str
644+
<< " found; create that first.\n";
640645
return EXIT_FAILURE;
641646
}
642647

@@ -655,7 +660,7 @@ int main(int argc, char* argv[])
655660
auto work_list = cc_file_gatherer.BuildWorkList(build_env_latest_change);
656661

657662
// Now the expensive part...
658-
runner.RunClangTidyOn(store, &work_list);
663+
runner.RunClangTidyOn(store, &work_list, compile_json_str);
659664

660665
const std::string detailed_report = cache_prefix + "clang-tidy.out";
661666
const std::string summary = cache_prefix + "clang-tidy.summary";

src/odb/src/swig/tcl/odb.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,9 @@ proc set_io_pin_constraint { args } {
734734
} elseif { $interval == "*" } {
735735
set begin [ppl::get_edge_extreme "-region" 1 $edge]
736736
set end [ppl::get_edge_extreme "-region" 0 $edge]
737+
} else {
738+
utl::error PPL 212 "Invalid value for \'-region edge:interval\'. Set the interval as the\
739+
wildcard \'*\' or as a range \'begin-end\' in microns."
737740
}
738741

739742
if { [info exists keys(-direction)] && [info exists keys(-pin_names)] } {

src/ppl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ set_io_pin_constraint
7979
| ----- | ----- |
8080
| `-direction` | Pin direction (`input`, `output`, `inout`, or `feedthrough`). |
8181
| `-pin_names` | List of names. Only one of (`-direction`, `-pin_names`) should be used in a single call for the `set_io_pin_constraint` command. |
82-
| `-region` | Syntax is `-region edge:interval`. The `edge` values are (`top\|bottom\|left\|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values. |
82+
| `-region` | Syntax is `-region edge:interval`. The `edge` values are (`top\|bottom\|left\|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values `begin-end` in microns. For example, in `-region right:15-60` the interval is on the right edge from 15 microns to 60 microns.|
8383
| `-mirrored_pins` | List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list **must be even**. For example, in `set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, the pins `pin1` and `pin2` will be placed symmetrically to each other. Same for `pin3` and `pin4`, and for `pin5` and `pin6`. |
8484
| `-group` | Flag places together on the die boundary the pin list defined in `-pin_names,` similar to the `-group_pins` option on the `place_pins` command. |
8585
| `-order` | Flag places the pins ordered in ascending x/y position and must be used only when `-group` is also used. |

src/ppl/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ or_integration_tests(
3030
add_constraint_error7
3131
add_constraint_error8
3232
add_constraint_error9
33+
add_constraint_error10
3334
annealing1
3435
annealing2
3536
annealing3
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0128] Design: gcd
3+
[INFO ODB-0130] Created 54 pins.
4+
[INFO ODB-0131] Created 88 components and 422 component-terminals.
5+
[INFO ODB-0133] Created 54 nets and 88 connections.
6+
[ERROR PPL-0212] Invalid value for '-region edge:interval'. Set the interval as the wildcard '*' or as a range 'begin-end' in microns.
7+
PPL-0212
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# gcd_nangate45 IO placement
2+
source "helpers.tcl"
3+
read_lef Nangate45/Nangate45.lef
4+
read_def gcd.def
5+
6+
catch {
7+
set_io_pin_constraint -group -order -region left:90.3 -pin_names {resp_msg[0] req_msg[0]
8+
resp_msg[1] req_msg[1] resp_msg[2] req_msg[2] resp_msg[3]}
9+
} error
10+
puts $error

test/orfs/mock-array/BUILD

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ orfs_flow(
171171
abstract_stage = POWER_STAGE_NAME,
172172
arguments = {
173173
"PLACE_DENSITY": "0.82",
174-
"MOCK_ARRAY_ROWS": "8",
175-
"MOCK_ARRAY_COLS": "8",
176174
"DETAILED_ROUTE_END_ITERATION": "6",
177175
"MIN_ROUTING_LAYER": "M2",
178176
"MAX_ROUTING_LAYER": "M5",

0 commit comments

Comments
 (0)