Skip to content

Commit

Permalink
Creates stage conversion from a function to a pipelined sequence of p…
Browse files Browse the repository at this point in the history
…rocs.

PiperOrigin-RevId: 718121721
  • Loading branch information
hongted authored and copybara-github committed Jan 22, 2025
1 parent f7bf732 commit ecfb634
Show file tree
Hide file tree
Showing 4 changed files with 1,201 additions and 0 deletions.
67 changes: 67 additions & 0 deletions xls/codegen/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ cc_library(
":codegen_options",
":concurrent_stage_groups",
":module_signature",
":stage_conversion",
"//xls/estimators/delay_model:delay_estimator",
"//xls/ir",
"//xls/ir:op",
Expand Down Expand Up @@ -1892,3 +1893,69 @@ cc_test(
"@com_google_googletest//:gtest",
],
)

cc_library(
name = "stage_conversion",
srcs = ["stage_conversion.cc"],
hdrs = ["stage_conversion.h"],
deps = [
":codegen_options",
"//xls/common/status:ret_check",
"//xls/common/status:status_macros",
"//xls/ir",
"//xls/ir:channel",
"//xls/ir:function_builder",
"//xls/ir:name_uniquer",
"//xls/ir:op",
"//xls/ir:source_location",
"//xls/ir:type",
"//xls/ir:value",
"//xls/ir:xls_ir_interface_cc_proto",
"//xls/scheduling:pipeline_schedule",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/types:span",
],
)

cc_test(
name = "stage_conversion_test",
srcs = ["stage_conversion_test.cc"],
deps = [
":codegen_options",
":stage_conversion",
"//xls/common:xls_gunit_main",
"//xls/common/logging:log_lines",
"//xls/common/status:matchers",
"//xls/estimators/delay_model:delay_estimator",
"//xls/interpreter:channel_queue",
"//xls/interpreter:evaluator_options",
"//xls/interpreter:interpreter_proc_runtime",
"//xls/interpreter:proc_runtime",
"//xls/ir",
"//xls/ir:bits",
"//xls/ir:channel",
"//xls/ir:channel_cc_proto",
"//xls/ir:function_builder",
"//xls/ir:ir_test_base",
"//xls/ir:op",
"//xls/ir:proc_elaboration",
"//xls/ir:value",
"//xls/ir:verifier",
"//xls/scheduling:pipeline_schedule",
"//xls/scheduling:run_pipeline_schedule",
"//xls/scheduling:scheduling_options",
"//xls/tools:codegen",
"//xls/tools:codegen_flags_cc_proto",
"//xls/tools:scheduling_options_flags_cc_proto",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:str_format",
"@com_google_googletest//:gtest",
],
)
Loading

0 comments on commit ecfb634

Please sign in to comment.