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
f292b9fa
Commit
f292b9fa
authored
Feb 28, 2019
by
Eddie Hung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight tweaks for iverilog
parent
74a53328
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
architecture/synth_xilinx_srl/top.v
+18
-14
No files found.
architecture/synth_xilinx_srl/top.v
View file @
f292b9fa
`include
"defines.vh"
module
template
(
input
clk
,
input
a
,
input
e
,
output
z
)
;
module
template
(
input
clk
,
input
a
,
input
e
,
output
z
)
;
parameter
icell
=
1
;
parameter
icell
=
1
;
parameter
init
=
0
;
parameter
init
=
0
;
...
@@ -8,14 +10,14 @@ generate
...
@@ -8,14 +10,14 @@ generate
wire
[
len
:
0
]
int
;
wire
[
len
:
0
]
int
;
assign
int
[
0
]
=
a
;
assign
int
[
0
]
=
a
;
genvar
i
;
genvar
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
begin
for
(
i
=
0
;
i
<
len
;
i
=
i
+
1
)
begin
if
(
neg_clk
)
begin
if
(
neg_clk
)
begin
$
_
DFFE_NP_
r
(
.
C
(
clk
)
,
.
D
(
int
[
i
])
,
.
E
(
e
)
,
.
Q
(
int
[
i
+
1
]))
;
\
$
_
DFFE_NP_
r
(
.
C
(
clk
)
,
.
D
(
int
[
i
])
,
.
E
(
e
)
,
.
Q
(
int
[
i
+
1
]))
;
if
(
init
)
initial
r
.
Q
=
~
(
i
%
2
)
;
//
if (init) initial r.Q = ~(i % 2);
end
end
else
begin
else
begin
$
_
DFFE_PP_
r
(
.
C
(
clk
)
,
.
D
(
int
[
i
])
,
.
E
(
e
)
,
.
Q
(
int
[
i
+
1
]))
;
\
$
_
DFFE_PP_
r
(
.
C
(
clk
)
,
.
D
(
int
[
i
])
,
.
E
(
e
)
,
.
Q
(
int
[
i
+
1
]))
;
if
(
init
)
initial
r
.
Q
=
~
(
i
%
2
)
;
//
if (init) initial r.Q = ~(i % 2);
end
end
end
end
assign
z
=
int
[
len
]
;
assign
z
=
int
[
len
]
;
...
@@ -25,21 +27,23 @@ generate
...
@@ -25,21 +27,23 @@ generate
endgenerate
endgenerate
endmodule
endmodule
`define
N 131
module
top
(
input
clk
,
input
[
`N
-
1
:
0
]
a
,
input
e
,
output
[
`N
-
1
:
0
]
z1
,
z2
,
z3
,
z4
)
;
module
top
(
input
clk
,
input
[
`N
-
1
:
0
]
a
,
output
[
`N
-
1
:
0
]
z1
,
z2
,
z3
,
z4
)
;
generate
generate
genvar
i
;
genvar
i
;
for
(
i
=
0
;
i
<
`N
;
i
++
)
begin
:
pos_clk_no_enable_no_init_icell
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
pos_clk_no_enable_no_init_icell
template
#(
.
len
(
i
+
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z1
[
i
])
;
template
#(
.
len
(
i
+
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z1
[
i
])
;
end
end
for
(
i
=
0
;
i
<
`N
;
i
++
)
begin
:
pos_clk_no_enable_with
_init_icell
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
pos_clk_with_enable_no
_init_icell
template
#(
.
len
(
i
+
1
)
,
.
init
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z2
[
i
])
;
template
#(
.
len
(
i
+
1
)
)
sr
(
clk
,
a
[
i
]
,
e
,
z2
[
i
])
;
end
end
for
(
i
=
0
;
i
<
`N
;
i
++
)
begin
:
neg_clk_no_enable_no_init_icell
//for (i = 0; i < `N; i=i+1) begin : pos_clk_no_enable_with_init_icell
// template #(.len(i+1), .init(1)) sr(clk, a[i], 1'b1, z2[i]);
//end
for
(
i
=
0
;
i
<
`N
;
i
=
i
+
1
)
begin
:
neg_clk_no_enable_no_init_icell
template
#(
.
len
(
i
+
1
)
,
.
neg_clk
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z3
[
i
])
;
template
#(
.
len
(
i
+
1
)
,
.
neg_clk
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z3
[
i
])
;
end
end
for
(
i
=
0
;
i
<
`N
;
i
++
)
begin
:
neg_clk_no_enable_with_init_icell
//for (i = 0; i < `N; i=i+1
) begin : neg_clk_no_enable_with_init_icell
template
#(
.
len
(
i
+
1
)
,
.
neg_clk
(
1
)
,
.
init
(
1
))
sr
(
clk
,
a
[
i
]
,
1'b1
,
z4
[
i
])
;
//
template #(.len(i+1), .neg_clk(1), .init(1)) sr(clk, a[i], 1'b1, z4[i]);
end
//
end
endgenerate
endgenerate
endmodule
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