Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yosys-tests
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yosys-tests
Commits
c4dcff58
Commit
c4dcff58
authored
Sep 15, 2019
by
Miodrag Milanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests to actually generate adders
parent
3da3c26c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
33 deletions
+36
-33
architecture/synth_anlogic_fulladder/testbench.v
+12
-11
architecture/synth_anlogic_fulladder/top.v
+5
-5
architecture/synth_efinix_fulladder/testbench.v
+2
-1
architecture/synth_ice40_fulladder/testbench.v
+12
-11
architecture/synth_ice40_fulladder/top.v
+5
-5
No files found.
architecture/synth_anlogic_fulladder/testbench.v
View file @
c4dcff58
module
testbench
;
reg
[
2
:
0
]
in
;
reg
[
11
:
0
]
in
;
wire
patt_out
,
out
;
wire
patt_carry_out
,
carryout
;
wire
[
4
:
0
]
patt_out
,
out
;
wire
[
4
:
0
]
patt_carry_out
,
carryout
;
initial
begin
// $dumpfile("testbench.vcd");
// $dumpvars(0, testbench);
#
5
in
=
0
;
in
=
0
;
repeat
(
10000
)
begin
#
5
in
=
in
+
1
;
end
...
...
@@ -17,16 +17,17 @@ module testbench;
end
top
uut
(
.
x
(
in
[
0
])
,
.
y
(
in
[
1
])
,
.
cin
(
in
[
2
])
,
.
x
(
in
[
3
:
0
])
,
.
y
(
in
[
7
:
4
])
,
.
cin
(
in
[
11
:
8
])
,
.
A
(
out
)
,
.
cout
(
carryout
)
)
;
assign
{
patt_carry_out
,
patt_out
}
=
in
[
2
]
+
in
[
1
]
+
in
[
0
]
;
assert_comb
out_test
(
.
A
(
patt_out
)
,
.
B
(
out
))
;
assert_comb
carry_test
(
.
A
(
patt_carry_out
)
,
.
B
(
carryout
))
;
assign
{
patt_carry_out
,
patt_out
}
=
in
[
11
:
8
]
+
in
[
7
:
4
]
+
in
[
3
:
0
]
;
assert_comb
out_test
(
.
A
(
patt_out
[
3
])
,
.
B
(
out
[
3
]))
;
assert_comb
carry_test
(
.
A
(
patt_carry_out
[
3
])
,
.
B
(
carryout
[
3
]))
;
endmodule
architecture/synth_anlogic_fulladder/top.v
View file @
c4dcff58
module
top
(
input
x
,
input
y
,
input
cin
,
input
[
3
:
0
]
x
,
input
[
3
:
0
]
y
,
input
[
3
:
0
]
cin
,
output
A
,
output
cout
output
[
4
:
0
]
A
,
output
[
4
:
0
]
cout
)
;
`ifndef
BUG
...
...
architecture/synth_efinix_fulladder/testbench.v
View file @
c4dcff58
...
...
@@ -8,7 +8,7 @@ module testbench;
// $dumpfile("testbench.vcd");
// $dumpvars(0, testbench);
#
5
in
=
0
;
in
=
0
;
repeat
(
10000
)
begin
#
5
in
=
in
+
1
;
end
...
...
@@ -30,3 +30,4 @@ module testbench;
assert_comb
carry_test
(
.
A
(
patt_carry_out
[
3
])
,
.
B
(
carryout
[
3
]))
;
endmodule
architecture/synth_ice40_fulladder/testbench.v
View file @
c4dcff58
module
testbench
;
reg
[
2
:
0
]
in
;
reg
[
11
:
0
]
in
;
wire
patt_out
,
out
;
wire
patt_carry_out
,
carryout
;
wire
[
4
:
0
]
patt_out
,
out
;
wire
[
4
:
0
]
patt_carry_out
,
carryout
;
initial
begin
// $dumpfile("testbench.vcd");
// $dumpvars(0, testbench);
#
5
in
=
0
;
in
=
0
;
repeat
(
10000
)
begin
#
5
in
=
in
+
1
;
end
...
...
@@ -17,16 +17,17 @@ module testbench;
end
top
uut
(
.
x
(
in
[
0
])
,
.
y
(
in
[
1
])
,
.
cin
(
in
[
2
])
,
.
x
(
in
[
3
:
0
])
,
.
y
(
in
[
7
:
4
])
,
.
cin
(
in
[
11
:
8
])
,
.
A
(
out
)
,
.
cout
(
carryout
)
)
;
assign
{
patt_carry_out
,
patt_out
}
=
in
[
2
]
+
in
[
1
]
+
in
[
0
]
;
assert_comb
out_test
(
.
A
(
patt_out
)
,
.
B
(
out
))
;
assert_comb
carry_test
(
.
A
(
patt_carry_out
)
,
.
B
(
carryout
))
;
assign
{
patt_carry_out
,
patt_out
}
=
in
[
11
:
8
]
+
in
[
7
:
4
]
+
in
[
3
:
0
]
;
assert_comb
out_test
(
.
A
(
patt_out
[
3
])
,
.
B
(
out
[
3
]))
;
assert_comb
carry_test
(
.
A
(
patt_carry_out
[
3
])
,
.
B
(
carryout
[
3
]))
;
endmodule
architecture/synth_ice40_fulladder/top.v
View file @
c4dcff58
module
top
(
input
x
,
input
y
,
input
cin
,
input
[
3
:
0
]
x
,
input
[
3
:
0
]
y
,
input
[
3
:
0
]
cin
,
output
A
,
output
cout
output
[
4
:
0
]
A
,
output
[
4
:
0
]
cout
)
;
`ifndef
BUG
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment