Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
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
White Rabbit core collection
Commits
73531de1
Commit
73531de1
authored
Apr 21, 2017
by
Maciej Lipinski
Committed by
Grzegorz Daniluk
Jun 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[streamers/review] cosmetic fixes as suggested in the review feedback
parent
c28ef0a3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
52 deletions
+47
-52
streamers_pkg.vhd
modules/wr_streamers/streamers_pkg.vhd
+3
-3
streamers_priv_pkg.vhd
modules/wr_streamers/streamers_priv_pkg.vhd
+1
-0
xrtx_streamers_stats.vhd
modules/wr_streamers/xrtx_streamers_stats.vhd
+38
-45
xrx_streamer.vhd
modules/wr_streamers/xrx_streamer.vhd
+2
-2
xrx_streamers_stats.vhd
modules/wr_streamers/xrx_streamers_stats.vhd
+2
-1
xtx_streamers_stats.vhd
modules/wr_streamers/xtx_streamers_stats.vhd
+1
-1
No files found.
modules/wr_streamers/streamers_pkg.vhd
View file @
73531de1
...
...
@@ -72,7 +72,7 @@ package streamers_pkg is
timeout
:
integer
;
-- DO NOT USE unless you know what you are doing
-- legacy
stuff
: the streamers initially used in Btrain did not check/insert the escape
-- legacy: the streamers initially used in Btrain did not check/insert the escape
-- code. This is justified if only one block of a known number of words is sent/expected
escape_code_disable
:
boolean
;
end
record
;
...
...
@@ -93,13 +93,13 @@ package streamers_pkg is
buffer_size
:
integer
;
-- DO NOT USE unless you know what you are doing
-- legacy
stuff
: the streamers that were initially used in Btrain did not check/insert
-- legacy: the streamers that were initially used in Btrain did not check/insert
-- the escape code. This is justified if only one block of a known number of words is
-- sent/expected.
escape_code_disable
:
boolean
;
-- DO NOT USE unless you know what you are doing
-- legacy
stuff
: the streamers that were initially used in Btrain accepted only a fixed
-- legacy: the streamers that were initially used in Btrain accepted only a fixed
-- number of words, regardless of the frame content. If this generic is set to number
-- other than zero, only a fixed number of words is accepted.
-- In combination with the g_escape_code_disable generic set to TRUE, the behaviour of
...
...
modules/wr_streamers/streamers_priv_pkg.vhd
View file @
73531de1
-------------------------------------------------------------------------------
-- Title : WR Streamers Private Packages
-- Project : WR Streamers
-- URL : http://www.ohwr.org/projects/wr-cores/wiki/WR_Streamers
-------------------------------------------------------------------------------
-- File : streamers_priv_pkg.vhd
-- Author : Maciej Lipinski
...
...
modules/wr_streamers/xrtx_streamers_stats.vhd
View file @
73531de1
...
...
@@ -161,8 +161,8 @@ architecture rtl of xrtx_streamers_stats is
signal
snapshot_ena_d1
:
std_logic
;
-- for code cleanness
constant
cw
:
integer
:
=
g_cnt_width
;
constant
aw
:
integer
:
=
g_acc_width
;
constant
c
_c
w
:
integer
:
=
g_cnt_width
;
constant
c_
aw
:
integer
:
=
g_acc_width
;
begin
-- reset statistics when receiving signal from SNMP or Wishbone
...
...
@@ -185,14 +185,8 @@ begin
reset_stats_p
<=
'0'
;
reset_stats_d1
<=
'0'
;
else
if
(
reset_stats
=
'0'
and
reset_stats_d1
=
'1'
)
then
reset_stats_p
<=
'1'
;
elsif
(
reset_stats
=
'1'
and
reset_stats_d1
=
'0'
)
then
reset_stats_p
<=
'1'
;
else
reset_stats_p
<=
'0'
;
end
if
;
reset_stats_d1
<=
reset_stats
;
reset_stats_p
<=
reset_stats
xor
reset_stats_d1
;
end
if
;
end
if
;
end
process
;
...
...
@@ -295,51 +289,50 @@ begin
-------------------------------------------------------------------------------------------
-- SNMP remote output
-------------------------------------------------------------------------------------------
-- Generic communication with WRPC that allows SNMP access via generic array of 32-bits
-- std_logic_vectors
assert
(
cw
<=
32
)
-- std_logic_vectors. The mapping of the generic vectors to meaningful information needs
-- to be made available to the user of SNMP
-------------------------------------------------------------------------------------------
-- check sanity of values
assert
(
c_cw
<=
32
)
report
"g_cnt_width value not suppported by f_pack_streamers_statistics"
severity
error
;
assert
(
aw
<=
64
)
assert
(
c_
aw
<=
64
)
report
"g_cnt_width value not suppported by f_pack_streamers_statistics"
severity
error
;
reset_stats_remote
<=
snmp_array_i
(
0
)(
0
);
snapshot_remote_ena
<=
snmp_array_i
(
0
)(
1
);
-- translate generic input vectors to meaningful signals
reset_stats_remote
<=
snmp_array_i
(
0
)(
0
);
snapshot_remote_ena
<=
snmp_array_i
(
0
)(
1
);
snmp_array_o
(
0
)(
0
)
<=
reset_stats
;
-- loop back for diagnostics
snmp_array_o
(
0
)(
1
)
<=
latency_acc_overflow_out
;
snmp_array_o
(
1
)(
31
downto
0
)
<=
x"0"
&
reset_time_cycles
(
27
downto
0
);
snmp_array_o
(
2
)(
31
downto
0
)
<=
reset_time_tai
(
31
downto
0
);
snmp_array_o
(
3
)(
31
downto
0
)
<=
x"000000"
&
reset_time_tai
(
39
downto
32
);
snmp_array_o
(
0
)(
0
)
<=
reset_stats
;
-- loop back for diagnostics
snmp_array_o
(
0
)(
1
)
<=
latency_acc_overflow_out
;
snmp_array_o
(
1
)(
31
downto
0
)
<=
x"0"
&
reset_time_cycles
(
27
downto
0
);
snmp_array_o
(
2
)(
31
downto
0
)
<=
reset_time_tai
(
31
downto
0
);
snmp_array_o
(
3
)(
31
downto
0
)
<=
x"000000"
&
reset_time_tai
(
39
downto
32
);
--
output to the
snmp_array_o
(
4
)(
cw
-1
downto
0
)
<=
sent_frame_cnt_out
;
snmp_array_o
(
5
)(
cw
-1
downto
0
)
<=
rcvd_frame_cnt_out
;
snmp_array_o
(
6
)(
cw
-1
downto
0
)
<=
lost_frame_cnt_out
;
snmp_array_o
(
7
)(
cw
-1
downto
0
)
<=
lost_block_cnt_out
;
snmp_array_o
(
8
)(
cw
-1
downto
0
)
<=
latency_cnt_out
;
snmp_array_o
(
9
)(
31
downto
0
)
<=
x"0"
&
latency_max_out
(
27
downto
0
);
snmp_array_o
(
10
)(
31
downto
0
)
<=
x"0"
&
latency_min_out
(
27
downto
0
);
--
translate meaningful signals (statistics values) to generic output vectors
snmp_array_o
(
4
)(
c
_c
w
-1
downto
0
)
<=
sent_frame_cnt_out
;
snmp_array_o
(
5
)(
c
_c
w
-1
downto
0
)
<=
rcvd_frame_cnt_out
;
snmp_array_o
(
6
)(
c
_c
w
-1
downto
0
)
<=
lost_frame_cnt_out
;
snmp_array_o
(
7
)(
c
_c
w
-1
downto
0
)
<=
lost_block_cnt_out
;
snmp_array_o
(
8
)(
c
_c
w
-1
downto
0
)
<=
latency_cnt_out
;
snmp_array_o
(
9
)(
31
downto
0
)
<=
x"0"
&
latency_max_out
(
27
downto
0
);
snmp_array_o
(
10
)(
31
downto
0
)
<=
x"0"
&
latency_min_out
(
27
downto
0
);
snmp_array_o
(
0
)
(
31
downto
2
)
<=
(
others
=>
'0'
);
snmp_array_o
(
4
)(
31
downto
cw
)
<=
(
others
=>
'0'
);
snmp_array_o
(
5
)(
31
downto
cw
)
<=
(
others
=>
'0'
);
snmp_array_o
(
6
)(
31
downto
cw
)
<=
(
others
=>
'0'
);
snmp_array_o
(
7
)(
31
downto
cw
)
<=
(
others
=>
'0'
);
snmp_array_o
(
8
)(
31
downto
cw
)
<=
(
others
=>
'0'
);
snmp_array_o
(
0
)
(
31
downto
2
)
<=
(
others
=>
'0'
);
snmp_array_o
(
4
)(
31
downto
c
_c
w
)
<=
(
others
=>
'0'
);
snmp_array_o
(
5
)(
31
downto
c
_c
w
)
<=
(
others
=>
'0'
);
snmp_array_o
(
6
)(
31
downto
c
_c
w
)
<=
(
others
=>
'0'
);
snmp_array_o
(
7
)(
31
downto
c
_c
w
)
<=
(
others
=>
'0'
);
snmp_array_o
(
8
)(
31
downto
c
_c
w
)
<=
(
others
=>
'0'
);
CNT_SINGLE_WORD_gen
:
if
(
aw
<
33
)
generate
snmp_array_o
(
11
)(
aw
-1
downto
0
)
<=
latency_acc_out
;
snmp_array_o
(
11
)(
31
downto
aw
)
<=
(
others
=>
'0'
);
CNT_SINGLE_WORD_gen
:
if
(
c_
aw
<
33
)
generate
snmp_array_o
(
11
)(
c_
aw
-1
downto
0
)
<=
latency_acc_out
;
snmp_array_o
(
11
)(
31
downto
c_
aw
)
<=
(
others
=>
'0'
);
end
generate
;
CNT_TWO_WORDs_gen
:
if
(
aw
>
32
)
generate
snmp_array_o
(
11
)(
31
downto
0
)
<=
latency_acc_out
(
31
downto
0
);
snmp_array_o
(
12
)(
aw
-32-1
downto
0
)
<=
latency_acc_out
(
aw
-1
downto
32
)
;
snmp_array_o
(
12
)(
31
downto
aw
-32
)
<=
(
others
=>
'0'
);
CNT_TWO_WORDs_gen
:
if
(
c_
aw
>
32
)
generate
snmp_array_o
(
11
)(
31
downto
0
)
<=
latency_acc_out
(
31
downto
0
);
snmp_array_o
(
12
)(
c_aw
-32-1
downto
0
)
<=
latency_acc_out
(
c_
aw
-1
downto
32
)
;
snmp_array_o
(
12
)(
31
downto
c_
aw
-32
)
<=
(
others
=>
'0'
);
end
generate
;
-- tmp debug
snmp_array_o
(
13
)(
31
downto
0
)
<=
snmp_array_i
(
0
)(
31
downto
0
);
end
rtl
;
\ No newline at end of file
modules/wr_streamers/xrx_streamer.vhd
View file @
73531de1
...
...
@@ -60,13 +60,13 @@ entity xrx_streamer is
g_buffer_size
:
integer
:
=
256
;
-- DO NOT USE unless you know what you are doing
-- legacy
stuff
: the streamers that were initially used in Btrain did not check/insert
-- legacy: the streamers that were initially used in Btrain did not check/insert
-- the escape code. This is justified if only one block of a known number of words is
-- sent/expected.
g_escape_code_disable
:
boolean
:
=
FALSE
;
-- DO NOT USE unless you know what you are doing
-- legacy
stuff
: the streamers that were initially used in Btrain accepted only a fixed
-- legacy: the streamers that were initially used in Btrain accepted only a fixed
-- number of words, regardless of the frame content. If this generic is set to number
-- other than zero, only a fixed number of words is accepted.
-- In combination with the g_escape_code_disable generic set to TRUE, the behaviour of
...
...
modules/wr_streamers/xrx_streamers_stats.vhd
View file @
73531de1
-------------------------------------------------------------------------------
-- Title : WR Recpetion Streamers statistics
-- Project : White Rabbit Streamers
-- URL : http://www.ohwr.org/projects/wr-cores/wiki/WR_Streamers
-------------------------------------------------------------------------------
-- File : xrx_streamers_stats.vhd
-- Author : Maciej Lipinski
...
...
@@ -112,7 +113,7 @@ begin
-------------------------------------------------------------------------------------------
-- frame/block statistics, i.e. lost, sent, received
-------------------------------------------------------------------------------------------
-- process that counts
stuff
: receved/lost frames
-- process that counts: receved/lost frames
p_cnts
:
process
(
clk_i
)
begin
if
rising_edge
(
clk_i
)
then
...
...
modules/wr_streamers/xtx_streamers_stats.vhd
View file @
73531de1
...
...
@@ -79,7 +79,7 @@ begin
-------------------------------------------------------------------------------------------
-- frame/block statistics, i.e. lost, sent, received
-------------------------------------------------------------------------------------------
-- process that counts
stuff: receved/send/lost frames
-- process that counts
p_cnts
:
process
(
clk_i
)
begin
if
rising_edge
(
clk_i
)
then
...
...
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