Add $shiftx support to verilog front-end

This commit is contained in:
Clifford Wolf 2017-10-07 13:40:54 +02:00
parent 2b04e8caa6
commit adf1754729
1 changed files with 17 additions and 0 deletions

View File

@ -678,6 +678,23 @@ bool dump_cell_expr(std::ostream &f, std::string indent, RTLIL::Cell *cell)
#undef HANDLE_UNIOP
#undef HANDLE_BINOP
if (cell->type == "$shiftx")
{
f << stringf("%s" "assign ", indent.c_str());
dump_sigspec(f, cell->getPort("\\Y"));
f << stringf(" = ");
dump_sigspec(f, cell->getPort("\\A"));
f << stringf("[");
if (cell->getParam("\\B_SIGNED").as_bool())
f << stringf("$signed(");
dump_sigspec(f, cell->getPort("\\B"));
if (cell->getParam("\\B_SIGNED").as_bool())
f << stringf(")");
f << stringf(" +: %d", cell->getParam("\\Y_WIDTH").as_int());
f << stringf("];\n");
return true;
}
if (cell->type == "$mux")
{
f << stringf("%s" "assign ", indent.c_str());