Skip to content

Commit

Permalink
DO NOT MERGE purge memory targets, now built into ORFS
Browse files Browse the repository at this point in the history
  • Loading branch information
oharboe committed Apr 24, 2024
1 parent 182145f commit 38a9e7b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/build_local_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ -z "$STAGES" ]]; then
if [[ "$target_name" == L1MetadataArray_* ]]; then
STAGES=("synth_sdc" "synth" "floorplan" "place" "cts" "grt" "generate_abstract")
else
STAGES=("synth_sdc" "synth" "memory" "floorplan" "generate_abstract")
STAGES=("synth_sdc" "synth" "floorplan" "generate_abstract")
fi
else
eval "STAGES=($STAGES)"
Expand Down
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ Stage targets:
//:L1MetadataArray_test_grt
//:L1MetadataArray_test_generate_abstract
Memory targets:
//:L1MetadataArray_test_memory
Make targets:
//:L1MetadataArray_test_clock_period_make
//:L1MetadataArray_test_clock_period_make_script
Expand All @@ -103,8 +100,6 @@ Make targets:
//:L1MetadataArray_test_grt_make_script
//:L1MetadataArray_test_generate_abstract_make
//:L1MetadataArray_test_generate_abstract_make_script
//:L1MetadataArray_test_memory_make
//:L1MetadataArray_test_memory_make_script
Config generation targets:
Expand All @@ -129,8 +124,6 @@ Config generation targets:
//:L1MetadataArray_test_grt_config.mk
//:L1MetadataArray_test_generate_abstract_config
//:L1MetadataArray_test_generate_abstract_config.mk
//:L1MetadataArray_test_memory_config
//:L1MetadataArray_test_memory_config.mk
```

The example comes from the `BUILD` file in this repository.
Expand All @@ -149,7 +142,6 @@ These are the genrules spawend in this macro:
* Common for the whole design (named: `target_name + “_config”`)
* ORFS stage-specific config (named: `target_name + “_” + stage + “_config”`)
* Stage targets (named: `target_name + “_” + stage`)
* Special stage: Memory targets (named: `target_name + “_memory”`)
* Special mock flow: Mock Area targets (named: `target_name + “_” + stage + “_mock_area”`)
* Make targets (named: `target_name + “_” + stage + “_make”`)

Expand All @@ -165,7 +157,6 @@ Docker flow uses containerized environment with preinstalled ORFS to run the phy
Example targets which run the docker flow include:

* //:L1MetadataArray_test_floorplan
* //:L1MetadataArray_test_memory
* //:tag_array_64x184_synth

It implicitly depends on a docker image with installed ORFS environment being present in docker runtime of the machine running bazel targets.
Expand Down Expand Up @@ -241,10 +232,6 @@ At the same time the mock has the same pinout as the original macro and similar
Mocked abstracts are generated after the `floorplan` stage to be then used in builds of other parts of the design that use given macro.
Used for estimating sizes of macros with long build times and checking if they will fit in upper-level modules without running time consuming place and route flow.

#### Memory Targets

These targets print RAM summaries for a given module.

### Constraints handling

Constraint files are passed down to `build_openroad()` macro through attributes:
Expand Down
7 changes: 0 additions & 7 deletions memory-bazel.mk

This file was deleted.

35 changes: 1 addition & 34 deletions openroad.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ def init_output_dict(all_stages, platform, out_dir, variant, name):
"results/%s/%s/%s/6_final.gds" % (platform, out_dir, variant),
],
"grt": ["reports/%s/%s/%s/congestion.rpt" % (platform, out_dir, variant)],
"route": ["reports/%s/%s/%s/5_route_drc.rpt" % (platform, out_dir, variant)],
"memory": ["results/%s/%s/%s/mem.json" % (platform, out_dir, variant)],
"route": ["reports/%s/%s/%s/5_route_drc.rpt" % (platform, out_dir, variant)]
}

stage_num = dict(map(lambda s: (s[1], s[0]), all_stages))
Expand Down Expand Up @@ -666,38 +665,6 @@ def build_openroad(
if mock_area != None:
mock_area_stages(target_name, name, stage_sources, io_constraints, sdc_constraints, stage_args, outs, variant, mock_area, docker_image)

# *_memory targets
write_stage_config(
name = target_name + "_memory_config",
stage = "memory",
srcs = [],
stage_args = stage_args["synth"],
)
make_pattern = Label("//:memory-bazel.mk")
stage_config = Label("@@//:" + target_name + "_memory_config.mk")
entrypoint_cmd = get_entrypoint_cmd(make_pattern, design_config, stage_config, False)
native.genrule(
name = target_name + "_memory_make_script",
tools = [Label("//:orfs")],
srcs = [make_script_template, design_config, stage_config, make_pattern],
cmd = "cat <<EOF > $@ \n`cat $(location " + str(make_script_template) + ")`\n" + entrypoint_cmd + " \\$$@",
outs = ["logs/%s/%s/%s/make_script_memory.sh" % (platform, out_dir, variant)],
)
native.sh_binary(
name = target_name + "_memory_make",
srcs = ["//:" + target_name + "_memory_make_script"],
data = [Label("//:orfs"), design_config, stage_config, make_pattern],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
native.genrule(
name = target_name + "_memory",
tools = [Label("//:docker_shell")],
srcs = [Label("//:scripts/mem_dump.py"), Label("//:scripts/mem_dump.tcl"), target_name + "_clock_period", design_config, stage_config, make_pattern],
cmd = get_entrypoint_cmd(make_pattern, design_config, stage_config, True, "memory", docker_image = docker_image),
outs = outs["memory"],
tags = ["supports-graceful-termination"],
)

# Stage (Docker) targets
for (previous, stage) in zip(["n/a"] + stages, stages):
# Generate config for stage targets
Expand Down
35 changes: 0 additions & 35 deletions scripts/mem_dump.py

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/mem_dump.tcl

This file was deleted.

0 comments on commit 38a9e7b

Please sign in to comment.