Skip to content

Commit

Permalink
Map data-type of fifos when cloning a block
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 648877245
  • Loading branch information
allight authored and copybara-github committed Jul 2, 2024
1 parent fb267c8 commit 52703c5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xls/ir/block.cc
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,12 @@ absl::StatusOr<Block*> Block::Clone(
XLS_ASSIGN_OR_RETURN(FifoInstantiation * fifo_inst,
inst->AsFifoInstantiation());
XLS_ASSIGN_OR_RETURN(
instantiation_map[inst],
cloned_block->AddFifoInstantiation(
inst->name(), fifo_inst->fifo_config(), fifo_inst->data_type(),
fifo_inst->channel_name()));
Type * data_type,
target_package->MapTypeFromOtherPackage(fifo_inst->data_type()));
XLS_ASSIGN_OR_RETURN(instantiation_map[inst],
cloned_block->AddFifoInstantiation(
inst->name(), fifo_inst->fifo_config(),
data_type, fifo_inst->channel_name()));
}
}

Expand Down

0 comments on commit 52703c5

Please sign in to comment.