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
ba49b452
Commit
ba49b452
authored
13 years ago
by
Tomasz Wlostowski
Browse files
Options
Downloads
Patches
Plain Diff
added extended wishbone module for wb_gpio_port
parent
c4d82880
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/wishbone/wb_gpio_port/Manifest.py
+2
-1
2 additions, 1 deletion
modules/wishbone/wb_gpio_port/Manifest.py
modules/wishbone/wb_gpio_port/xwb_gpio_port.vhd
+87
-0
87 additions, 0 deletions
modules/wishbone/wb_gpio_port/xwb_gpio_port.vhd
with
89 additions
and
1 deletion
modules/wishbone/wb_gpio_port/Manifest.py
+
2
−
1
View file @
ba49b452
files
=
[
"
wb_gpio_port.vhd
"
];
\ No newline at end of file
files
=
[
"
wb_gpio_port.vhd
"
,
"
xwb_gpio_port.vhd
"
];
\ No newline at end of file
This diff is collapsed.
Click to expand it.
modules/wishbone/wb_gpio_port/xwb_gpio_port.vhd
0 → 100644
+
87
−
0
View file @
ba49b452
library
ieee
;
use
ieee
.
std_logic_1164
.
all
;
use
work
.
wishbone_pkg
.
all
;
entity
xwb_gpio_port
is
generic
(
g_interface_mode
:
t_wishbone_interface_mode
:
=
CLASSIC
;
g_num_pins
:
natural
:
=
8
;
g_with_builtin_tristates
:
boolean
:
=
false
);
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
-- Wishbone
slave_i
:
in
t_wishbone_slave_in
;
slave_o
:
out
t_wishbone_slave_out
;
desc_o
:
out
t_wishbone_device_descriptor
;
gpio_b
:
inout
std_logic_vector
(
g_num_pins
-1
downto
0
);
gpio_out_o
:
out
std_logic_vector
(
g_num_pins
-1
downto
0
);
gpio_in_i
:
in
std_logic_vector
(
g_num_pins
-1
downto
0
);
gpio_oen_o
:
out
std_logic_vector
(
g_num_pins
-1
downto
0
)
);
end
xwb_gpio_port
;
architecture
rtl
of
xwb_gpio_port
is
component
wb_gpio_port
generic
(
g_num_pins
:
natural
;
g_with_builtin_tristates
:
boolean
);
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
wb_sel_i
:
in
std_logic
;
wb_cyc_i
:
in
std_logic
;
wb_stb_i
:
in
std_logic
;
wb_we_i
:
in
std_logic
;
wb_adr_i
:
in
std_logic_vector
(
2
downto
0
);
wb_dat_i
:
in
std_logic_vector
(
31
downto
0
);
wb_dat_o
:
out
std_logic_vector
(
31
downto
0
);
wb_ack_o
:
out
std_logic
;
gpio_b
:
inout
std_logic_vector
(
g_num_pins
-1
downto
0
);
gpio_out_o
:
out
std_logic_vector
(
g_num_pins
-1
downto
0
);
gpio_in_i
:
in
std_logic_vector
(
g_num_pins
-1
downto
0
);
gpio_oen_o
:
out
std_logic_vector
(
g_num_pins
-1
downto
0
));
end
component
;
begin
-- rtl
gen_test_mode
:
if
(
g_interface_mode
/=
CLASSIC
)
generate
report
"xwb_gpio_port: this module can only work with CLASSIC wishbone interface"
severity
failure
;
end
generate
gen_test_mode
;
Wrapped_GPIO
:
wb_gpio_port
generic
map
(
g_num_pins
=>
g_num_pins
,
g_with_builtin_tristates
=>
g_with_builtin_tristates
)
port
map
(
clk_sys_i
=>
clk_sys_i
,
rst_n_i
=>
rst_n_i
,
wb_sel_i
=>
slave_i
.
sel
,
wb_cyc_i
=>
slave_i
.
cyc
,
wb_stb_i
=>
slave_i
.
stb
,
wb_we_i
=>
slave_i
.
we
,
wb_adr_i
=>
slave_i
.
adr
(
2
downto
0
),
wb_dat_i
=>
slave_i
.
dat
(
31
downto
0
),
wb_dat_o
=>
slave_o
.
dat
(
31
downto
0
),
wb_ack_o
=>
slave_o
.
ack
,
gpio_b
=>
gpio_b
,
gpio_out_o
=>
gpio_out_o
,
gpio_in_i
=>
gpio_in_i
,
gpio_oen_o
=>
gpio_oen_o
);
slave_o
.
stall
<=
'0'
;
slave_o
.
err
<=
'0'
;
slave_o
.
int
<=
'0'
;
slave_o
.
rty
<=
'0'
;
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