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

Fix yosys-plugin extract syntax #7

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions yosys-plugin/churchroad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ struct LakeroadWorker
// The let-bound ID string of the expression to extract from.
auto extract_from_expr = get_expression_for_signal(sigmap(sig.chunks()[0].wire), -1);
auto new_id = get_new_id_str();
auto extract_expr = stringf("(Extract %d %d %s)", (chunk.offset + chunk.width - 1) + chunk.wire->start_offset,
auto extract_expr = stringf("(Op1 (Extract %d %d) %s)", (chunk.offset + chunk.width - 1) + chunk.wire->start_offset,
chunk.offset + chunk.wire->start_offset, extract_from_expr.c_str());

auto let_expr = let(new_id, extract_expr);
Expand All @@ -1404,7 +1404,7 @@ struct LakeroadWorker
if (to_width < GetSize(sig))
{
auto new_id = get_new_id_str();
auto extend_expr = stringf("(Extract %d %d %s)", to_width - 1, 0, out_expr.c_str());
auto extend_expr = stringf("(Op1 (Extract %d %d) %s)", to_width - 1, 0, out_expr.c_str());
f << let(new_id, extend_expr) << "\n";
out_expr = new_id;
}
Expand Down
Loading