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
35149c4e
Commit
35149c4e
authored
Jul 14, 2020
by
Jędrzej Boczar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
soc/integration: update add_adapter to convert between AXILite/Wishbone
parent
6671eb62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
litex/soc/integration/soc.py
litex/soc/integration/soc.py
+15
-0
No files found.
litex/soc/integration/soc.py
View file @
35149c4e
...
...
@@ -280,6 +280,21 @@ class SoCBusHandler(Module):
# Add Master/Slave -----------------------------------------------------------------------------
def
add_adapter
(
self
,
name
,
interface
,
direction
=
"m2s"
):
assert
direction
in
[
"m2s"
,
"s2m"
]
if
isinstance
(
interface
,
axi
.
AXILiteInterface
):
self
.
logger
.
info
(
"{} Bus {} from {} to {}."
.
format
(
colorer
(
name
),
colorer
(
"converted"
,
color
=
"cyan"
),
colorer
(
"AXILite"
),
colorer
(
"Wishbone"
)))
new_interface
=
wishbone
.
Interface
(
data_width
=
interface
.
data_width
)
if
direction
==
"m2s"
:
converter
=
axi
.
AXILite2Wishbone
(
axi_lite
=
interface
,
wishbone
=
new_interface
)
elif
direction
==
"s2m"
:
converter
=
axi
.
Wishbone2AXILite
(
wishbone
=
new_interface
,
axi_lite
=
interface
)
self
.
submodules
+=
converter
interface
=
new_interface
if
interface
.
data_width
!=
self
.
data_width
:
self
.
logger
.
info
(
"{} Bus {} from {}-bit to {}-bit."
.
format
(
colorer
(
name
),
...
...
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