Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
Mock Turtle
Commits
d8d70096
Commit
d8d70096
authored
Aug 24, 2018
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mockturtle-debug: fix argparser calls, reduce length of vme mem mapped.
parent
4f92e90e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
mockturtle-debug.py
software/tools/mockturtle-debug.py
+10
-11
No files found.
software/tools/mockturtle-debug.py
View file @
d8d70096
...
...
@@ -707,24 +707,24 @@ def main():
'gdb'
:
cmd_gdb
}
parser
=
argparse
.
ArgumentParser
(
description
=
'Low-level debugging interface without driver'
)
parser
.
add_argument
(
"-b
,
--bus"
,
choices
=
[
"pci"
,
"vme"
],
parser
.
add_argument
(
"-b
"
,
"
--bus"
,
choices
=
[
"pci"
,
"vme"
],
required
=
True
,
dest
=
'bus'
,
help
=
'to select the bus on which there is the Mock Turtle core to access.'
)
parser
.
add_argument
(
"-o
,
--offset"
,
type
=
auto_int
,
required
=
True
,
dest
=
'offset'
,
default
=
0
,
parser
.
add_argument
(
"-o
"
,
"
--offset"
,
type
=
auto_int
,
required
=
True
,
dest
=
'offset'
,
default
=
0
,
help
=
'The memory offset to apply to be able to point to the Mock Turtle core. This is strictly dependent on the bus in use.'
)
parser
.
add_argument
(
"-v
,
--verbose"
,
action
=
'store_true'
,
parser
.
add_argument
(
"-v
"
,
"
--verbose"
,
action
=
'store_true'
,
default
=
False
,
dest
=
'verbose'
,
help
=
''
)
parser
.
add_argument
(
"-k
,
--keep"
,
action
=
'store_true'
,
parser
.
add_argument
(
"-k
"
,
"
--keep"
,
action
=
'store_true'
,
default
=
False
,
dest
=
'keep'
,
help
=
''
)
parser
.
add_argument
(
"-c
,
--cpu"
,
type
=
int
,
default
=
0
,
dest
=
'cpu'
,
parser
.
add_argument
(
"-c
"
,
"
--cpu"
,
type
=
int
,
default
=
0
,
dest
=
'cpu'
,
help
=
'Select the CPU to use'
)
parser
.
add_argument
(
"-t
,
--no-term"
,
action
=
'store_false'
,
parser
.
add_argument
(
"-t
"
,
"
--no-term"
,
action
=
'store_false'
,
default
=
True
,
dest
=
'term'
,
help
=
'It disable the console during GDB session'
)
parser
.
add_argument
(
"-d
,
--device"
,
default
=
None
,
dest
=
'device'
,
parser
.
add_argument
(
"-d
"
,
"
--device"
,
default
=
None
,
dest
=
'device'
,
help
=
'PCI device id (Bus << 16) | (Dev << 8) | Func'
)
parser
.
add_argument
(
"cmd"
,
default
=
False
,
nargs
=
'+'
,
choices
=
cmds
.
keys
(),
help
=
'The command to execute'
)
parser
.
add_argument
(
"-p
,
--gdb-port"
,
type
=
auto_int
,
required
=
False
,
dest
=
'gdb_port'
,
default
=
3000
,
parser
.
add_argument
(
"-p
"
,
"
--gdb-port"
,
type
=
auto_int
,
required
=
False
,
dest
=
'gdb_port'
,
default
=
3000
,
help
=
'Define the listening port for GDB sessions.'
)
args
=
parser
.
parse_args
()
...
...
@@ -737,11 +737,10 @@ def main():
if
args
.
bus
==
"pci"
:
if
args
.
device
is
None
:
raise
Exception
(
"--device required for PCI"
)
bar
=
0
mt_desc
=
PyUAL
.
PyUALPCI
(
int
(
args
.
device
,
16
),
4
,
0
,
0x10000
,
args
.
offset
,
0
)
elif
args
.
bus
==
"vme"
:
mt_desc
=
PyUAL
.
PyUALVME
(
4
,
0x39
,
0x
8
0000
,
args
.
offset
,
1
)
mt_desc
=
PyUAL
.
PyUALVME
(
4
,
0x39
,
0x
1
0000
,
args
.
offset
,
1
)
else
:
raise
Exception
(
"Invalid bus"
)
...
...
@@ -750,7 +749,7 @@ def main():
for
cmd
in
args
.
cmd
:
cmds
[
cmd
](
csr
)
except
Exception
as
e
:
print
(
"Failed! {
:s
}"
.
format
(
str
(
e
)))
print
(
"Failed! {}"
.
format
(
str
(
e
)))
if
__name__
==
"__main__"
:
main
()
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