summaryrefslogtreecommitdiff
path: root/kernel/rtlil.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-02-07 17:44:57 +0100
committerClifford Wolf <clifford@clifford.at>2014-02-07 17:44:57 +0100
commitfc3b3c4ec3955b165166d9f44965fac0e1879505 (patch)
tree2552ece4d6e1709f7ef17d838b00f7f774faf95b /kernel/rtlil.cc
parenta1ac710ab8740ae781e0274f63633e8ed2650da4 (diff)
Added $slice and $concat cell types
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r--kernel/rtlil.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index 12aa35df..4c944c93 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -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"));