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
c4152912
Commit
c4152912
authored
Mar 15, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing reset input, FIXME on test7, rename
parent
adf1f69e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
17 deletions
+26
-17
architecture/run.sh
+2
-0
architecture/scripts/synth_xilinx_srl.ys
+2
-0
architecture/synth_xilinx_srl/test1.ys
+0
-0
architecture/synth_xilinx_srl/test6.ys
+0
-0
architecture/synth_xilinx_srl/test7.ys
+2
-2
architecture/synth_xilinx_srl/test8.ys
+1
-1
architecture/synth_xilinx_srl/test9.ys
+1
-1
architecture/synth_xilinx_srl/testbench.v
+6
-2
architecture/synth_xilinx_srl/top.v
+12
-11
No files found.
architecture/run.sh
View file @
c4152912
...
...
@@ -68,6 +68,8 @@ elif [ "$1" = "synth_xilinx_srl" ]; then
iverilog
-DTEST8
synth8.v
-o
testbench ../testbench.v
-I
.. ../top.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/xilinx/cells_sim.v
run
iverilog
-DTEST9
synth9.v
-o
testbench ../testbench.v
-I
.. ../top.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/xilinx/cells_sim.v
#run
#iverilog -DTEST10 synth10.v -o testbench ../testbench.v -I.. ../top.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/xilinx/cells_sim.v
elif
[
"
$1
"
=
"synth_greenpak4"
]
;
then
iverilog
-o
testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/greenpak4/cells_sim_digital.v
else
...
...
architecture/scripts/synth_xilinx_srl.ys
View file @
c4152912
...
...
@@ -15,3 +15,5 @@ design -reset
script ../test8.ys
design -reset
script ../test9.ys
design -reset
script ../test10.ys
architecture/synth_xilinx_srl/test1.ys
View file @
c4152912
This diff is collapsed.
Click to expand it.
architecture/synth_xilinx_srl/test6.ys
View file @
c4152912
This diff is collapsed.
Click to expand it.
architecture/synth_xilinx_srl/test7.ys
View file @
c4152912
...
...
@@ -5,5 +5,5 @@ clean -purge
write_verilog synth7.v
# Check that shift registers with resets are not inferred into SRLs
cd $paramod\
template
\depth=131\er_is_reset=1; select t:SRL* -assert-count 0
cd $paramod\
template
\inferred=1\init=1\neg_clk=1\depth=131\er_is_reset=1; select t:SRL* -assert-count 0
cd $paramod\
shift_reg
\depth=131\er_is_reset=1; select t:SRL* -assert-count 0
cd $paramod\
shift_reg
\inferred=1\init=1\neg_clk=1\depth=131\er_is_reset=1; select t:SRL* -assert-count 0
architecture/synth_xilinx_srl/test8.ys
View file @
c4152912
...
...
@@ -5,4 +5,4 @@ clean -purge
write_verilog synth8.v
# Check that wide shift registers are not a problem
cd $paramod\
template
\width=131\depth=131; select t:FD* -assert-count 0
cd $paramod\
shift_reg
\width=131\depth=131; select t:FD* -assert-count 0
architecture/synth_xilinx_srl/test9.ys
View file @
c4152912
...
...
@@ -5,4 +5,4 @@ clean -purge
write_verilog synth9.v
# Check that wide shift registers are not a problem
cd $paramod\
template
\width=131\inferred=1\init=1\neg_clk=1\depth=131; select t:FD* -assert-count 0
cd $paramod\
shift_reg
\width=131\inferred=1\init=1\neg_clk=1\depth=131; select t:FD* -assert-count 0
architecture/synth_xilinx_srl/testbench.v
View file @
c4152912
...
...
@@ -17,7 +17,7 @@ module testbench;
end
reg
[
`N
-
1
:
0
]
a
;
reg
e
;
reg
e
,
r
;
wire
[
`N
-
1
:
0
]
y
;
wire
[
`N
-
1
:
0
]
z
;
...
...
@@ -25,6 +25,7 @@ module testbench;
.
clk
(
clk
)
,
.
a
(
a
)
,
.
e
(
e
)
,
.
r
(
r
)
,
.
z
(
y
)
)
;
...
...
@@ -32,11 +33,14 @@ module testbench;
.
clk
(
clk
)
,
.
a
(
a
)
,
.
e
(
e
)
,
.
r
(
r
)
,
.
z
(
z
)
)
;
always
@
(
negedge
clk
)
always
@
(
negedge
clk
)
begin
e
<=
$
random
;
r
<=
$
random
;
end
generate
genvar
i
;
...
...
architecture/synth_xilinx_srl/top.v
View file @
c4152912
...
...
@@ -5,47 +5,48 @@ generate
genvar
i
;
`ifdef
TEST1
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
pos_clk_no_enable_no_init_not_inferred
template
#(
.
depth
(
i
+
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z
[
i
])
;
shift_reg
#(
.
depth
(
i
+
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z
[
i
])
;
end
`elsif
TEST2
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
pos_clk_with_enable_no_init_not_inferred
template
#(
.
depth
(
i
+
1
))
sr
(
clk
,
a
[
i
]
,
e
,
z
[
i
])
;
shift_reg
#(
.
depth
(
i
+
1
))
sr
(
clk
,
a
[
i
]
,
e
,
z
[
i
])
;
end
`elsif
TEST3
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
pos_clk_with_enable_with_init_inferred
template
#(
.
depth
(
i
+
1
)
,
.
inferred
(
1
)
,
.
init
(
1
))
sr
(
clk
,
a
[
i
]
,
e
,
z
[
i
])
;
shift_reg
#(
.
depth
(
i
+
1
)
,
.
inferred
(
1
)
,
.
init
(
1
))
sr
(
clk
,
a
[
i
]
,
e
,
z
[
i
])
;
end
`elsif
TEST4
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
neg_clk_no_enable_no_init_not_inferred
template
#(
.
depth
(
i
+
1
)
,
.
neg_clk
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z
[
i
])
;
shift_reg
#(
.
depth
(
i
+
1
)
,
.
neg_clk
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z
[
i
])
;
end
`elsif
TEST5
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
neg_clk_no_enable_no_init_inferred
template
#(
.
depth
(
i
+
1
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z
[
i
])
;
shift_reg
#(
.
depth
(
i
+
1
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z
[
i
])
;
end
`elsif
TEST6
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
neg_clk_with_enable_with_init_inferred
template
#(
.
depth
(
i
+
1
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
)
,
.
init
(
1
))
sr
(
clk
,
a
[
i
]
,
e
,
z
[
i
])
;
shift_reg
#(
.
depth
(
i
+
1
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
)
,
.
init
(
1
))
sr
(
clk
,
a
[
i
]
,
e
,
z
[
i
])
;
end
`elsif
TEST7
// Check that use of resets block shreg
(
*
keep
*
)
template
#(
.
depth
(
`N
)
,
.
er_is_reset
(
1
))
pos_clk_no_enable_no_init_not_inferred_with_reset
(
clk
,
a
[
0
]
,
r
,
z
[
0
])
;
shift_reg
#(
.
depth
(
`N
)
,
.
er_is_reset
(
1
))
pos_clk_no_enable_no_init_not_inferred_with_reset
(
clk
,
a
[
1
]
,
r
,
z
[
0
])
;
(
*
keep
*
)
template
#(
.
depth
(
`N
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
)
,
.
init
(
1
)
,
.
er_is_reset
(
1
))
neg_clk_no_enable_with_init_with_inferred_with_reset
(
clk
,
a
[
1
]
,
r
,
z
[
1
]
)
;
shift_reg
#(
.
depth
(
`N
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
)
,
.
init
(
1
)
,
.
er_is_reset
(
1
))
neg_clk_no_enable_with_init_with_inferred_with_reset
(
clk
,
a
[
2
]
,
r
,
FIXME
/*z[1]*/
)
;
assign
z
[
`N
-
1
:
2
]
=
'b0
;
// Suppress no driver warning
`elsif
TEST8
// Check multi-bit works
(
*
keep
*
)
template
#(
.
depth
(
`N
)
,
.
width
(
`N
))
pos_clk_no_enable_no_init_not_inferred_N_width
(
clk
,
a
,
r
,
z
)
;
shift_reg
#(
.
depth
(
`N
)
,
.
width
(
`N
))
pos_clk_no_enable_no_init_not_inferred_N_width
(
clk
,
a
,
r
,
z
)
;
`elsif
TEST9
(
*
keep
*
)
template
#(
.
depth
(
`N
)
,
.
width
(
`N
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
)
,
.
init
(
1
))
neg_clk_no_enable_with_init_with_inferred_N_width
(
clk
,
a
,
r
,
z
)
;
shift_reg
#(
.
depth
(
`N
)
,
.
width
(
`N
)
,
.
neg_clk
(
1
)
,
.
inferred
(
1
)
,
.
init
(
1
))
neg_clk_no_enable_with_init_with_inferred_N_width
(
clk
,
a
,
r
,
z
)
;
`elsif
TEST10
`endif
endgenerate
endmodule
module
template
#(
parameter
width
=
1
)
(
input
clk
,
input
[
width
-
1
:
0
]
a
,
input
er
,
output
[
width
-
1
:
0
]
z
)
;
module
shift_reg
#(
parameter
width
=
1
)
(
input
clk
,
input
[
width
-
1
:
0
]
a
,
input
er
,
output
[
width
-
1
:
0
]
z
)
;
parameter
inferred
=
0
;
parameter
init
=
0
;
parameter
neg_clk
=
0
;
...
...
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