Skip to content

Commit

Permalink
xls: modules: rle: Add GDS generation rules
Browse files Browse the repository at this point in the history
Add GDS write examples for RLE encoder and decoder for process
technologies:
* ASAP7
* SKY130

Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
  • Loading branch information
lpawelcz committed Sep 18, 2023
1 parent 65a89c3 commit b67d8b0
Showing 1 changed file with 108 additions and 0 deletions.
108 changes: 108 additions & 0 deletions xls/modules/rle/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ load(
"xls_ir_opt_ir",
"xls_ir_verilog",
)
load("@rules_hdl//verilog:providers.bzl", "verilog_library")
load("@rules_hdl//synthesis:build_defs.bzl", "synthesize_rtl")
load("@rules_hdl//place_and_route:build_defs.bzl", "place_and_route")
load("@rules_hdl//gds_write:build_defs.bzl", "gds_write")

package(
default_applicable_licenses = ["//:license"],
Expand Down Expand Up @@ -97,6 +101,58 @@ xls_ir_verilog(
verilog_file = "rle_enc.v",
)

verilog_library(
name = "rle_enc_verilog_lib",
srcs = [
":rle_enc.v",
],
)

synthesize_rtl(
name = "rle_enc_synth_sky130",
top_module = "rle_enc",
deps = [
":rle_enc_verilog_lib",
],
)

place_and_route(
name = "rle_enc_place_and_route_sky130",
clock_period = "1",
core_padding_microns = 10,
placement_density = "0.8",
synthesized_rtl = ":rle_enc_synth_sky130",
target_die_utilization_percentage = "30",
)

gds_write(
name = "rle_enc_gds_sky130",
implemented_rtl = ":rle_enc_place_and_route_sky130",
)

synthesize_rtl(
name = "rle_enc_synth_asap7",
standard_cells = "@org_theopenroadproject_asap7//:asap7_rvt_1x",
top_module = "rle_enc",
deps = [
":rle_enc_verilog_lib",
],
)

place_and_route(
name = "rle_enc_place_and_route_asap7",
clock_period = "1",
core_padding_microns = 5,
placement_density = "0.8",
synthesized_rtl = ":rle_enc_synth_asap7",
target_die_utilization_percentage = "30",
)

gds_write(
name = "rle_enc_gds_asap7",
implemented_rtl = ":rle_enc_place_and_route_asap7",
)

xls_benchmark_ir(
name = "rle_enc_ir_benchmark",
src = ":rle_enc_opt_ir.opt.ir",
Expand Down Expand Up @@ -166,6 +222,58 @@ xls_ir_verilog(
verilog_file = "rle_dec.v",
)

verilog_library(
name = "rle_dec_verilog_lib",
srcs = [
":rle_dec.v",
],
)

synthesize_rtl(
name = "rle_dec_synth_sky130",
top_module = "rle_dec",
deps = [
":rle_dec_verilog_lib",
],
)

place_and_route(
name = "rle_dec_place_and_route_sky130",
clock_period = "1",
core_padding_microns = 10,
placement_density = "0.8",
synthesized_rtl = ":rle_dec_synth_sky130",
target_die_utilization_percentage = "30",
)

gds_write(
name = "rle_dec_gds_sky130",
implemented_rtl = ":rle_dec_place_and_route_sky130",
)

synthesize_rtl(
name = "rle_dec_synth_asap7",
standard_cells = "@org_theopenroadproject_asap7//:asap7_rvt_1x",
top_module = "rle_dec",
deps = [
":rle_dec_verilog_lib",
],
)

place_and_route(
name = "rle_dec_place_and_route_asap7",
clock_period = "1",
core_padding_microns = 5,
placement_density = "0.8",
synthesized_rtl = ":rle_dec_synth_asap7",
target_die_utilization_percentage = "30",
)

gds_write(
name = "rle_dec_gds_asap7",
implemented_rtl = ":rle_dec_place_and_route_asap7",
)

xls_benchmark_ir(
name = "rle_dec_ir_benchmark",
src = ":rle_dec_opt_ir.opt.ir",
Expand Down

0 comments on commit b67d8b0

Please sign in to comment.