mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 07:27:58 +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
4 changed files with 22 additions and 0 deletions
|
@ -1769,6 +1769,15 @@ namespace {
|
|||
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($_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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue