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

Added check to caches to avoid invalid configurations #339

Merged
merged 1 commit into from
Sep 16, 2024
Merged
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
7 changes: 7 additions & 0 deletions src/HLS/module_generator/ReadWrite_m_axiModuleGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ void ReadWrite_m_axiModuleGenerator::InternalExec(std::ostream& out, structural_
}
}

const auto out1_port = mod->find_member("out1", port_o_K, mod);
THROW_ASSERT(out1_port, "out1 port must be present in " + mod->get_path());
const auto fe_data_w = STD_GET_SIZE(GetPointer<port_o>(out1_port)->get_typeRef());
THROW_ASSERT((1ULL << std::stoull(word_off_w)) * fe_data_w >= std::stoull(be_data_w),
"ERROR: Cache line of " + STR((1ULL << std::stoull(word_off_w)) * fe_data_w) +
" bits is smaller than bus size (" + STR(be_data_w) + ")");

ip_components = "IOB_cache_axi";
out << "wire [BITSIZE_address-1:BITSIZE_log_data_size] addr;\n"
<< "wire [BITSIZE_data_size-1:0] wstrb;\n"
Expand Down
Loading