Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple VME FMC Carrier SVEC
Commits
cfe7e838
Commit
cfe7e838
authored
Jun 11, 2012
by
mcattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add netlist to ucf script.
parent
1e9e9539
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
972 additions
and
0 deletions
+972
-0
net2ucf_calay.py
hdl/net2ucf/net2ucf_calay.py
+69
-0
svec_v0.net
hdl/net2ucf/svec_v0.net
+903
-0
svec_v0_afpga.ucf
hdl/net2ucf/svec_v0_afpga.ucf
+0
-0
svec_v0_sfpga.ucf
hdl/net2ucf/svec_v0_sfpga.ucf
+0
-0
No files found.
hdl/net2ucf/net2ucf_calay.py
0 → 100755
View file @
cfe7e838
#!/usr/bin/python
# Matthieu Cattin 2012
import
re
,
sys
# Export netlist from Altium Designer in "Calay" format
NETLIST_FILENAME
=
"svec_v0.net"
UCF_FILENAME
=
"svec_v0.ucf"
PART_DESIGNATOR
=
"IC19"
IGNORED_NETNAMES
=
[
"GND"
,
"P3V3"
,
"P2V5"
,
"P1V5"
,
"P1V2"
,
"P1V8"
,
"MTG_AVC_A"
,
"MTG_AVC_B"
,
"VREF_DDR3"
,
"FMC1_VREFAM2C"
,
"FMC2_VREFAM2C"
]
filename
=
raw_input
(
"Enter the input netlist filename (Must be Calay format!): "
)
if
filename
!=
""
:
NETLIST_FILENAME
=
filename
try
:
net
=
open
(
NETLIST_FILENAME
,
"r"
)
print
"
%
s netlist opened."
%
NETLIST_FILENAME
except
:
print
"ERROR
%
s file doesn't exist!"
%
NETLIST_FILENAME
sys
.
exit
()
filename
=
raw_input
(
"Enter the output .ucf filename: "
)
if
filename
!=
""
:
UCF_FILENAME
=
filename
try
:
ucf
=
open
(
UCF_FILENAME
,
"w"
)
print
"
%
s .ucf opened."
%
UCF_FILENAME
except
:
print
"ERROR
%
s file doesn't exist!"
%
UCF_FILENAME
part
=
raw_input
(
"Enter the part designator: "
)
if
part
!=
""
:
PART_DESIGNATOR
=
part
print
"The part
%
s has been selected for ucf generation."
%
PART_DESIGNATOR
pin_cnt
=
0
# Iterate over lines in netlist file
for
line
in
net
:
# Remove non-alphanumerical char
line
=
re
.
sub
(
r'[^\w]'
,
' '
,
line
)
# Split line into strings
ln
=
line
.
split
()
for
s
in
ln
:
# Look for lines containing the given part designator
if
(
ln
[
0
]
!=
s
)
and
(
PART_DESIGNATOR
in
s
)
and
not
(
ln
[
0
]
in
IGNORED_NETNAMES
)
and
not
(
re
.
match
(
"Net"
,
ln
[
0
])):
pin_cnt
+=
1
#print "%s %s %s" % (s, ln[0], ln[ln.index(s)+1])
ucf
.
write
(
"NET
\"
"
+
ln
[
0
]
.
lower
()
+
"
\"
LOC = "
+
ln
[
ln
.
index
(
s
)
+
1
]
+
";
\n
"
)
if
pin_cnt
==
0
:
print
" Sorry, no pin found in
%
s"
%
(
PART_DESIGNATOR
)
if
pin_cnt
==
1
:
print
" =>
%
d pin found in
%
s"
%
(
pin_cnt
,
PART_DESIGNATOR
)
else
:
print
" =>
%
d pins found in
%
s"
%
(
pin_cnt
,
PART_DESIGNATOR
)
net
.
close
()
ucf
.
close
()
hdl/net2ucf/svec_v0.net
0 → 100755
View file @
cfe7e838
This diff is collapsed.
Click to expand it.
hdl/svec_v0_afpga.ucf
→
hdl/
net2ucf/
svec_v0_afpga.ucf
View file @
cfe7e838
File moved
hdl/svec_v0_sfpga.ucf
→
hdl/
net2ucf/
svec_v0_sfpga.ucf
View file @
cfe7e838
File moved
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