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
c4224333
Commit
c4224333
authored
Aug 23, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More sane test names
parent
f1293367
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
architecture/synth_xilinx_srl/generate.py
+36
-36
No files found.
architecture/synth_xilinx_srl/generate.py
View file @
c4224333
...
...
@@ -70,10 +70,10 @@ endmodule
# Test 1: pos_clk_no_enable_no_init_not_inferred
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test1
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
pos_clk_no_enable_no_init_not_inferred
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test1
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
module
pos_clk_no_enable_no_init_not_inferred
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
generate
wire [depth:0] int [width-1:0];
genvar w, d;
...
...
@@ -87,14 +87,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test1
'
)
assert_static_area
(
fp
,
i
,
'
pos_clk_no_enable_no_init_not_inferred
'
)
# Test 2: pos_clk_with_enable_no_init_not_inferred
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test2
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
pos_clk_with_enable_no_init_not_inferred
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test2
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
module
pos_clk_with_enable_no_init_not_inferred
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
generate
wire [depth:0] int [width-1:0];
genvar w, d;
...
...
@@ -108,14 +108,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test2
'
)
assert_static_area
(
fp
,
i
,
'
pos_clk_with_enable_no_init_not_inferred
'
)
# Test 3: pos_clk_with_enable_with_init_inferred
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test3
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
pos_clk_with_enable_with_init_inferred
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test3
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
module
pos_clk_with_enable_with_init_inferred
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
generate
reg [depth-1:0] int [width-1:0];
...
...
@@ -136,14 +136,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test3
'
)
assert_static_area
(
fp
,
i
,
'
pos_clk_with_enable_with_init_inferred
'
)
# Test 4: neg_clk_no_enable_no_init_not_inferred
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test4
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
neg_clk_no_enable_no_init_not_inferred
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test4
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
module
neg_clk_no_enable_no_init_not_inferred
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
generate
wire [depth:0] int [width-1:0];
genvar w, d;
...
...
@@ -157,14 +157,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test4
'
)
assert_static_area
(
fp
,
i
,
'
neg_clk_no_enable_no_init_not_inferred
'
)
# Test 5: neg_clk_no_enable_no_init_inferred
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test5
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
neg_clk_no_enable_no_init_inferred
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test5
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
module
neg_clk_no_enable_no_init_inferred
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
generate
reg [depth-1:0] int [width-1:0];
...
...
@@ -182,14 +182,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test5
'
)
assert_static_area
(
fp
,
i
,
'
neg_clk_no_enable_no_init_inferred
'
)
# Test 6: neg_clk_with_enable_with_init_inferred
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test6
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
neg_clk_with_enable_with_init_inferred
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test6
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
module
neg_clk_with_enable_with_init_inferred
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
generate
reg [depth-1:0] int [width-1:0];
...
...
@@ -210,14 +210,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test6
'
)
assert_static_area
(
fp
,
i
,
'
neg_clk_with_enable_with_init_inferred
'
)
# Test 10: pos_clk_no_enable_no_init_not_inferred_var_len
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test10
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
pos_clk_no_enable_no_init_not_inferred_var_len
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test10
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input [31:0] l, output [width-1:0] q);
module
pos_clk_no_enable_no_init_not_inferred_var_len
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input [31:0] l, output [width-1:0] q);
generate
wire [depth:0] int [width-1:0];
genvar w, d;
...
...
@@ -233,14 +233,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_dynamic_area
(
fp
,
i
,
'
test10
'
)
assert_dynamic_area
(
fp
,
i
,
'
pos_clk_no_enable_no_init_not_inferred_var_len
'
)
# Test 11: neg_clk_with_enable_with_init_inferred_var_len
for
i
in
range
(
1
,
N
+
1
):
with
open
(
'
test11
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
neg_clk_with_enable_with_init_inferred_var_len
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test11
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, input [31:0] l, output [width-1:0] q);
module
neg_clk_with_enable_with_init_inferred_var_len
_{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 [depth-1:0] int [width-1:0];
...
...
@@ -261,7 +261,7 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_dynamic_area
(
fp
,
i
,
'
test11
'
)
assert_dynamic_area
(
fp
,
i
,
'
neg_clk_with_enable_with_init_inferred_var_len
'
)
import
lfsr_area
re_lfsr
=
re
.
compile
(
r'lfsr_(\d+)\.v'
)
...
...
@@ -282,10 +282,10 @@ endmodule
# Test 15: pos_clk_no_enable_no_init_not_inferred
for
i
in
range
(
128
+
1
,
128
+
N
+
1
):
with
open
(
'
test15
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
pos_clk_no_enable_no_init_not_inferred
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test15
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
module
pos_clk_no_enable_no_init_not_inferred
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, output [width-1:0] q);
generate
wire [depth:0] int [width-1:0];
genvar w, d;
...
...
@@ -299,14 +299,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test15
'
)
assert_static_area
(
fp
,
i
,
'
pos_clk_no_enable_no_init_not_inferred
'
)
# Test 16: neg_clk_with_enable_with_init_inferred_var_len
for
i
in
range
(
128
+
1
,
128
+
N
+
1
):
with
open
(
'
test16
_
%
d.v'
%
i
,
'w'
)
as
fp
:
with
open
(
'
neg_clk_with_enable_with_init_inferred_var_len
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test16
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, input [31:0] l, output [width-1:0] q);
module
neg_clk_with_enable_with_init_inferred_var_len
_{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 [depth-1:0] int [width-1:0];
...
...
@@ -327,14 +327,14 @@ generate
endgenerate
endmodule
'''
.
format
(
i
))
assert_dynamic_area
(
fp
,
i
,
'
test16
'
)
assert_dynamic_area
(
fp
,
i
,
'
neg_clk_with_enable_with_init_inferred_var_len
'
)
# 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
:
with
open
(
'
neg_clk_with_enable_with_init_inferred2
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
module
test18
_{0} #(parameter width=1, depth={0}) (input clk, input [width-1:0] i, input e, output [width-1:0] q);
module
neg_clk_with_enable_with_init_inferred2
_{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];
...
...
@@ -354,14 +354,14 @@ generate
assign q = int[depth-1];
endgenerate
endmodule'''
.
format
(
i
))
assert_static_area
(
fp
,
i
,
'
test18
'
)
assert_static_area
(
fp
,
i
,
'
neg_clk_with_enable_with_init_inferred2
'
)
# 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
:
with
open
(
'
pos_clk_with_enable_no_init_inferred2_var_len
_
%
d.v'
%
i
,
'w'
)
as
fp
:
fp
.
write
(
'''
(* top *)
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);
module
pos_clk_with_enable_no_init_inferred2_var_len
_{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];
...
...
@@ -381,4 +381,4 @@ generate
assign q = int[l];
endgenerate
endmodule'''
.
format
(
i
))
assert_dynamic_area
(
fp
,
i
,
'
test19
'
)
assert_dynamic_area
(
fp
,
i
,
'
pos_clk_with_enable_no_init_inferred2_var_len
'
)
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