|
14 | 14 |
|
15 | 15 | # Build rules for XLS ZSTD codec implementation.
|
16 | 16 |
|
| 17 | +load("@rules_hdl//place_and_route:build_defs.bzl", "place_and_route") |
| 18 | +load("@rules_hdl//synthesis:build_defs.bzl", "benchmark_synth", "synthesize_rtl") |
| 19 | +load("@rules_hdl//verilog:providers.bzl", "verilog_library") |
17 | 20 | load(
|
18 | 21 | "//xls/build_rules:xls_build_defs.bzl",
|
| 22 | + "xls_benchmark_ir", |
19 | 23 | "xls_dslx_library",
|
20 | 24 | "xls_dslx_test",
|
| 25 | + "xls_dslx_verilog", |
21 | 26 | )
|
22 | 27 |
|
23 | 28 | package(
|
@@ -53,3 +58,64 @@ xls_dslx_test(
|
53 | 58 | library = ":window_buffer_dslx",
|
54 | 59 | )
|
55 | 60 |
|
| 61 | +xls_dslx_verilog( |
| 62 | + name = "window_buffer_verilog", |
| 63 | + codegen_args = { |
| 64 | + "module_name": "WindowBuffer64", |
| 65 | + "delay_model": "asap7", |
| 66 | + "pipeline_stages": "2", |
| 67 | + "reset": "rst", |
| 68 | + "use_system_verilog": "false", |
| 69 | + }, |
| 70 | + dslx_top = "WindowBuffer64", |
| 71 | + library = ":window_buffer_dslx", |
| 72 | + # TODO: 2024-01-25: Workaround for https://github.com/google/xls/issues/869 |
| 73 | + # Force proc inlining and set last internal proc as top proc for IR optimization |
| 74 | + opt_ir_args = { |
| 75 | + "inline_procs": "true", |
| 76 | + "top": "__window_buffer__WindowBuffer64__WindowBuffer_0__64_32_48_next", |
| 77 | + }, |
| 78 | + verilog_file = "window_buffer.v", |
| 79 | +) |
| 80 | + |
| 81 | +xls_benchmark_ir( |
| 82 | + name = "window_buffer_opt_ir_benchmark", |
| 83 | + src = ":window_buffer_verilog.opt.ir", |
| 84 | + benchmark_ir_args = { |
| 85 | + "pipeline_stages": "2", |
| 86 | + "delay_model": "asap7", |
| 87 | + }, |
| 88 | +) |
| 89 | + |
| 90 | +verilog_library( |
| 91 | + name = "window_buffer_verilog_lib", |
| 92 | + srcs = [ |
| 93 | + ":window_buffer.v", |
| 94 | + ], |
| 95 | +) |
| 96 | + |
| 97 | +synthesize_rtl( |
| 98 | + name = "window_buffer_synth_asap7", |
| 99 | + standard_cells = "@org_theopenroadproject_asap7sc7p5t_28//:asap7-sc7p5t_rev28_rvt", |
| 100 | + top_module = "WindowBuffer64", |
| 101 | + deps = [ |
| 102 | + ":window_buffer_verilog_lib", |
| 103 | + ], |
| 104 | +) |
| 105 | + |
| 106 | +benchmark_synth( |
| 107 | + name = "window_buffer_benchmark_synth", |
| 108 | + synth_target = ":window_buffer_synth_asap7", |
| 109 | +) |
| 110 | + |
| 111 | +place_and_route( |
| 112 | + name = "window_buffer_place_and_route", |
| 113 | + clock_period = "750", |
| 114 | + core_padding_microns = 2, |
| 115 | + min_pin_distance = "0.5", |
| 116 | + placement_density = "0.30", |
| 117 | + skip_detailed_routing = True, |
| 118 | + synthesized_rtl = ":window_buffer_synth_asap7", |
| 119 | + target_die_utilization_percentage = "10", |
| 120 | +) |
| 121 | + |
0 commit comments