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
8039670d
Commit
8039670d
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Correct BG bps logging.
parent
b5a32ef4
No related branches found
No related tags found
1 merge request
!288
Resolve L2SDP-836
Pipeline
#38613
passed
2 years ago
Stage: simulation
Stage: synthesis
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/io/eth/tb/vhdl/tb_eth_tester.vhd
+9
-9
9 additions, 9 deletions
libraries/io/eth/tb/vhdl/tb_eth_tester.vhd
with
9 additions
and
9 deletions
libraries/io/eth/tb/vhdl/tb_eth_tester.vhd
+
9
−
9
View file @
8039670d
...
@@ -103,9 +103,9 @@ ARCHITECTURE tb OF tb_eth_tester IS
...
@@ -103,9 +103,9 @@ ARCHITECTURE tb OF tb_eth_tester IS
CONSTANT
c_eth_packet_len_others
:
NATURAL
:
=
func_eth_tester_eth_packet_length
(
c_bg_block_len_others
);
CONSTANT
c_eth_packet_len_others
:
NATURAL
:
=
func_eth_tester_eth_packet_length
(
c_bg_block_len_others
);
-- Use REAL to avoid NATURAL overflow in bps calculation
-- Use REAL to avoid NATURAL overflow in bps calculation
CONSTANT
c_
eth
_nof_bps_first
:
REAL
:
=
REAL
(
c_
eth_packet
_len_first
*
c_octet_w
)
*
REAL
(
c_nof_st_clk_per_s
)
/
REAL
(
c_bg_slot_len_first
);
CONSTANT
c_
bg
_nof_bps_first
:
REAL
:
=
REAL
(
c_
bg_block
_len_first
*
c_octet_w
)
*
REAL
(
c_nof_st_clk_per_s
)
/
REAL
(
c_bg_slot_len_first
);
CONSTANT
c_
eth
_nof_bps_others
:
REAL
:
=
REAL
(
c_
eth_packet
_len_others
*
c_octet_w
)
*
REAL
(
c_nof_st_clk_per_s
)
/
REAL
(
c_bg_slot_len_others
);
CONSTANT
c_
bg
_nof_bps_others
:
REAL
:
=
REAL
(
c_
bg_block
_len_others
*
c_octet_w
)
*
REAL
(
c_nof_st_clk_per_s
)
/
REAL
(
c_bg_slot_len_others
);
CONSTANT
c_
eth
_nof_bps_total
:
REAL
:
=
c_
eth
_nof_bps_first
+
REAL
(
g_nof_streams
-
1
)
*
c_
eth
_nof_bps_others
;
CONSTANT
c_
bg
_nof_bps_total
:
REAL
:
=
c_
bg
_nof_bps_first
+
REAL
(
g_nof_streams
-
1
)
*
c_
bg
_nof_bps_others
;
CONSTANT
c_bg_sync_period_first
:
NATURAL
:
=
c_bg_slot_len_first
*
g_bg_ctrl_first
.
blocks_per_sync
;
CONSTANT
c_bg_sync_period_first
:
NATURAL
:
=
c_bg_slot_len_first
*
g_bg_ctrl_first
.
blocks_per_sync
;
CONSTANT
c_bg_sync_period_others
:
NATURAL
:
=
c_bg_slot_len_others
*
g_bg_ctrl_others
.
blocks_per_sync
;
CONSTANT
c_bg_sync_period_others
:
NATURAL
:
=
c_bg_slot_len_others
*
g_bg_ctrl_others
.
blocks_per_sync
;
...
@@ -346,19 +346,19 @@ BEGIN
...
@@ -346,19 +346,19 @@ BEGIN
IF
I
=
0
THEN
IF
I
=
0
THEN
print_str
(
c_tb_str
&
print_str
(
c_tb_str
&
"ETH bit rate ("
&
NATURAL
'IMAGE
(
I
)
&
") :"
&
"ETH bit rate ("
&
NATURAL
'IMAGE
(
I
)
&
") :"
&
" c_
eth
_nof_bps_first = "
&
REAL
'IMAGE
(
c_
eth
_nof_bps_first
)
&
" bps"
);
" c_
bg
_nof_bps_first = "
&
REAL
'IMAGE
(
c_
bg
_nof_bps_first
)
&
" bps"
);
ELSE
ELSE
print_str
(
c_tb_str
&
print_str
(
c_tb_str
&
"ETH bit rate ("
&
NATURAL
'IMAGE
(
I
)
&
") :"
&
"ETH bit rate ("
&
NATURAL
'IMAGE
(
I
)
&
") :"
&
" c_
eth
_nof_bps_others = "
&
REAL
'IMAGE
(
c_
eth
_nof_bps_others
)
&
" bps"
);
" c_
bg
_nof_bps_others = "
&
REAL
'IMAGE
(
c_
bg
_nof_bps_others
)
&
" bps"
);
END
IF
;
END
IF
;
END
LOOP
;
END
LOOP
;
IF
g_nof_streams
>
1
THEN
IF
g_nof_streams
>
1
THEN
print_str
(
c_tb_str
&
print_str
(
c_tb_str
&
"ETH bit rate total :"
&
"ETH bit rate total :"
&
" c_
eth
_nof_bps_total = "
&
REAL
'IMAGE
(
c_
eth
_nof_bps_total
)
&
" bps"
);
" c_
bg
_nof_bps_total = "
&
REAL
'IMAGE
(
c_
bg
_nof_bps_total
)
&
" bps"
);
END
IF
;
END
IF
;
ASSERT
c_
eth
_nof_bps_total
<
10
.
0
**
9
REPORT
"Tx flow control will keep ETH bitrate < 1Gbps."
SEVERITY
NOTE
;
ASSERT
c_
bg
_nof_bps_total
<
10
.
0
**
9
REPORT
"Tx flow control will keep ETH bitrate < 1Gbps."
SEVERITY
NOTE
;
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-- Verification: Total counts
-- Verification: Total counts
...
@@ -397,7 +397,7 @@ BEGIN
...
@@ -397,7 +397,7 @@ BEGIN
-- Verify, only log when wrong
-- Verify, only log when wrong
IF
g_corrupted_en
=
FALSE
THEN
IF
g_corrupted_en
=
FALSE
THEN
IF
c_
eth
_nof_bps_total
<
10
.
0
**
9
THEN
IF
c_
bg
_nof_bps_total
<
10
.
0
**
9
THEN
ASSERT
tx_total_count_nof_packet_arr
(
I
)
=
exp_total_count_nof_packet_arr
(
I
)
REPORT
c_tb_str
&
ASSERT
tx_total_count_nof_packet_arr
(
I
)
=
exp_total_count_nof_packet_arr
(
I
)
REPORT
c_tb_str
&
"Wrong Tx total nof packets count("
&
NATURAL
'IMAGE
(
I
)
&
"Wrong Tx total nof packets count("
&
NATURAL
'IMAGE
(
I
)
&
"), Tx count = "
&
NATURAL
'IMAGE
(
tx_total_count_nof_packet_arr
(
I
))
&
"), Tx count = "
&
NATURAL
'IMAGE
(
tx_total_count_nof_packet_arr
(
I
))
&
...
@@ -484,7 +484,7 @@ BEGIN
...
@@ -484,7 +484,7 @@ BEGIN
", nof_valid = "
&
NATURAL
'IMAGE
(
rx_mon_nof_valid_arr
(
I
))
&
", nof_valid = "
&
NATURAL
'IMAGE
(
rx_mon_nof_valid_arr
(
I
))
&
", latency = "
&
NATURAL
'IMAGE
(
rx_mon_latency_arr
(
I
)));
", latency = "
&
NATURAL
'IMAGE
(
rx_mon_latency_arr
(
I
)));
IF
c_
eth
_nof_bps_total
<
10
.
0
**
9
THEN
IF
c_
bg
_nof_bps_total
<
10
.
0
**
9
THEN
-- Verify BSN monitors only when the BG sync interval is stable, so
-- Verify BSN monitors only when the BG sync interval is stable, so
-- the ETH data rate < 1 Gbps and no BG block flow control.
-- the ETH data rate < 1 Gbps and no BG block flow control.
-- Verify, only log when wrong
-- Verify, only log when wrong
...
...
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