-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test_cell tests for C++ functional backend
- Loading branch information
1 parent
217ea27
commit c7f665e
Showing
49 changed files
with
963 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
#ifndef SIM_H | ||
#define SIM_H | ||
|
||
#include <cassert> | ||
#include <array> | ||
|
||
template<size_t n> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
my_module_cxxrtl.cc | ||
my_module_functional_cxx.cc | ||
vcd_harness | ||
*.vcd |
17 changes: 17 additions & 0 deletions
17
tests/functional/single_cells/rtlil/test_cell_add_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 5 input 1 \A | ||
wire width 4 input 2 \B | ||
wire width 6 output 3 \Y | ||
cell $add \UUT | ||
parameter \A_SIGNED 1 | ||
parameter \A_WIDTH 5 | ||
parameter \B_SIGNED 1 | ||
parameter \B_WIDTH 4 | ||
parameter \Y_WIDTH 6 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
25 changes: 25 additions & 0 deletions
25
tests/functional/single_cells/rtlil/test_cell_alu_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 8 input 1 \A | ||
wire width 7 input 2 \B | ||
wire input 3 \BI | ||
wire input 4 \CI | ||
wire width 6 output 5 \CO | ||
wire width 6 output 6 \X | ||
wire width 6 output 7 \Y | ||
cell $alu \UUT | ||
parameter \A_SIGNED 0 | ||
parameter \A_WIDTH 8 | ||
parameter \B_SIGNED 0 | ||
parameter \B_WIDTH 7 | ||
parameter \Y_WIDTH 6 | ||
connect \A \A | ||
connect \B \B | ||
connect \BI \BI | ||
connect \CI \CI | ||
connect \CO \CO | ||
connect \X \X | ||
connect \Y \Y | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
tests/functional/single_cells/rtlil/test_cell_and_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 2 input 1 \A | ||
wire width 3 input 2 \B | ||
wire width 2 output 3 \Y | ||
cell $and \UUT | ||
parameter \A_SIGNED 1 | ||
parameter \A_WIDTH 2 | ||
parameter \B_SIGNED 1 | ||
parameter \B_WIDTH 3 | ||
parameter \Y_WIDTH 2 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
tests/functional/single_cells/rtlil/test_cell_bmux_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 8 input 1 \A | ||
wire input 2 \S | ||
wire width 4 output 3 \Y | ||
cell $bmux \UUT | ||
parameter \S_WIDTH 1 | ||
parameter \WIDTH 4 | ||
connect \A \A | ||
connect \S \S | ||
connect \Y \Y | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
tests/functional/single_cells/rtlil/test_cell_demux_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 6 input 1 \A | ||
wire width 5 input 2 \S | ||
wire width 192 output 3 \Y | ||
cell $demux \UUT | ||
parameter \S_WIDTH 5 | ||
parameter \WIDTH 6 | ||
connect \A \A | ||
connect \S \S | ||
connect \Y \Y | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
tests/functional/single_cells/rtlil/test_cell_div_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 4 input 1 \A | ||
wire width 6 input 2 \B | ||
wire output 3 \Y | ||
cell $div \UUT | ||
parameter \A_SIGNED 0 | ||
parameter \A_WIDTH 4 | ||
parameter \B_SIGNED 0 | ||
parameter \B_WIDTH 6 | ||
parameter \Y_WIDTH 1 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
tests/functional/single_cells/rtlil/test_cell_divfloor_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 4 input 1 \A | ||
wire width 4 input 2 \B | ||
wire width 6 output 3 \Y | ||
cell $divfloor \UUT | ||
parameter \A_SIGNED 0 | ||
parameter \A_WIDTH 4 | ||
parameter \B_SIGNED 0 | ||
parameter \B_WIDTH 4 | ||
parameter \Y_WIDTH 6 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 5 input 1 \A | ||
wire input 2 \B | ||
wire width 4 output 3 \Y | ||
cell $eq \UUT | ||
parameter \A_SIGNED 0 | ||
parameter \A_WIDTH 5 | ||
parameter \B_SIGNED 0 | ||
parameter \B_WIDTH 1 | ||
parameter \Y_WIDTH 4 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire input 1 \A | ||
wire input 2 \B | ||
wire input 3 \C | ||
wire output 4 \X | ||
wire output 5 \Y | ||
cell $fa \UUT | ||
parameter \WIDTH 1 | ||
connect \A \A | ||
connect \B \B | ||
connect \C \C | ||
connect \X \X | ||
connect \Y \Y | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 3 input 1 \A | ||
wire width 7 input 2 \B | ||
wire width 6 output 3 \Y | ||
cell $ge \UUT | ||
parameter \A_SIGNED 1 | ||
parameter \A_WIDTH 3 | ||
parameter \B_SIGNED 1 | ||
parameter \B_WIDTH 7 | ||
parameter \Y_WIDTH 6 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 7 input 1 \A | ||
wire width 3 input 2 \B | ||
wire width 4 output 3 \Y | ||
cell $gt \UUT | ||
parameter \A_SIGNED 1 | ||
parameter \A_WIDTH 7 | ||
parameter \B_SIGNED 1 | ||
parameter \B_WIDTH 3 | ||
parameter \Y_WIDTH 4 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
15 changes: 15 additions & 0 deletions
15
tests/functional/single_cells/rtlil/test_cell_lcu_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire input 1 \CI | ||
wire width 2 output 2 \CO | ||
wire width 2 input 3 \G | ||
wire width 2 input 4 \P | ||
cell $lcu \UUT | ||
parameter \WIDTH 2 | ||
connect \CI \CI | ||
connect \CO \CO | ||
connect \G \G | ||
connect \P \P | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 5 input 1 \A | ||
wire width 4 input 2 \B | ||
wire width 6 output 3 \Y | ||
cell $le \UUT | ||
parameter \A_SIGNED 1 | ||
parameter \A_WIDTH 5 | ||
parameter \B_SIGNED 1 | ||
parameter \B_WIDTH 4 | ||
parameter \Y_WIDTH 6 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
tests/functional/single_cells/rtlil/test_cell_logic_and_00000.il
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Yosys 0.41+101 (git sha1 83a8e5de4, g++ 13.2.0 -fPIC -Os) | ||
autoidx 1 | ||
module \gold | ||
wire width 2 input 1 \A | ||
wire width 7 input 2 \B | ||
wire output 3 \Y | ||
cell $logic_and \UUT | ||
parameter \A_SIGNED 0 | ||
parameter \A_WIDTH 2 | ||
parameter \B_SIGNED 0 | ||
parameter \B_WIDTH 7 | ||
parameter \Y_WIDTH 1 | ||
connect \A \A | ||
connect \B \B | ||
connect \Y \Y | ||
end | ||
end |
Oops, something went wrong.