Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Coriolis VLSI EDA
Coriolis
Commits
ac3e78c5
Commit
ac3e78c5
authored
Jun 10, 2021
by
Luke Leighton
Browse files
allow ioSpecs loadFromPinmux to undersand IoPin.ANALOG format
parent
7961aab0
Changes
1
Hide whitespace changes
Inline
Side-by-side
cumulus/src/plugins/alpha/block/iospecs.py
View file @
ac3e78c5
...
...
@@ -120,7 +120,7 @@ class IoSpecs ( object ):
"""
Load ioPadsSpec from a LibreSOC generated pinmux file in JSON format.
"""
print
(
' o Loading I/O pad specifications from "
{}
".'
.
format
(
fileName
)
)
print
(
' o Loading I/O pad specifications from "
%s
".'
%
fileName
)
if
not
os
.
path
.
isfile
(
fileName
):
raise
ErrorMessage
(
2
,
[
'IoSpecs.loadFromPinmux(): '
'JSON pinmux file not found.'
...
...
@@ -128,10 +128,12 @@ class IoSpecs ( object ):
with
open
(
fileName
)
as
fd
:
datas
=
utf8toStr
(
json
.
loads
(
fd
.
read
(),
object_hook
=
utf8toStr
)
,
ignoreDicts
=
True
)
self
.
addIoPadSpecs
(
datas
[
'pads.east'
],
IoPin
.
EAST
)
self
.
addIoPadSpecs
(
datas
[
'pads.west'
],
IoPin
.
WEST
)
self
.
addIoPadSpecs
(
datas
[
'pads.north'
],
IoPin
.
NORTH
)
self
.
addIoPadSpecs
(
datas
[
'pads.south'
],
IoPin
.
SOUTH
)
# check if pad is analog or not: last spec item starts with "A"
analog
=
IoPin
.
ANALOG
if
padDatas
[
-
1
][
0
]
==
'A'
else
0
self
.
addIoPadSpecs
(
datas
[
'pads.east'
],
IoPin
.
EAST
|
analog
)
self
.
addIoPadSpecs
(
datas
[
'pads.west'
],
IoPin
.
WEST
|
analog
)
self
.
addIoPadSpecs
(
datas
[
'pads.north'
],
IoPin
.
NORTH
|
analog
)
self
.
addIoPadSpecs
(
datas
[
'pads.south'
],
IoPin
.
SOUTH
|
analog
)
for
padDatas
in
datas
[
'pads.instances'
]:
padName
=
padDatas
[
0
]
...
...
@@ -141,7 +143,8 @@ class IoSpecs ( object ):
.
format
(
padName
)
))
continue
end
=
None
if
padDatas
[
-
1
]
in
'+-*'
:
end
=
-
1
# remove the direction info: + output - input * bi-directional
if
padDatas
[
-
1
][
-
1
]
in
'+-*'
:
end
=
-
1
self
.
_ioPadsLUT
[
padName
].
addNets
(
padDatas
[
1
:
end
]
)
trace
(
560
,
'-'
)
...
...
Write
Preview
Supports
Markdown
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