diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-02-07 17:44:57 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-02-07 17:44:57 +0100 |
commit | fc3b3c4ec3955b165166d9f44965fac0e1879505 (patch) | |
tree | 2552ece4d6e1709f7ef17d838b00f7f774faf95b /kernel/rtlil.cc | |
parent | a1ac710ab8740ae781e0274f63633e8ed2650da4 (diff) | |
download | yosys-fc3b3c4ec3955b165166d9f44965fac0e1879505.tar.gz yosys-fc3b3c4ec3955b165166d9f44965fac0e1879505.tar.bz2 yosys-fc3b3c4ec3955b165166d9f44965fac0e1879505.zip |
Added $slice and $concat cell types
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 12aa35df3..4c944c93c 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")); |