Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
021e7267
Commit
021e7267
authored
9 years ago
by
Arthur Coolen
Browse files
Options
Downloads
Patches
Plain Diff
Make sure blockgenerator is switched off b4 new values are written and
switched on again afterwards
parent
f56536fc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/apertif/designs/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator_lite_bg_ram.py
+66
-28
66 additions, 28 deletions
...lator/tb/python/tc_apertif_unb1_correlator_lite_bg_ram.py
with
66 additions
and
28 deletions
applications/apertif/designs/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator_lite_bg_ram.py
+
66
−
28
View file @
021e7267
...
...
@@ -25,36 +25,70 @@ bg = pi_diag_block_gen.PiDiagBlockGen(tc, io, nofChannels=NOF_BG_OUTPUTS, ramSiz
###############################################################################
# Create an example 2d list of [24 inputs]*[64 channels]
# . All zeros except one input
# . As input 9 contains 64 channels with complex(1); we should see visibility
# 180 (autocorrelation of input 9) containing the value 12500.
# . 12500 = number of accumulations done per channel per integration period (1.024s)
# . 12500*64 channels = 800000 accumulations per integration period in total.
###############################################################################
example_list
=
[
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
1
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
\
NOF_CHANNELS
*
[
complex
(
0
)],
]
#
# list with only prime values on 2nd channel(channel 0 is alwasy flagged), rest channels all zero
# this way the visibilities are at least unique, disadvantage is they will be huge at a certain point
# the lines in list represents RT2 X, RT2 Y, RT3 X, RT3 Y ...... RTD X, RTD Y
# and each line has NOF_CHANNELS inputchannels
#
#example_list = [ (NOF_CHANNELS)*[complex(2)],\
# (NOF_CHANNELS)*[complex(3)],\
# (NOF_CHANNELS)*[complex(4)],\
# (NOF_CHANNELS)*[complex(5)],\
# (NOF_CHANNELS)*[complex(11)],\
# (NOF_CHANNELS)*[complex(13)],\
# (NOF_CHANNELS)*[complex(17)],\
# (NOF_CHANNELS)*[complex(19)],\
# (NOF_CHANNELS)*[complex(23)],\
# (NOF_CHANNELS)*[complex(29)],\
# (NOF_CHANNELS)*[complex(31)],\
# (NOF_CHANNELS)*[complex(37)],\
# (NOF_CHANNELS)*[complex(41)],\
# (NOF_CHANNELS)*[complex(43)],\
# (NOF_CHANNELS)*[complex(47)],\
# (NOF_CHANNELS)*[complex(53)],\
# (NOF_CHANNELS)*[complex(59)],\
# (NOF_CHANNELS)*[complex(61)],\
# (NOF_CHANNELS)*[complex(67)],\
# (NOF_CHANNELS)*[complex(71)],\
# (NOF_CHANNELS)*[complex(73)],\
# (NOF_CHANNELS)*[complex(79)],\
# (NOF_CHANNELS)*[complex(83)],\
# (NOF_CHANNELS)*[complex(89)] ]
#
# List with 1-24 on the first channel rest channels 0, disadvantage is that cross correlations are sometimes the same (p.e. 2x2 is same as 1x4)
# Advantage is that the values will stay small. this might be nicer when you make a plot to look for anomalies
# the lines in list represents RT2 X, RT2 Y, RT3 X, RT3 Y ...... RTD X, RTD Y
# and each line has NOF_CHANNELS inputchannels
#
example_list
=
[
(
NOF_CHANNELS
)
*
[
complex
(
1
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
2
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
3
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
4
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
5
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
6
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
7
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
8
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
9
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
10
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
11
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
12
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
13
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
14
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
15
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
16
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
17
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
18
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
19
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
20
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
21
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
22
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
23
)],
\
(
NOF_CHANNELS
)
*
[
complex
(
24
)]
]
bg_list_complex
=
example_list
...
...
@@ -121,12 +155,14 @@ bg_list = []
for
input_signal
in
bg_list_complex_rewired
:
bg_list
.
append
(
concat_complex
(
input_signal
,
COMPLEX_WIDTH
)
)
#disable the block generator
bg
.
write_disable
()
###############################################################################
# OVerwrite block gen settings
# . Limit RAM high address to 2*64 channels
###############################################################################
bg
.
write_block_gen_settings
(
samplesPerPacket
=
NOF_BG_SAMPLES_PER_BLOCK
,
blocksPerSync
=
800000
,
gapSize
=
256
-
NOF_BG_SAMPLES_PER_BLOCK
,
memLowAddr
=
0
,
memHighAddr
=
2
*
NOF_CHANNELS
-
1
,
BSNInit
=
0
)
###############################################################################
# Write the 12 waveform RAMs, one stream at a time
# . Our block generators has 12 output streams that carry 24 interleaved correlator inputs streams.
...
...
@@ -137,4 +173,6 @@ for i in range(NOF_BG_OUTPUTS):
# Write this to the BG as RAM contents
bg
.
write_waveform_ram
(
ram_contents
,
i
)
#Enable the block generator
bg
.
write_enable
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment