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
28989cf2
Commit
28989cf2
authored
9 years ago
by
Pepping
Browse files
Options
Downloads
Patches
Plain Diff
Added support for g_nof_streams > 0
parent
2e508353
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/dp/tb/vhdl/tb_mms_dp_fifo_fill.vhd
+44
-19
44 additions, 19 deletions
libraries/base/dp/tb/vhdl/tb_mms_dp_fifo_fill.vhd
with
44 additions
and
19 deletions
libraries/base/dp/tb/vhdl/tb_mms_dp_fifo_fill.vhd
+
44
−
19
View file @
28989cf2
...
@@ -49,7 +49,7 @@ USE work.tb_dp_pkg.ALL;
...
@@ -49,7 +49,7 @@ USE work.tb_dp_pkg.ALL;
ENTITY
tb_mms_dp_fifo_fill
IS
ENTITY
tb_mms_dp_fifo_fill
IS
GENERIC
(
GENERIC
(
-- Try FIFO settings
-- Try FIFO settings
g_nof_streams
:
POSITIVE
:
=
1
;
g_nof_streams
:
POSITIVE
:
=
3
;
g_dut_use_bsn
:
BOOLEAN
:
=
FALSE
;
g_dut_use_bsn
:
BOOLEAN
:
=
FALSE
;
g_dut_use_empty
:
BOOLEAN
:
=
FALSE
;
g_dut_use_empty
:
BOOLEAN
:
=
FALSE
;
g_dut_use_channel
:
BOOLEAN
:
=
FALSE
;
g_dut_use_channel
:
BOOLEAN
:
=
FALSE
;
...
@@ -63,6 +63,11 @@ END tb_mms_dp_fifo_fill;
...
@@ -63,6 +63,11 @@ END tb_mms_dp_fifo_fill;
ARCHITECTURE
tb
OF
tb_mms_dp_fifo_fill
IS
ARCHITECTURE
tb
OF
tb_mms_dp_fifo_fill
IS
CONSTANT
c_nof_regs_per_stream
:
NATURAL
:
=
3
;
CONSTANT
c_reg_used_words_offset
:
NATURAL
:
=
0
;
CONSTANT
c_reg_fifo_flags
:
NATURAL
:
=
1
;
CONSTANT
c_reg_max_used_words_offset
:
NATURAL
:
=
2
;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Clocks and resets
-- Clocks and resets
----------------------------------------------------------------------------
----------------------------------------------------------------------------
...
@@ -88,6 +93,7 @@ ARCHITECTURE tb OF tb_mms_dp_fifo_fill IS
...
@@ -88,6 +93,7 @@ ARCHITECTURE tb OF tb_mms_dp_fifo_fill IS
SIGNAL
reg_dp_fifo_fill_mosi
:
t_mem_mosi
:
=
c_mem_mosi_rst
;
SIGNAL
reg_dp_fifo_fill_mosi
:
t_mem_mosi
:
=
c_mem_mosi_rst
;
SIGNAL
reg_dp_fifo_fill_miso
:
t_mem_miso
:
=
c_mem_miso_rst
;
SIGNAL
reg_dp_fifo_fill_miso
:
t_mem_miso
:
=
c_mem_miso_rst
;
SIGNAL
in_sosi
:
t_dp_sosi
:
=
c_dp_sosi_rst
;
SIGNAL
in_sosi_arr
:
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_dp_sosi_rst
);
SIGNAL
in_sosi_arr
:
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_dp_sosi_rst
);
SIGNAL
out_siso_arr
:
t_dp_siso_arr
(
g_nof_streams
-1
DOWNTO
0
);
SIGNAL
out_siso_arr
:
t_dp_siso_arr
(
g_nof_streams
-1
DOWNTO
0
);
SIGNAL
out_sosi_arr
:
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
);
SIGNAL
out_sosi_arr
:
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
);
...
@@ -108,15 +114,15 @@ BEGIN
...
@@ -108,15 +114,15 @@ BEGIN
proc_common_wait_some_cycles
(
dp_clk
,
10
);
proc_common_wait_some_cycles
(
dp_clk
,
10
);
-- Generate a datastream.
-- Generate a datastream.
WHILE
TRUE
LOOP
WHILE
TRUE
LOOP
in_sosi
_arr
(
0
)
.
valid
<=
'1'
;
in_sosi
.
valid
<=
'1'
;
in_sosi
_arr
(
0
)
.
sop
<=
'1'
;
in_sosi
.
sop
<=
'1'
;
proc_common_wait_some_cycles
(
dp_clk
,
1
);
proc_common_wait_some_cycles
(
dp_clk
,
1
);
in_sosi
_arr
(
0
)
.
sop
<=
'0'
;
in_sosi
.
sop
<=
'0'
;
proc_common_wait_some_cycles
(
dp_clk
,
63
);
proc_common_wait_some_cycles
(
dp_clk
,
63
);
in_sosi
_arr
(
0
)
.
eop
<=
'1'
;
in_sosi
.
eop
<=
'1'
;
proc_common_wait_some_cycles
(
dp_clk
,
1
);
proc_common_wait_some_cycles
(
dp_clk
,
1
);
in_sosi
_arr
(
0
)
.
eop
<=
'0'
;
in_sosi
.
eop
<=
'0'
;
in_sosi
_arr
(
0
)
.
valid
<=
'0'
;
in_sosi
.
valid
<=
'0'
;
proc_common_wait_some_cycles
(
dp_clk
,
1
);
proc_common_wait_some_cycles
(
dp_clk
,
1
);
WHILE
(
sim_used_words
=
'0'
AND
sim_wr_full
=
'0'
)
LOOP
WHILE
(
sim_used_words
=
'0'
AND
sim_wr_full
=
'0'
)
LOOP
proc_common_wait_some_cycles
(
dp_clk
,
1
);
proc_common_wait_some_cycles
(
dp_clk
,
1
);
...
@@ -124,26 +130,45 @@ BEGIN
...
@@ -124,26 +130,45 @@ BEGIN
END
LOOP
;
END
LOOP
;
END
PROCESS
;
END
PROCESS
;
out_siso_arr
(
0
)
<=
c_dp_siso_rdy
WHEN
sim_wr_full
=
'0'
ELSE
c_dp_siso_rst
;
gen_connect
:
FOR
I
IN
0
TO
g_nof_streams
-1
GENERATE
in_sosi_arr
(
I
)
<=
in_sosi
;
out_siso_arr
(
I
)
<=
c_dp_siso_rdy
WHEN
sim_wr_full
=
'0'
ELSE
c_dp_siso_rst
;
END
GENERATE
;
p_special_stimuli
:
PROCESS
p_special_stimuli
:
PROCESS
BEGIN
BEGIN
-- Read out the used_w register
-- Read out the used_w register
sim_used_words
<=
'1'
;
sim_used_words
<=
'1'
;
proc_common_wait_some_cycles
(
mm_clk
,
200
);
proc_common_wait_some_cycles
(
mm_clk
,
200
);
proc_mem_mm_bus_rd
(
0
,
mm_clk
,
reg_dp_fifo_fill_mosi
);
FOR
I
IN
0
TO
g_nof_streams
-1
LOOP
proc_mem_mm_bus_rd
(
I
*
c_nof_regs_per_stream
+
c_reg_used_words_offset
,
mm_clk
,
reg_dp_fifo_fill_mosi
);
END
LOOP
;
sim_used_words
<=
'0'
;
sim_used_words
<=
'0'
;
-- Read
out the rd_empty bit
-- Read
maximum used fifo words register
sim_rd_empty
<=
'1'
;
sim_rd_empty
<=
'1'
;
proc_common_wait_some_cycles
(
mm_clk
,
30
);
FOR
I
IN
0
TO
g_nof_streams
-1
LOOP
proc_mem_mm_bus_rd
(
I
*
c_nof_regs_per_stream
+
c_reg_max_used_words_offset
,
mm_clk
,
reg_dp_fifo_fill_mosi
);
END
LOOP
;
-- proc_mem_mm_bus_rd(2, mm_clk, reg_dp_fifo_fill_mosi);
-- Read out the rd_empty bit
proc_common_wait_some_cycles
(
mm_clk
,
100
);
proc_common_wait_some_cycles
(
mm_clk
,
100
);
proc_mem_mm_bus_rd
(
1
,
mm_clk
,
reg_dp_fifo_fill_mosi
);
-- proc_mem_mm_bus_rd(1, mm_clk, reg_dp_fifo_fill_mosi);
FOR
I
IN
0
TO
g_nof_streams
-1
LOOP
proc_mem_mm_bus_rd
(
I
*
c_nof_regs_per_stream
+
c_reg_fifo_flags
,
mm_clk
,
reg_dp_fifo_fill_mosi
);
END
LOOP
;
sim_rd_empty
<=
'0'
;
sim_rd_empty
<=
'0'
;
-- Read out the wr_full bit
-- Read out the wr_full bit
sim_wr_full
<=
'1'
;
sim_wr_full
<=
'1'
;
proc_common_wait_some_cycles
(
mm_clk
,
100
);
proc_common_wait_some_cycles
(
mm_clk
,
100
);
proc_mem_mm_bus_rd
(
1
,
mm_clk
,
reg_dp_fifo_fill_mosi
);
FOR
I
IN
0
TO
g_nof_streams
-1
LOOP
proc_mem_mm_bus_rd
(
I
*
c_nof_regs_per_stream
+
c_reg_fifo_flags
,
mm_clk
,
reg_dp_fifo_fill_mosi
);
END
LOOP
;
-- proc_mem_mm_bus_rd(1, mm_clk, reg_dp_fifo_fill_mosi);
proc_common_wait_some_cycles
(
mm_clk
,
10
);
proc_common_wait_some_cycles
(
mm_clk
,
10
);
tb_end
<=
'1'
;
tb_end
<=
'1'
;
...
...
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