Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Gateware
Commits
0f9aee8f
Commit
0f9aee8f
authored
Jan 07, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pstats: more registers to improve timing
parent
350789e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
port_cntr.vhd
modules/wrsw_pstats/port_cntr.vhd
+13
-4
No files found.
modules/wrsw_pstats/port_cntr.vhd
View file @
0f9aee8f
...
...
@@ -180,10 +180,10 @@ begin
events_presub
<=
events_reg
((
f_onehot_decode
(
events_grant
)
+
1
)
*
g_cnt_pw
-1
downto
f_onehot_decode
(
events_grant
)
*
g_cnt_pw
);
GEN_EVT_CLR
:
for
i
in
0
to
c_rr_range
-1
generate
events_clr
((
i
+
1
)
*
g_cnt_pw
-1
downto
i
*
g_cnt_pw
)
<=
events_presub
when
(
cnt_state
=
WRITE
and
events_grant
(
i
)
=
'1'
)
else
(
others
=>
'0'
);
end
generate
;
--
GEN_EVT_CLR: for i in 0 to c_rr_range-1 generate
--
events_clr((i+1)*g_cnt_pw-1 downto i*g_cnt_pw) <= events_presub when(cnt_state=WRITE and events_grant(i)='1') else
--
(others=>'0');
--
end generate;
mem_adr
<=
f_onehot_decode
(
events_grant
);
...
...
@@ -195,6 +195,7 @@ begin
mem_wr
<=
'0'
;
events_sub
<=
(
others
=>
'0'
);
events_preg
<=
(
others
=>
'0'
);
events_clr
<=
(
others
=>
'0'
);
else
...
...
@@ -202,6 +203,7 @@ begin
when
SEL
=>
--check each segment of events_i starting from the one pointed by round robin
mem_wr
<=
'0'
;
events_clr
<=
(
others
=>
'0'
);
f_rr_arbitrate
(
events_ored
,
events_preg
,
events_grant
);
if
(
or_reduce
(
events_ored
)
=
'1'
)
then
...
...
@@ -211,6 +213,13 @@ begin
end
if
;
when
WRITE
=>
for
i
in
0
to
c_rr_range
-1
loop
if
events_grant
(
i
)
=
'1'
then
events_clr
((
i
+
1
)
*
g_cnt_pw
-1
downto
i
*
g_cnt_pw
)
<=
events_reg
((
i
+
1
)
*
g_cnt_pw
-1
downto
i
*
g_cnt_pw
);
else
events_clr
((
i
+
1
)
*
g_cnt_pw
-1
downto
i
*
g_cnt_pw
)
<=
(
others
=>
'0'
);
end
if
;
end
loop
;
events_sub
<=
events_presub
;
mem_wr
<=
'1'
;
cnt_state
<=
SEL
;
...
...
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