mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 12:28:44 +00:00
Add builtin celltype $scopeinfo
Only declares the cell interface, doesn't make anything use or understand $scopeinfo yet.
This commit is contained in:
parent
269c50f90e
commit
f728927307
|
@ -108,6 +108,7 @@ struct CellTypes
|
||||||
setup_type(ID($overwrite_tag), {ID::A, ID::SET, ID::CLR}, pool<RTLIL::IdString>());
|
setup_type(ID($overwrite_tag), {ID::A, ID::SET, ID::CLR}, pool<RTLIL::IdString>());
|
||||||
setup_type(ID($original_tag), {ID::A}, {ID::Y});
|
setup_type(ID($original_tag), {ID::A}, {ID::Y});
|
||||||
setup_type(ID($future_ff), {ID::A}, {ID::Y});
|
setup_type(ID($future_ff), {ID::A}, {ID::Y});
|
||||||
|
setup_type(ID($scopeinfo), {}, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_internals_eval()
|
void setup_internals_eval()
|
||||||
|
|
|
@ -1769,6 +1769,15 @@ namespace {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cell->type == ID($scopeinfo)) {
|
||||||
|
param(ID::TYPE);
|
||||||
|
check_expected();
|
||||||
|
std::string scope_type = cell->getParam(ID::TYPE).decode_string();
|
||||||
|
if (scope_type != "module" && scope_type != "struct")
|
||||||
|
error(__LINE__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (cell->type == ID($_BUF_)) { port(ID::A,1); port(ID::Y,1); check_expected(); return; }
|
if (cell->type == ID($_BUF_)) { port(ID::A,1); port(ID::Y,1); check_expected(); return; }
|
||||||
if (cell->type == ID($_NOT_)) { port(ID::A,1); port(ID::Y,1); check_expected(); return; }
|
if (cell->type == ID($_NOT_)) { port(ID::A,1); port(ID::Y,1); check_expected(); return; }
|
||||||
if (cell->type == ID($_AND_)) { port(ID::A,1); port(ID::B,1); port(ID::Y,1); check_expected(); return; }
|
if (cell->type == ID($_AND_)) { port(ID::A,1); port(ID::B,1); port(ID::Y,1); check_expected(); return; }
|
||||||
|
|
|
@ -1379,6 +1379,11 @@ bool SatGen::importCell(RTLIL::Cell *cell, int timestep)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cell->type == ID($scopeinfo))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Unsupported internal cell types: $pow $fsm $mem*
|
// Unsupported internal cell types: $pow $fsm $mem*
|
||||||
// .. and all sequential cells with asynchronous inputs
|
// .. and all sequential cells with asynchronous inputs
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -2763,3 +2763,10 @@ assign Y = A;
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
|
|
||||||
|
(* noblackbox *)
|
||||||
|
module \$scopeinfo ();
|
||||||
|
|
||||||
|
parameter TYPE = "";
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
Loading…
Reference in a new issue