OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_async_serial.vhd] - Diff between revs 223 and 224

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 223 Rev 224
Line 44... Line 44...
-- Revision History
-- Revision History
-- Author          Date     Change
-- Author          Date     Change
------------------ -------- ---------------------------------------------------
------------------ -------- ---------------------------------------------------
-- Seth Henry      12/20/19 Design Start
-- Seth Henry      12/20/19 Design Start
-- Seth Henry      04/10/20 Code cleanup and register documentation
-- Seth Henry      04/10/20 Code cleanup and register documentation
 
-- Seth Henry      04/16/20 Modified to use Open8 bus record
 
 
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_arith.all;
Line 61... Line 62...
  Disable_Transmit           : boolean := FALSE;
  Disable_Transmit           : boolean := FALSE;
  Disable_Receive            : boolean := FALSE;
  Disable_Receive            : boolean := FALSE;
  Bit_Rate                   : real;
  Bit_Rate                   : real;
  Enable_Parity              : boolean;
  Enable_Parity              : boolean;
  Parity_Odd_Even_n          : std_logic;
  Parity_Odd_Even_n          : std_logic;
  Sys_Freq                   : real;
  Clock_Frequency            : real;
  Reset_Level                : std_logic;
 
  Address                    : ADDRESS_TYPE
  Address                    : ADDRESS_TYPE
);
);
port(
port(
  Clock                      : in  std_logic;
 
  Reset                      : in  std_logic;
 
  --
 
  Open8_Bus                  : in  OPEN8_BUS_TYPE;
  Open8_Bus                  : in  OPEN8_BUS_TYPE;
  Rd_Data                    : out DATA_TYPE;
  Rd_Data                    : out DATA_TYPE;
  --
  --
  TX_Out                     : out std_logic;
  TX_Out                     : out std_logic;
  CTS_In                     : in  std_logic;
  CTS_In                     : in  std_logic;
Line 81... Line 78...
);
);
end entity;
end entity;
 
 
architecture behave of o8_async_serial is
architecture behave of o8_async_serial is
 
 
 
  alias Clock                is Open8_Bus.Clock;
 
  alias Reset                is Open8_Bus.Reset;
 
  alias uSec_Tick            is Open8_Bus.uSec_Tick;
 
 
  signal FIFO_Reset          : std_logic := '0';
  signal FIFO_Reset          : std_logic := '0';
 
 
  constant User_Addr         : std_logic_vector(15 downto 1) :=
  constant User_Addr         : std_logic_vector(15 downto 1) :=
                                Address(15 downto 1);
                                Address(15 downto 1);
  alias  Comp_Addr           is Open8_Bus.Address(15 downto 1);
  alias  Comp_Addr           is Open8_Bus.Address(15 downto 1);
Line 107... Line 108...
  signal TX_Ctrl             : TX_CTRL_STATES := IDLE;
  signal TX_Ctrl             : TX_CTRL_STATES := IDLE;
 
 
  signal TX_Xmit             : std_logic := '0';
  signal TX_Xmit             : std_logic := '0';
  signal TX_Done             : std_logic := '0';
  signal TX_Done             : std_logic := '0';
 
 
  constant BAUD_RATE_DIV     : integer := integer(Sys_Freq / Bit_Rate);
  constant BAUD_RATE_DIV     : integer := integer(Clock_Frequency / Bit_Rate);
 
 
  signal CTS_sr              : std_logic_vector(3 downto 0) := "0000";
  signal CTS_sr              : std_logic_vector(3 downto 0) := "0000";
  alias  CTS_Okay            is CTS_sr(3);
  alias  CTS_Okay            is CTS_sr(3);
 
 
  signal RX_FIFO_Wr_En       : std_logic := '0';
  signal RX_FIFO_Wr_En       : std_logic := '0';

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.