Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
litex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jonathan Currier
litex
Commits
b54b3b33
Commit
b54b3b33
authored
Jul 08, 2020
by
Florent Kermarrec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interconnect/avalon: minor cleanup, remove max on SyncFIFO depth.
parent
8af4e05c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
litex/soc/interconnect/avalon.py
litex/soc/interconnect/avalon.py
+7
-9
No files found.
litex/soc/interconnect/avalon.py
View file @
b54b3b33
# This file is Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr>
# This file is Copyright (c) 2019
-2020
Florent Kermarrec <florent@enjoy-digital.fr>
# License: BSD
"""Avalon support for LiteX"""
...
...
@@ -19,7 +19,7 @@ from litex.soc.interconnect import stream
class
Native2AvalonST
(
Module
):
"""Native LiteX's stream to Avalon-ST stream"""
def
__init__
(
self
,
layout
,
latency
=
2
):
self
.
sink
=
sink
=
stream
.
Endpoint
(
layout
)
self
.
sink
=
sink
=
stream
.
Endpoint
(
layout
)
self
.
source
=
source
=
stream
.
Endpoint
(
layout
)
# # #
...
...
@@ -38,15 +38,13 @@ class Native2AvalonST(Module):
class
AvalonST2Native
(
Module
):
"""Avalon-ST Stream to native LiteX's stream"""
def
__init__
(
self
,
layout
,
latency
=
2
):
self
.
sink
=
sink
=
stream
.
Endpoint
(
layout
)
self
.
sink
=
sink
=
stream
.
Endpoint
(
layout
)
self
.
source
=
source
=
stream
.
Endpoint
(
layout
)
# # #
buf
=
stream
.
SyncFIFO
(
layout
,
max
(
latency
,
4
)
)
buf
=
stream
.
SyncFIFO
(
layout
,
latency
)
self
.
submodules
+=
buf
self
.
comb
+=
[
sink
.
connect
(
buf
.
sink
,
omit
=
{
"ready"
}),
sink
.
ready
.
eq
(
source
.
ready
),
buf
.
source
.
connect
(
source
)
]
self
.
comb
+=
sink
.
connect
(
buf
.
sink
,
omit
=
{
"ready"
})
self
.
comb
+=
sink
.
ready
.
eq
(
source
.
ready
)
self
.
comb
+=
buf
.
source
.
connect
(
source
)
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