Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llrt.cpp uses ARCH_NAME specific include path for dev_msgs.h dev_mem_map.h eth_l1_address_map.h #14653

Open
1 of 3 tasks
blozano-tt opened this issue Nov 4, 2024 · 2 comments · May be fixed by #14817
Open
1 of 3 tasks

Comments

@blozano-tt
Copy link
Contributor

blozano-tt commented Nov 4, 2024

#include "dev_msgs.h"
namespace tt {
// llrt = lower-level runtime
namespace llrt {
using std::uint16_t;
using std::uint32_t;
using std::uint64_t;
ll_api::memory get_risc_binary(string const &path, uint32_t riscv_id,
ll_api::memory::PackSpans span_type, ll_api::memory::Relocate relo_type) {
static const uint32_t processor_to_fw_base_addr[] = {
MEM_BRISC_FIRMWARE_BASE,
MEM_NCRISC_FIRMWARE_BASE,
MEM_TRISC0_FIRMWARE_BASE,
MEM_TRISC1_FIRMWARE_BASE,
MEM_TRISC2_FIRMWARE_BASE,
eth_l1_mem::address_map::FIRMWARE_BASE,
MEM_IERISC_FIRMWARE_BASE,
#ifdef ARCH_BLACKHOLE
MEM_SLAVE_IERISC_FIRMWARE_BASE,
#endif
};

  • RUN_MSG_DONE, launch_msg_t, etc from dev_msgs.h
  • *_FIRMWARE_BASE from dev_mem_map.h
  • eth_l1_mem::address_map::FIRMWARE_BASE, eth_l1_mem::address_map::LAUNCH_ERISC_APP_FLAG) from eth_l1_address_map.h

These are all architecture specific things.

Need to see if you can move behind hal.

@blozano-tt
Copy link
Contributor Author

@abhullar-tt you cleaned up a bunch of these *_FIRMWARE_BASE usages from llrt.cpp, but you left a couple behind.

uint32_t firmware_base = is_eth_core ? MEM_IERISC_FIRMWARE_BASE : MEM_BRISC_FIRMWARE_BASE;

Also, some parameter here needs to be dealt with LAUNCH_ERISC_APP_FLAG behind Hal?:

llrt::write_hex_vec_to_core(chip, core, tt::stl::Span(&ERISC_APP_FW_ON_CORE_FLAG, 1), eth_l1_mem::address_map::LAUNCH_ERISC_APP_FLAG);

Would it be quick for you to address this?

Alternatively, any guidance?

Thanks,
@blozano-tt

@abhullar-tt
Copy link
Contributor

Actually have a PR that gets rid of this entirely: #14817

Planning on merging this soon 🖖

@blozano-tt blozano-tt linked a pull request Dec 4, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants