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
7f6fcdc1
Commit
7f6fcdc1
authored
9 years ago
by
Zanting
Browse files
Options
Downloads
Patches
Plain Diff
Added verbosity check and repeat loops
parent
e46468c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
boards/uniboard1/designs/unb1_ddr3/tb/python/tc_unb1_ddr3_seq.py
+48
-49
48 additions, 49 deletions
...uniboard1/designs/unb1_ddr3/tb/python/tc_unb1_ddr3_seq.py
with
48 additions
and
49 deletions
boards/uniboard1/designs/unb1_ddr3/tb/python/tc_unb1_ddr3_seq.py
+
48
−
49
View file @
7f6fcdc1
...
@@ -75,61 +75,60 @@ ddr = pi_io_ddr.PiIoDdr(tc, io, nof_inst = 1)
...
@@ -75,61 +75,60 @@ ddr = pi_io_ddr.PiIoDdr(tc, io, nof_inst = 1)
# Wait for power up (reset release)
# Wait for power up (reset release)
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
# Initialization
# Control defaults
tx_seq
.
write_disable
()
nof_mon
=
2
rx_seq
.
write_disable
()
# Read RX Sequencer result before run
rx_seq
.
read_result
()
# Wait for the DDR memory to become available
#ddr.read_io_ddr()
do_until_eq
(
ddr
.
read_init_done
,
ms_retry
=
3000
,
val
=
1
,
s_timeout
=
3600
)
# Flush Tx FIFO
ddr
.
write_flush_pulse
()
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
# Set DDR controller in write mode and start writing
start_address
=
0
start_address
=
0
nof_words
=
100
nof_words
=
100
ddr
.
set_address
(
data
=
start_address
)
ddr
.
set_burstsize
(
data
=
nof_words
)
ddr
.
set_write
()
ddr
.
burstbegin
()
# Tx sequence start
tx_seq
.
write_enable_cntr
()
# Tx sequence monitor
for
rep
in
range
(
tc
.
repeat
):
for
rep
in
range
(
tc
.
repeat
):
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
tc
.
append_log
(
5
,
''
)
tx_seq
.
read_cnt
()
tc
.
append_log
(
3
,
'
>>> Rep-%d
'
%
rep
)
# Wait until controller write access is done
do_until_eq
(
ddr
.
read_done
,
ms_retry
=
3000
,
val
=
1
,
s_timeout
=
3600
)
# Rx sequence start
# Initialization
r
x_seq
.
write_
en
able
_cntr
(
)
t
x_seq
.
write_
dis
able
(
vLevel
=
5
)
rx_seq
.
write_disable
(
vLevel
=
5
)
# Set DDR3 controller in read mode and start reading
ddr
.
set_read
()
# Wait for the DDR memory to become available
ddr
.
burstbegin
()
do_until_eq
(
ddr
.
read_init_done
,
ms_retry
=
3000
,
val
=
1
,
s_timeout
=
3600
)
# Rx sequence monitor
# Flush Tx FIFO
for
rep
in
range
(
tc
.
repeat
):
ddr
.
write_flush_pulse
(
vLevel
=
5
)
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
rx_seq
.
read_cnt
()
# Set DDR controller in write mode and start writing
# Wait until controller read access is done
ddr
.
set_address
(
data
=
start_address
,
vLevel
=
5
)
do_until_eq
(
ddr
.
read_done
,
ms_retry
=
3000
,
val
=
1
,
s_timeout
=
3600
)
ddr
.
set_burstsize
(
data
=
nof_words
,
vLevel
=
5
)
ddr
.
set_write
(
vLevel
=
5
)
rx_seq
.
read_result
()
ddr
.
burstbegin
(
vLevel
=
5
)
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
# Tx sequence start
tx_seq
.
write_enable_cntr
(
vLevel
=
5
)
rx_seq
.
read_result
()
# Tx sequence monitor
for
mon
in
range
(
nof_mon
):
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
tx_seq
.
read_cnt
(
vLevel
=
5
)
# Wait until controller write access is done
do_until_eq
(
ddr
.
read_done
,
ms_retry
=
3000
,
val
=
1
,
s_timeout
=
3600
)
# Rx sequence start
rx_seq
.
write_enable_cntr
(
vLevel
=
5
)
# Set DDR3 controller in read mode and start reading
ddr
.
set_read
(
vLevel
=
5
)
ddr
.
burstbegin
(
vLevel
=
5
)
# Rx sequence monitor
for
mon
in
range
(
nof_mon
):
io
.
wait_for_time
(
hw_time
=
0.01
,
sim_time
=
(
1
,
'
us
'
))
rx_seq
.
read_cnt
(
vLevel
=
5
)
# Wait until controller read access is done
do_until_eq
(
ddr
.
read_done
,
ms_retry
=
3000
,
val
=
1
,
s_timeout
=
3600
)
rx_seq
.
read_result
(
vLevel
=
5
)
# End
# End
tc
.
set_section_id
(
''
)
tc
.
set_section_id
(
''
)
...
...
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