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
1e15e83b
Commit
1e15e83b
authored
Apr 30, 2019
by
SergeyDegtyar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new tests to 'backends'
parent
2d606f87
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
3 deletions
+124
-3
backends/Makefile
+2
-1
backends/scripts/write_firrtl.ys
+2
-0
backends/write_edif/top.v
+8
-2
backends/write_firrtl_paramod/testbench.v
+63
-0
backends/write_firrtl_paramod/top.v
+49
-0
No files found.
backends/Makefile
View file @
1e15e83b
...
...
@@ -38,7 +38,7 @@ $(eval $(call template,write_btor_shiftx,write_btor write_btor_v write_btor_s))
$(eval
$(call
template,write_edif,write_edif
write_edif_top
write_edif_nogndvcc
write_edif_pvector_par
write_edif_pvector_bra
write_edif_pvector_ang
write_edif_attrprop
))
#write_firrtl
$(eval
$(call
template,write_firrtl,write_firrtl
write_firrtl
))
$(eval
$(call
template,write_firrtl,write_firrtl))
#write_firrtl_mem_wr - issue #938
#terminate called after throwing an instance of 'std::out_of_range'
# what(): dict::at()
...
...
@@ -48,6 +48,7 @@ $(eval $(call template,write_firrtl_logic,write_firrtl ))
$(eval
$(call
template,write_firrtl_reduce,write_firrtl
))
$(eval
$(call
template,write_firrtl_shift,write_firrtl
))
$(eval
$(call
template,write_firrtl_shiftx,write_firrtl
))
$(eval
$(call
template,write_firrtl_paramod,write_firrtl))
#write_ilang
$(eval
$(call
template,write_ilang,write_ilang
write_ilang_selected))
...
...
backends/scripts/write_firrtl.ys
View file @
1e15e83b
read_verilog ../top.v
proc
write_firrtl firrtl.firrtl
synth
write_firrtl firrtl2.firrtl
write_verilog synth.v
backends/write_edif/top.v
View file @
1e15e83b
...
...
@@ -8,6 +8,8 @@ module top
output
reg
cout
)
;
wire
bb_out
;
initial
begin
A
=
0
;
cout
=
0
;
...
...
@@ -24,12 +26,16 @@ end
assign
{
cout
,
A
}
=
cin
-
y
*
x
;
`endif
bb
ubb
(
cin
,
y
,
x
)
;
bb
ubb
(
cin
,
y
,
x
,
bb_out
)
;
endmodule
(
*
black_box
*
)
module
bb
(
in1
,
in2
,
clk
)
;
(
*
black_box
*
)
module
bb
(
in1
,
in2
,
clk
,
out1
)
;
input
in1
;
input
in2
;
input
clk
;
output
reg
out1
;
always
@
(
posedge
clk
)
out1
<=
in1
&
in2
;
endmodule
backends/write_firrtl_paramod/testbench.v
0 → 100644
View file @
1e15e83b
module
middle_tb
(
input
x
,
input
y
,
output
o
)
;
parameter
Y
=
1'b1
;
urtl_tb
u_urtl
(
.
x
(
x
)
,.
o
(
o
)
,.
y
(
Y
))
;
endmodule
module
urtl_tb
(
input
x
,
input
y
,
output
o
)
;
assign
o
=
x
+
y
;
endmodule
module
testbench
;
reg
[
0
:
2
]
in
;
reg
patt_A
=
1
'
bX
;
wire
patt_cout
;
wire
cout
,
o
;
wire
A
;
initial
begin
// $dumpfile("testbench.vcd");
// $dumpvars(0, testbench);
#
5
in
=
0
;
repeat
(
10000
)
begin
#
5
in
=
in
+
1
;
end
$
display
(
"OKAY"
)
;
end
top
uut
(
.
x
(
in
[
0
])
,
.
y
(
in
[
1
])
,
.
cin
(
in
[
2
])
,
.
A
(
A
)
,
.
cout
(
cout
)
)
;
always
@
(
posedge
in
[
2
])
patt_A
<=
o
;
assign
pattcout
=
in
[
2
]
?
in
[
1
]
:
in
[
0
]
;
middle_tb
#(
1'b0
)
u_mid1
(
.
x
(
in
[
0
])
,.
o
(
o
)
,.
y
(
1'b0
))
;
middle_tb
#(
1'b0
)
u_mid2
(
.
x
(
in
[
0
])
,.
o
(
o
)
,.
y
(
1'b1
))
;
middle_tb
#(
1'b0
)
u_mid3
(
.
x
(
in
[
0
])
,.
o
(
o
)
,.
y
(
1
'
bX
))
;
middle_tb
#(
1'b0
)
u_mid4
(
.
x
(
in
[
0
])
,.
o
(
o
)
,.
y
(
1
'
bX
))
;
assert_comb
out_test
(
.
A
(
patt_A
)
,
.
B
(
A
))
;
endmodule
backends/write_firrtl_paramod/top.v
0 → 100644
View file @
1e15e83b
module
top
(
input
x
,
input
y
,
input
cin
,
output
reg
A
,
output
cout
)
;
parameter
X
=
1
;
wire
o
;
`ifndef
BUG
always
@
(
posedge
cin
)
A
<=
o
;
assign
cout
=
cin
?
y
:
x
;
middle
#(
1'b0
)
u_mid1
(
.
x
(
x
)
,.
o
(
o
)
,.
y
(
1'b0
))
;
middle
#(
1'b0
)
u_mid2
(
.
x
(
x
)
,.
o
(
o
)
,.
y
(
1'b1
))
;
middle
#(
1'b0
)
u_mid3
(
.
x
(
x
)
,.
o
(
o
)
,.
y
(
1
'
bX
))
;
middle
#(
1'b0
)
u_mid4
(
.
x
(
x
)
,.
o
(
o
)
,.
y
(
1
'
bX
))
;
`else
assign
{
cout
,
A
}
=
cin
-
y
*
x
;
`endif
endmodule
module
middle
(
input
x
,
input
y
,
output
o
)
;
parameter
Y
=
1'b1
;
urtl
u_urtl
(
.
x
(
x
)
,.
o
(
o
)
,.
y
(
Y
))
;
endmodule
module
urtl
(
input
x
,
input
y
,
output
o
)
;
assign
o
=
x
+
y
;
endmodule
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