Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
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
FMC ADC 100M 14b 4cha - Testing
Commits
7f67d59f
Commit
7f67d59f
authored
Jul 19, 2013
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fmc_adc: Add debug features to svec get/put data methods.
parent
6c18bc6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
fmc_adc.py
test/fmcadc100m14b4cha/python/fmc_adc.py
+11
-1
No files found.
test/fmcadc100m14b4cha/python/fmc_adc.py
View file @
7f67d59f
...
...
@@ -891,9 +891,15 @@ class CFmcAdc100m:
# carrier_addr and length are in 32-bit word
def
get_data
(
self
,
carrier_addr
,
length
):
ret
=
[]
self
.
bus
.
iwrite
(
0
,
self
.
DDR_ADR_ADDR
,
4
,
carrier_addr
)
cc
=
self
.
bus
.
iwrite
(
0
,
self
.
DDR_ADR_ADDR
,
4
,
carrier_addr
)
#print('[get_data] write: addr=0x%.8X cc=%d'%(self.DDR_ADR_ADDR, cc))
for
i
in
range
(
length
):
#adr_cnt_b = self.bus.iread(0, self.DDR_ADR_ADDR, 4)
ret
.
append
(
self
.
bus
.
iread
(
0
,
self
.
DDR_DAT_ADDR
,
4
))
#print('[get_data] read: addr=0x%.9X i=%d'%(self.DDR_DAT_ADDR, i))
#adr_cnt = self.bus.iread(0, self.DDR_ADR_ADDR, 4)
#print('[get_data] address counter: before=0x%.8X after=0x%.8X'%(adr_cnt_b, adr_cnt))
return
ret
# Write data to DDR
# carrier_addr is in 32-bit word
...
...
@@ -901,7 +907,11 @@ class CFmcAdc100m:
def
put_data
(
self
,
carrier_addr
,
data
):
self
.
bus
.
iwrite
(
0
,
self
.
DDR_ADR_ADDR
,
4
,
carrier_addr
)
for
i
in
range
(
len
(
data
)):
#adr_cnt_b = self.bus.iread(0, self.DDR_ADR_ADDR, 4)
self
.
bus
.
iwrite
(
0
,
self
.
DDR_DAT_ADDR
,
4
,
data
[
i
])
#print('[put_data] write: addr=0x%.9X i=%d data=0x%.8X'%(self.DDR_DAT_ADDR, i, data[i]))
#adr_cnt = self.bus.iread(0, self.DDR_ADR_ADDR, 4)
#print('[put_data] address counter: before=0x%.8X after=0x%.8X'%(adr_cnt_b, adr_cnt))
# Clear DDR
def
clear_ddr
(
self
):
...
...
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