Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Platform-independent core collection
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Platform-independent core collection
Commits
32cc46e5
Commit
32cc46e5
authored
11 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
wb_irq: appease modelsim
parent
bbbbdb8d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/wishbone/wb_irq/irqm_core.vhd
+11
-15
11 additions, 15 deletions
modules/wishbone/wb_irq/irqm_core.vhd
with
11 additions
and
15 deletions
modules/wishbone/wb_irq/irqm_core.vhd
+
11
−
15
View file @
32cc46e5
...
...
@@ -44,6 +44,8 @@ signal r_pending : std_logic_vector(g_channels-1 downto 0);
signal
s_wb_send
:
std_logic
;
signal
r_wb_sending
:
std_logic
;
signal
idx
:
natural
range
0
to
g_channels
-1
;
signal
idx_robin
:
natural
range
0
to
g_channels
-1
;
signal
idx_prio
:
natural
range
0
to
g_channels
-1
;
begin
...
...
@@ -79,39 +81,33 @@ irq_master_o.we <= '1';
s_irq_edge
<=
r_irq
;
end
generate
;
G_RR_1
:
if
(
g_round_rb
)
generate
begin
-- round robin
process
(
clk_i
)
idx_round_robin
:
process
(
clk_i
)
begin
if
rising_edge
(
clk_i
)
then
if
(
rst_n_i
=
'0'
)
then
idx
<=
0
;
idx
_robin
<=
0
;
else
if
((
not
r_wb_sending
and
r_pending
(
idx
))
=
'0'
)
then
if
(
idx
=
g_channels
-1
)
then
idx
<=
0
;
if
((
not
r_wb_sending
and
r_pending
(
idx
_robin
))
=
'0'
)
then
if
(
idx
_robin
=
g_channels
-1
)
then
idx
_robin
<=
0
;
else
idx
<=
idx
+
1
;
idx
_robin
<=
idx
_robin
+
1
;
end
if
;
end
if
;
end
if
;
end
if
;
end
process
;
end
generate
;
G_RR_2
:
if
(
not
g_round_rb
)
generate
begin
-- priority
with
f_hot_to_bin
(
r_pending
)
select
idx
<=
0
when
0
,
idx
_prio
<=
0
when
0
,
f_hot_to_bin
(
r_pending
)
-1
when
others
;
en
d
g
enerate
;
idx
<=
idx_robin
wh
en
g
_round_rb
else
idx_prio
;
-------------------------------------------------------------------------
...
...
@@ -163,7 +159,7 @@ irq_master_o.we <= '1';
v_dst
(
6
downto
2
)
:
=
std_logic_vector
(
to_unsigned
(
idx
,
5
));
if
(
g_has_dev_id
)
then
v_dst
(
1
5
downto
8
)
:
=
g_dev_id
;
v_dst
(
1
2
downto
8
)
:
=
g_dev_id
;
v_dst
(
31
downto
16
)
:
=
s_dst
(
idx
)(
31
downto
16
);
else
v_dst
(
31
downto
7
)
:
=
s_dst
(
idx
)(
31
downto
7
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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