Line 1... |
Line 1... |
-- $Id: serport.vhd 424 2011-11-13 16:38:23Z mueller $
|
-- $Id: serport.vhd 437 2011-12-09 19:38:07Z mueller $
|
--
|
--
|
-- Copyright 2007-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
-- Copyright 2007-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
--
|
--
|
-- This program is free software; you may redistribute and/or modify it under
|
-- This program is free software; you may redistribute and/or modify it under
|
-- the terms of the GNU General Public License as published by the Free
|
-- the terms of the GNU General Public License as published by the Free
|
Line 18... |
Line 18... |
-- Dependencies: -
|
-- Dependencies: -
|
-- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1; ghdl 0.18-0.29
|
-- Tool versions: xst 8.2, 9.1, 9.2, 11.4, 12.1; ghdl 0.18-0.29
|
--
|
--
|
-- Revision History:
|
-- Revision History:
|
-- Date Rev Version Comment
|
-- Date Rev Version Comment
|
|
-- 2011-12-09 437 1.2.5 rename stat->moni port
|
-- 2011-10-23 419 1.2.4 remove serport_clkdiv_ consts;
|
-- 2011-10-23 419 1.2.4 remove serport_clkdiv_ consts;
|
-- 2011-10-22 417 1.2.3 add serport_xon(rx|tx) defs
|
-- 2011-10-22 417 1.2.3 add serport_xon(rx|tx) defs
|
-- 2011-10-14 416 1.2.2 add c_serport defs
|
-- 2011-10-14 416 1.2.2 add c_serport defs
|
-- 2010-12-26 348 1.2.1 add ABCLKDIV to serport_uart_rxtx_ab
|
-- 2010-12-26 348 1.2.1 add ABCLKDIV to serport_uart_rxtx_ab
|
-- 2010-04-10 276 1.2 add clock divider constant defs
|
-- 2010-04-10 276 1.2 add clock divider constant defs
|
Line 157... |
Line 158... |
RXOK : in slbit; -- rx channel ok
|
RXOK : in slbit; -- rx channel ok
|
TXOK : in slbit -- tx channel ok
|
TXOK : in slbit -- tx channel ok
|
);
|
);
|
end component;
|
end component;
|
|
|
type serport_stat_type is record -- serial port module status
|
type serport_moni_type is record -- serport monitor port
|
rxerr : slbit; -- receiver data error (frame error)
|
rxerr : slbit; -- receiver data error (frame error)
|
rxovr : slbit; -- receiver data overrun
|
rxovr : slbit; -- receiver data overrun
|
rxact : slbit; -- receiver active
|
rxact : slbit; -- receiver active
|
txact : slbit; -- transceiver active
|
txact : slbit; -- transceiver active
|
abact : slbit; -- autobauder active;if 1 clkdiv invalid
|
abact : slbit; -- autobauder active;if 1 clkdiv invalid
|
abdone : slbit; -- autobauder resync done
|
abdone : slbit; -- autobauder resync done
|
abclkdiv : slv16; -- autobauder clock divider
|
abclkdiv : slv16; -- autobauder clock divider
|
rxok : slbit; -- rx channel ok
|
rxok : slbit; -- rx channel ok
|
txok : slbit; -- tx channel ok
|
txok : slbit; -- tx channel ok
|
end record serport_stat_type;
|
end record serport_moni_type;
|
|
|
constant serport_stat_init : serport_stat_type := (
|
constant serport_moni_init : serport_moni_type := (
|
'0','0', -- rxerr,rxovr
|
'0','0', -- rxerr,rxovr
|
'0','0', -- rxact,txact
|
'0','0', -- rxact,txact
|
'0','0', -- abact,abdone
|
'0','0', -- abact,abdone
|
(others=>'0'), -- abclkdiv
|
(others=>'0'), -- abclkdiv
|
'0','0' -- rxok,txok
|
'0','0' -- rxok,txok
|
Line 195... |
Line 196... |
RXVAL : out slbit; -- receiver data valid
|
RXVAL : out slbit; -- receiver data valid
|
RXHOLD : in slbit; -- receiver data hold
|
RXHOLD : in slbit; -- receiver data hold
|
TXDATA : in slv8; -- transmit data in
|
TXDATA : in slv8; -- transmit data in
|
TXENA : in slbit; -- transmit data enable
|
TXENA : in slbit; -- transmit data enable
|
TXBUSY : out slbit; -- transmit busy
|
TXBUSY : out slbit; -- transmit busy
|
STAT : out serport_stat_type; -- serport module status
|
MONI : out serport_moni_type; -- serport monitor port
|
RXSD : in slbit; -- receive serial data (uart view)
|
RXSD : in slbit; -- receive serial data (uart view)
|
TXSD : out slbit; -- transmit serial data (uart view)
|
TXSD : out slbit; -- transmit serial data (uart view)
|
RXRTS_N : out slbit; -- receive rts (uart view, act.low)
|
RXRTS_N : out slbit; -- receive rts (uart view, act.low)
|
TXCTS_N : in slbit -- transmit cts (uart view, act.low)
|
TXCTS_N : in slbit -- transmit cts (uart view, act.low)
|
);
|
);
|
Line 222... |
Line 223... |
RXVAL : out slbit; -- U|receiver data valid
|
RXVAL : out slbit; -- U|receiver data valid
|
RXHOLD : in slbit; -- U|receiver data hold
|
RXHOLD : in slbit; -- U|receiver data hold
|
TXDATA : in slv8; -- U|transmit data in
|
TXDATA : in slv8; -- U|transmit data in
|
TXENA : in slbit; -- U|transmit data enable
|
TXENA : in slbit; -- U|transmit data enable
|
TXBUSY : out slbit; -- U|transmit busy
|
TXBUSY : out slbit; -- U|transmit busy
|
STAT : out serport_stat_type; -- U|serport module status
|
MONI : out serport_moni_type; -- U|serport monitor port
|
RXSD : in slbit; -- S|receive serial data (uart view)
|
RXSD : in slbit; -- S|receive serial data (uart view)
|
TXSD : out slbit; -- S|transmit serial data (uart view)
|
TXSD : out slbit; -- S|transmit serial data (uart view)
|
RXRTS_N : out slbit; -- S|receive rts (uart view, act.low)
|
RXRTS_N : out slbit; -- S|receive rts (uart view, act.low)
|
TXCTS_N : in slbit -- S|transmit cts (uart view, act.low)
|
TXCTS_N : in slbit -- S|transmit cts (uart view, act.low)
|
);
|
);
|