// SPDX-License-Identifier: Apache-2.0 // Writes this core's NoC coordinates (noc0 x, y, noc1 x, y) as one 32-byte row-major page (page = core index): // a host-side check of the logical -> NoC coordinate mapping used by the generic_op matmul (tt/mm_fused.py). #include #include "api/dataflow/dataflow_api.h" constexpr uint32_t cb = get_compile_time_arg_val(0); constexpr auto t_args = TensorAccessorArgs<1>(); void kernel_main() { const uint32_t addr = get_arg_val(0); const uint32_t page = get_arg_val(1); const auto acc = TensorAccessor(t_args, addr, 32); cb_reserve_back(cb, 1); volatile tt_l1_ptr uint32_t* p = reinterpret_cast(get_write_ptr(cb)); p[0] = my_x[0]; p[1] = my_y[0]; p[2] = my_x[1]; p[3] = my_y[1]; p[4] = page; p[5] = 0xC0DE; p[6] = 0; p[7] = 0; noc_async_write(get_write_ptr(cb), acc.get_noc_addr(page), 32); noc_async_write_barrier(); }