Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
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
Conv TTL Blocking
Commits
9a4de25d
Commit
9a4de25d
authored
Jan 26, 2018
by
Denia Bouhired-Ferrag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separated gw flasing into golden and release separately
parent
8cf29a42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
gw-upgrade.py
software/gwupdate/gw-upgrade.py
+6
-4
No files found.
software/gwupdate/gw-upgrade.py
View file @
9a4de25d
...
...
@@ -82,15 +82,17 @@ CSR_GWVERS_OFS = 0
CSR_HWVERS_OFS
=
22
# Target version
gwvers_target
=
4.0
gwvers_target
=
4.1
gwvers_gold_target
=
0.3
##-------------------------------------------------------------------------------------------------
## Method to check hardware and gateware version
##-------------------------------------------------------------------------------------------------
def
gw_hw_version
():
hwvers
=
testelma
.
read
(
slot
,
SRREG
)
&
0x3F00
>>
CSR_HWVERS_OFS
gwvers
=
testelma
.
read
(
slot
,
SRREG
)
&
0xFF
>>
CSR_GWVERS_OFS
hwvers
=
(
testelma
.
read
(
slot
,
SRREG
)
&
0x0fc00000
)
>>
CSR_HWVERS_OFS
gwvers
=
(
testelma
.
read
(
slot
,
SRREG
)
&
0xFF
)
>>
CSR_GWVERS_OFS
#print ("maj is %d, min is %d" % int(hwvers >> 2), int(hwvers & 0x03))
hwvers
=
int
(
hwvers
>>
2
)
+
float
(
hwvers
&
0x03
)
/
10
gwvers
=
int
(
gwvers
>>
4
)
+
float
(
gwvers
&
0xF
)
/
10
...
...
@@ -215,7 +217,7 @@ if __name__ == "__main__":
print
"=============================================
\n
"
print
"Loading FPGA bitstream...
\n
"
#ret = subprocess.call(["cd ./" + gwpath + "; ./flash;"], shell=True, stdout=None, stderr=None)
ret
=
subprocess
.
call
([
"cd ./"
+
gwpath
+
"; xc3sprog -c xpc flash_load.bit; xc3sprog -c xpc -I golden-v
0.2_release-v"
+
str
(
gwvers_target
)
+
".bin:w:0
:bin"
],
shell
=
True
,
stdout
=
None
,
stderr
=
None
)
ret
=
subprocess
.
call
([
"cd ./"
+
gwpath
+
"; xc3sprog -c xpc flash_load.bit; xc3sprog -c xpc -I golden-v
"
+
str
(
gwvers_gold_target
)
+
".bin:w:0:bin; xc3sprog -c xpc flash_load.bit; xc3sprog -c xpc -I release-v"
+
str
(
gwvers_target
)
+
".bin:w:1507328
:bin"
],
shell
=
True
,
stdout
=
None
,
stderr
=
None
)
print
"Bitstream successfully loaded...
\n
"
print
"Crate restarting...
\n
"
...
...
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