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
60206e72
Commit
60206e72
authored
13 years ago
by
Wesley W. Terpstra
Committed by
Tomasz Wlostowski
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
It is now possible to much more clearly state how async and sync differ.
Signed-off-by:
Tomasz Wlostowski
<
tomasz.wlostowski@cern.ch
>
parent
8ec84d06
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_crossbar/xwb_crossbar.vhd
+20
-33
20 additions, 33 deletions
modules/wishbone/wb_crossbar/xwb_crossbar.vhd
with
20 additions
and
33 deletions
modules/wishbone/wb_crossbar/xwb_crossbar.vhd
+
20
−
33
View file @
60206e72
...
...
@@ -71,11 +71,11 @@ architecture rtl of xwb_crossbar is
signal
master_oe
:
t_wishbone_master_out_array
(
g_num_slaves
downto
0
);
signal
virtual_ERR
:
std_logic
;
-- synchronous signals:
signal
previous
:
matrix
;
-- Previously connected pairs
signal
matrix_old
:
matrix
;
-- Registered connection matrix
signal
matrix_new
:
matrix
;
-- The new values of the matrix
--
(a)synchronous signals (
depending on g
eneric):
signal
granted
:
matrix
;
-- The connections to form this cycle selected previous bus
--
Either matrix_old or matrix_new,
depending on g
_registered
signal
granted
:
matrix
;
procedure
main_logic
(
signal
granted
:
out
matrix
;
...
...
@@ -228,24 +228,21 @@ begin
virtual_ERR
<=
master_oe
(
g_num_slaves
)
.
CYC
and
master_oe
(
g_num_slaves
)
.
STB
;
end
if
;
end
process
virtual_error_slave
;
-- If async determine granted devices
granted_matrix
:
if
not
g_registered
generate
main_logic
(
granted
,
slave_i
,
previous
);
end
generate
;
granted_driver
:
if
g_registered
generate
process
(
clk_sys_i
)
begin
if
rising_edge
(
clk_sys_i
)
then
if
rst_n_i
=
'0'
then
granted
<=
(
others
=>
(
others
=>
'0'
));
else
main_logic
(
granted
,
slave_i
,
granted
);
end
if
;
-- Copy the matrix to a register:
main
:
process
(
clk_sys_i
)
begin
if
rising_edge
(
clk_sys_i
)
then
if
rst_n_i
=
'0'
then
matrix_old
<=
(
others
=>
(
others
=>
'0'
));
else
matrix_old
<=
matrix_new
;
end
if
;
end
process
;
end
generate
;
end
if
;
end
process
main
;
-- Is the crossbar combinatorial or registered
granted
<=
matrix_old
when
g_registered
else
matrix_new
;
-- Make the slave connections
slave_matrix
:
for
slave
in
g_num_slaves
downto
0
generate
...
...
@@ -257,16 +254,6 @@ begin
master_logic
(
slave_o
(
master
),
master_ie
,
granted
,
master
);
end
generate
;
-- Store the current grant to the previous registers
main
:
process
(
clk_sys_i
)
begin
if
rising_edge
(
clk_sys_i
)
then
if
rst_n_i
=
'0'
then
previous
<=
(
others
=>
(
others
=>
'0'
));
else
previous
<=
granted
;
end
if
;
end
if
;
end
process
main
;
-- The main crossbar logic:
main_logic
(
matrix_new
,
slave_i
,
matrix_old
);
end
rtl
;
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