Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 2cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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
FMC DEL 1ns 2cha
Commits
cd3093e2
Commit
cd3093e2
authored
Aug 16, 2016
by
Jan Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed multi read/write SV reporting issues when accessing slice of the memory
parent
8e25fb8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
FFPG_driver.py
sw/FFPG_driver.py
+9
-7
No files found.
sw/FFPG_driver.py
View file @
cd3093e2
...
...
@@ -75,8 +75,8 @@ def WbReadMulti(register, start = 0, to = -1):
to
=
int
(
m
[
register
][
'depth'
],
16
)
for
i
in
range
(
start
,
to
):
WB_DEBUG_2_SV_FP
.
write
(
'WbRead('
+
str
(
address
+
i
*
4
)
+
', dataOut, "WB_READ_MULTI: '
+
register
+
'['
+
str
(
i
)
+
']:");
\n
'
)
WB_DEBUG_2_SV_FP
.
write
(
'assert (dataOut == '
+
str
(
result
[
i
])
+
') else begin
\n
'
)
WB_DEBUG_2_SV_FP
.
write
(
' $error("WB_READ_MULTI different, result should be '
+
hex
(
int
(
result
[
i
]))
+
'!");
\n
'
)
WB_DEBUG_2_SV_FP
.
write
(
'assert (dataOut == '
+
str
(
result
[
i
-
start
])
+
') else begin
\n
'
)
WB_DEBUG_2_SV_FP
.
write
(
' $error("WB_READ_MULTI different, result should be '
+
hex
(
int
(
result
[
i
-
start
]))
+
'!");
\n
'
)
WB_DEBUG_2_SV_FP
.
write
(
' errors = errors + 1;
\n
'
)
WB_DEBUG_2_SV_FP
.
write
(
'end
\n
'
)
return
result
...
...
@@ -89,7 +89,7 @@ def WbWriteMulti(register, data, start = 0, to = -1):
if
to
==
-
1
:
to
=
int
(
m
[
register
][
'depth'
])
for
i
in
range
(
start
,
to
):
WB_DEBUG_2_SV_FP
.
write
(
'WbWrite('
+
str
(
address
+
i
*
4
)
+
', '
+
str
(
data
[
i
])
+
', "WB_WRITE_MULTI: '
+
register
+
'['
+
str
(
i
)
+
']:");
\n
'
)
WB_DEBUG_2_SV_FP
.
write
(
'WbWrite('
+
str
(
address
+
i
*
4
)
+
', '
+
str
(
data
[
i
-
start
])
+
', "WB_WRITE_MULTI: '
+
register
+
'['
+
str
(
i
)
+
']:");
\n
'
)
m
.
write
(
register
,
data
,
start
=
start
,
to
=
to
)
def
WbSetBitsMulti
(
register
,
mask
,
bits
,
start
=
0
,
to
=
-
1
):
...
...
@@ -176,7 +176,7 @@ def Ad9512Init():
# 0 - front panel clock
# 1 - FPGA loop clock
# 2 - oscilator
# 2 - oscil
l
ator
def
SelectClock
(
clock
):
if
clock
==
0
:
# select CLK1 input, power down CLK2 input (AD9512)
...
...
@@ -293,14 +293,16 @@ def PrintBit(value, bit, label, ifSet, ifNotSet):
def
PrintBits
(
value
,
bitFrom
,
bitTo
,
label
,
descriptions
):
print
(
' '
+
'['
+
str
(
bitTo
)
+
':'
+
str
(
bitFrom
)
+
'] '
+
label
+
':'
)
value
&=
(
1
<<
bitTo
+
1
)
-
1
value
>>=
bitFrom
color
=
ConColors
.
YELLOW
description
=
descriptions
[
value
]
if
value
>
len
(
descriptions
)
-
1
:
color
=
ConColors
.
RED
description
=
'<unknown>'
else
:
color
=
ConColors
.
YELLOW
description
=
descriptions
[
value
]
print
(
color
+
' '
+
str
(
value
)
+
': '
+
description
+
ConColors
.
NONE
)
def
Status
():
...
...
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