Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Beam Positoning Monitor - Software
Commits
c178c603
Commit
c178c603
authored
Aug 10, 2016
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sm_io/*/acq/*: fix triggered acquisition when post_samples = 0
See github issue #62.
parent
17559883
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
sm_io_acq_exp.c
src/sm_io/modules/acq/sm_io_acq_exp.c
+7
-2
No files found.
src/sm_io/modules/acq/sm_io_acq_exp.c
View file @
c178c603
...
@@ -159,14 +159,19 @@ static int _acq_data_acquire (void *owner, void *args, void *ret)
...
@@ -159,14 +159,19 @@ static int _acq_data_acquire (void *owner, void *args, void *ret)
"Number of shots = %u
\n
"
,
acq_core_shots
);
"Number of shots = %u
\n
"
,
acq_core_shots
);
smio_thsafe_client_write_32
(
self
,
ACQ_CORE_REG_SHOTS
,
&
acq_core_shots
);
smio_thsafe_client_write_32
(
self
,
ACQ_CORE_REG_SHOTS
,
&
acq_core_shots
);
uint32_t
trigger
=
0
;
_acq_get_trigger_type
(
self
,
&
trigger
);
/* FIXME FPGA Firmware requires number of samples to be divisible by
/* FIXME FPGA Firmware requires number of samples to be divisible by
* acquisition channel sample size */
* acquisition channel sample size */
uint32_t
samples_alignment
=
uint32_t
samples_alignment
=
DDR3_PAYLOAD_SIZE
/
acq
->
acq_buf
[
chan
].
sample_size
;
DDR3_PAYLOAD_SIZE
/
acq
->
acq_buf
[
chan
].
sample_size
;
uint32_t
num_samples_pre_aligned
=
hutils_align_value
(
num_samples_pre
,
uint32_t
num_samples_pre_aligned
=
hutils_align_value
(
num_samples_pre
,
samples_alignment
);
samples_alignment
);
uint32_t
num_samples_post_aligned
=
hutils_align_value
(
num_samples_post
,
/* FIXME. Curently, the FPGA gateware does not support triggered acquisitions with
samples_alignment
);
* post_samples = 0. See github lnls-bpm/bpm-gw#62 */
uint32_t
num_samples_post_aligned
=
(
num_samples_post
==
0
&&
trigger
!=
TYPE_ACQ_CORE_SKIP
)
?
samples_alignment
:
hutils_align_value
(
num_samples_post
,
samples_alignment
);
/* Set the parameters: number of samples of this channel */
/* Set the parameters: number of samples of this channel */
acq
->
acq_params
[
chan
].
num_samples_pre
=
num_samples_pre_aligned
;
acq
->
acq_params
[
chan
].
num_samples_pre
=
num_samples_pre_aligned
;
...
...
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