Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions xls/tools/codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ absl::StatusOr<verilog::CodegenResult> CodegenFromMetadata(
if (codegen_version == verilog::CodegenOptions::Version::kDefault) {
codegen_version = verilog::CodegenOptions::Version::kOneDotZero;
}
if (p->ChannelsAreProcScoped()) {
// Force Codegen 1.5 if proc-scoped channels were generated during the IR
// conversion.
codegen_version = verilog::CodegenOptions::Version::kOneDotFive;
}

if (codegen_version == verilog::CodegenOptions::Version::kOneDotZero) {
if (generator_kind == GENERATOR_KIND_COMBINATIONAL) {
Expand Down
5 changes: 5 additions & 0 deletions xls/tools/codegen_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ absl::Status RealMain(std::string_view ir_path) {

XLS_ASSIGN_OR_RETURN(CodegenFlagsProto codegen_flags_proto,
GetCodegenFlags());
if (p->ChannelsAreProcScoped()) {
// Force Codegen 1.5 if proc-scoped channels were generated during the IR
// conversion.
codegen_flags_proto.set_codegen_version(CODEGEN_VERSION_ONE_DOT_FIVE);
}
if (codegen_flags_proto.has_reference_residual_data()) {
return absl::UnimplementedError(
"Reference residual data is not supported in codegen_main; use "
Expand Down
Loading