Skip to content

Commit

Permalink
Optimize CB init for BH
Browse files Browse the repository at this point in the history
Early CB init not needed since BH does not copy to IRAM
  • Loading branch information
pgkeller committed Jan 22, 2025
1 parent 765c049 commit 02afcf3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tt_metal/hw/firmware/src/brisc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ constexpr uint32_t RISCV_IC_TRISC1_MASK = 0x4;
constexpr uint32_t RISCV_IC_TRISC2_MASK = 0x8;
constexpr uint32_t RISCV_IC_TRISC_ALL_MASK = RISCV_IC_TRISC0_MASK | RISCV_IC_TRISC1_MASK | RISCV_IC_TRISC2_MASK;

#ifdef NCRISC_HAS_IRAM
constexpr uint32_t num_cbs_to_early_init = 4; // safe small number to overlap w/ ncrisc copy
#else
constexpr uint32_t num_cbs_to_early_init = 0;
#endif

tt_l1_ptr mailboxes_t* const mailboxes = (tt_l1_ptr mailboxes_t*)(MEM_MAILBOX_BASE);
uint32_t ncrisc_kernel_start_offset16;
Expand Down Expand Up @@ -331,8 +335,10 @@ inline void finish_ncrisc_copy_and_run(dispatch_core_processor_masks enables) {

l1_to_ncrisc_iram_copy_wait();

#ifdef NCRISC_HAS_IRAM
// Note: only ncrisc is in reset, so just deasserts ncrisc
deassert_all_reset();
#endif
}
}

Expand Down

0 comments on commit 02afcf3

Please sign in to comment.