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
ed3bdbe4
Commit
ed3bdbe4
authored
Jun 10, 2021
by
Luke Leighton
Browse files
un-messed-up IoSpecs.loadFromPinmux, add new function for
making a pad Analog
parent
ac3e78c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
cumulus/src/plugins/alpha/block/iospecs.py
View file @
ed3bdbe4
...
...
@@ -67,6 +67,9 @@ class IoPadSpec ( object ):
self
.
_id
=
IoPadSpec
.
id
IoPadSpec
.
id
+=
1
def
setAnalog
(
self
):
self
.
side
|=
IoPin
.
ANALOG
def
addNets
(
self
,
nets
):
self
.
nets
+=
nets
...
...
@@ -128,12 +131,10 @@ class IoSpecs ( object ):
with
open
(
fileName
)
as
fd
:
datas
=
utf8toStr
(
json
.
loads
(
fd
.
read
(),
object_hook
=
utf8toStr
)
,
ignoreDicts
=
True
)
# 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
)
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
)
for
padDatas
in
datas
[
'pads.instances'
]:
padName
=
padDatas
[
0
]
...
...
@@ -145,6 +146,10 @@ class IoSpecs ( object ):
end
=
None
# remove the direction info: + output - input * bi-directional
if
padDatas
[
-
1
][
-
1
]
in
'+-*'
:
end
=
-
1
# check if pad is analog or not: last spec item starts with "A"
if
padDatas
[
-
1
][
0
]
==
'A'
:
self
.
_ioPadsLUT
[
padName
].
setAnalog
()
# add the nets to the pad
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