Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
18
Issues
18
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
Platform-independent core collection
Commits
380cde1d
Commit
380cde1d
authored
Jun 03, 2019
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wb_uart: code cleanup
parent
a993f050
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
163 deletions
+88
-163
wb_simple_uart.vhd
modules/wishbone/wb_uart/wb_simple_uart.vhd
+68
-116
xwb_simple_uart.vhd
modules/wishbone/wb_uart/xwb_simple_uart.vhd
+20
-47
No files found.
modules/wishbone/wb_uart/wb_simple_uart.vhd
View file @
380cde1d
This diff is collapsed.
Click to expand it.
modules/wishbone/wb_uart/xwb_simple_uart.vhd
View file @
380cde1d
...
...
@@ -16,7 +16,7 @@
-- wb_simple_uart.
--
--------------------------------------------------------------------------------
-- Copyright CERN 2010-201
8
-- Copyright CERN 2010-201
9
--------------------------------------------------------------------------------
-- Copyright and related rights are licensed under the Solderpad Hardware
-- License, Version 2.0 (the "License"); you may not use this file except
...
...
@@ -36,15 +36,14 @@ library work;
use
work
.
wishbone_pkg
.
all
;
entity
xwb_simple_uart
is
generic
(
g_with_virtual_uart
:
boolean
:
=
true
;
g_with_physical_uart
:
boolean
:
=
true
;
g_interface_mode
:
t_wishbone_interface_mode
:
=
CLASSIC
;
g_address_granularity
:
t_wishbone_address_granularity
:
=
WORD
;
g_vuart_fifo_size
:
integer
:
=
1024
);
generic
(
g_WITH_VIRTUAL_UART
:
boolean
:
=
TRUE
;
g_WITH_PHYSICAL_UART
:
boolean
:
=
TRUE
;
g_INTERFACE_MODE
:
t_wishbone_interface_mode
:
=
CLASSIC
;
g_ADDRESS_GRANULARITY
:
t_wishbone_address_granularity
:
=
WORD
;
g_VUART_FIFO_SIZE
:
integer
:
=
1024
);
port
(
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
...
...
@@ -54,48 +53,22 @@ entity xwb_simple_uart is
desc_o
:
out
t_wishbone_device_descriptor
;
int_o
:
out
std_logic
;
uart_rxd_i
:
in
std_logic
;
uart_txd_o
:
out
std_logic
);
uart_rxd_i
:
in
std_logic
;
uart_txd_o
:
out
std_logic
);
end
xwb_simple_uart
;
architecture
rtl
of
xwb_simple_uart
is
architecture
arch
of
xwb_simple_uart
is
component
wb_simple_uart
generic
(
g_with_virtual_uart
:
boolean
;
g_with_physical_uart
:
boolean
;
g_interface_mode
:
t_wishbone_interface_mode
;
g_address_granularity
:
t_wishbone_address_granularity
;
g_vuart_fifo_size
:
integer
);
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
wb_adr_i
:
in
std_logic_vector
(
4
downto
0
);
wb_dat_i
:
in
std_logic_vector
(
31
downto
0
);
wb_dat_o
:
out
std_logic_vector
(
31
downto
0
);
wb_cyc_i
:
in
std_logic
;
wb_sel_i
:
in
std_logic_vector
(
3
downto
0
);
wb_stb_i
:
in
std_logic
;
wb_we_i
:
in
std_logic
;
wb_ack_o
:
out
std_logic
;
wb_stall_o
:
out
std_logic
;
int_o
:
out
std_logic
;
uart_rxd_i
:
in
std_logic
;
uart_txd_o
:
out
std_logic
);
end
component
;
begin
-- rtl
begin
-- arch
U_Wrapped_UART
:
wb_simple_uart
U_Wrapped_UART
:
entity
work
.
wb_simple_uart
generic
map
(
g_
with_virtual_uart
=>
g_with_virtual_uart
,
g_
with_physical_uart
=>
g_with_physical_uart
,
g_
interface_mode
=>
g_interface_mode
,
g_
address_granularity
=>
g_address_granularity
,
g_
vuart_fifo_size
=>
g_vuart_fifo_size
)
g_
WITH_VIRTUAL_UART
=>
g_WITH_VIRTUAL_UART
,
g_
WITH_PHYSICAL_UART
=>
g_WITH_PHYSICAL_UART
,
g_
INTERFACE_MODE
=>
g_INTERFACE_MODE
,
g_
ADDRESS_GRANULARITY
=>
g_ADDRESS_GRANULARITY
,
g_
VUART_FIFO_SIZE
=>
g_VUART_FIFO_SIZE
)
port
map
(
clk_sys_i
=>
clk_sys_i
,
rst_n_i
=>
rst_n_i
,
...
...
@@ -116,5 +89,5 @@ begin -- rtl
slave_o
.
rty
<=
'0'
;
desc_o
<=
(
others
=>
'0'
);
end
rtl
;
end
arch
;
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