3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-22 05:43:40 +00:00

Added $slice and $concat cell types

This commit is contained in:
Clifford Wolf 2014-02-07 17:44:57 +01:00
parent a1ac710ab8
commit fc3b3c4ec3
8 changed files with 140 additions and 4 deletions

View file

@ -462,6 +462,24 @@ namespace {
return;
}
if (cell->type == "$slice") {
param("\\OFFSET");
port("\\A", param("\\A_WIDTH"));
port("\\Y", param("\\Y_WIDTH"));
if (param("\\OFFSET") + param("\\Y_WIDTH") > param("\\A_WIDTH"))
error(__LINE__);
check_expected();
return;
}
if (cell->type == "$concat") {
port("\\A", param("\\A_WIDTH"));
port("\\B", param("\\B_WIDTH"));
port("\\Y", param("\\A_WIDTH") + param("\\B_WIDTH"));
check_expected();
return;
}
if (cell->type == "$mux") {
port("\\A", param("\\WIDTH"));
port("\\B", param("\\WIDTH"));