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
5db7ad6e
Commit
5db7ad6e
authored
May 03, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test18-20
parent
7c07d710
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
architecture/synth_xilinx_srl/generate.py
+49
-0
architecture/synth_xilinx_srl/test20.v
+20
-0
No files found.
architecture/synth_xilinx_srl/generate.py
View file @
5db7ad6e
...
@@ -226,3 +226,52 @@ endgenerate
...
@@ -226,3 +226,52 @@ endgenerate
endmodule
endmodule
'''
.
format
(
i
))
'''
.
format
(
i
))
# Test 18: neg_clk_with_enable_with_init_inferred2
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'test18_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
module test18_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
generate
reg [width-1:0] int [depth-1:0];
genvar w, d;
for (d = 0; d < depth; d=d+1) begin
for (w = 0; w < width; w=w+1) begin
initial int[d][w] <= ~((d+w)
% 2
);
if (d == 0) begin
always @(negedge clk) if (e) int[d][w] <= i[w];
end
else begin
always @(negedge clk) if (e) int[d][w] <= int[d-1][w];
end
end
end
assign z = int[depth-1];
endgenerate
endmodule'''
.
format
(
i
))
# Test 19: pos_clk_with_enable_no_init_inferred2_var_len
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'test19_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
module test19_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, input [31:0] l, output [width-1:0] q);
generate
reg [width-1:0] int [depth-1:0];
genvar w, d;
for (d = 0; d < depth; d=d+1) begin
for (w = 0; w < width; w=w+1) begin
initial int[d][w] <= ~((d+w)
% 2
);
if (d == 0) begin
always @(posedge clk) if (e) int[d][w] <= i[w];
end
else begin
always @(posedge clk) if (e) int[d][w] <= int[d-1][w];
end
end
end
assign z = int[l];
endgenerate
endmodule'''
.
format
(
i
))
architecture/synth_xilinx_srl/test20.v
0 → 100644
View file @
5db7ad6e
module
test20
#(
parameter
width
=
130
,
depth
=
130
)
(
input
clk
,
input
[
width
-
1
:
0
]
i
,
input
e
,
output
[
width
-
1
:
0
]
q
)
;
generate
reg
[
width
-
1
:
0
]
int
[
depth
-
1
:
0
]
;
genvar
w
,
d
;
for
(
d
=
0
;
d
<
depth
;
d
=
d
+
1
)
begin
for
(
w
=
0
;
w
<
width
;
w
=
w
+
1
)
begin
initial
int
[
d
][
w
]
<=
~
((
d
+
w
)
%
2
)
;
if
(
d
==
0
)
begin
always
@
(
negedge
clk
)
if
(
e
)
int
[
d
][
w
]
<=
i
[
w
]
;
end
else
begin
always
@
(
negedge
clk
)
if
(
e
)
int
[
d
][
w
]
<=
int
[
d
-
1
][
w
]
;
end
end
end
assign
z
=
int
[
depth
-
1
]
;
endgenerate
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