diff options
| author | Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de> | 2024-05-14 16:21:25 +0200 | 
|---|---|---|
| committer | Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de> | 2024-05-14 16:21:25 +0200 | 
| commit | 1b09cc725908bbec8ec2e416ebeb09d8a84ac2a6 (patch) | |
| tree | 31986ff7695371834515177ded0f61af509e0df3 /src/top_uart.vhd | |
| parent | 1f690b5ea2be1cfc6290b7d5539effd001cde5e5 (diff) | |
add top_uart
Diffstat (limited to 'src/top_uart.vhd')
| -rw-r--r-- | src/top_uart.vhd | 37 | 
1 files changed, 37 insertions, 0 deletions
| diff --git a/src/top_uart.vhd b/src/top_uart.vhd new file mode 100644 index 0000000..4cc6c01 --- /dev/null +++ b/src/top_uart.vhd @@ -0,0 +1,37 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity top_uart is  +port ( SW       : in  std_ulogic_vector(9 downto 0); +       KEY      : in  std_ulogic_vector(3 downto 0); +       CLOCK_50 : in  std_ulogic; +       UART_RXD : in  std_ulogic; +       UART_TXD : out std_ulogic; +       EXP      : out std_ulogic_vector(7 downto 0); +       LEDG     : out std_ulogic_vector(3 downto 0); +       LEDR     : out std_ulogic_vector(9 downto 0)); +end entity; + +architecture rtl of top_uart is +  signal clk     : std_ulogic; +  signal rst_n   : std_ulogic; +  signal en, txd : std_ulogic; +begin +  -- Assign the inputs to signals with reasonable names +  clk <= CLOCK_50; +  rst_n <= KEY(0); + +  txd <= '0'; +  en <= '0'; + +  -- Set the outputs; +  EXP(7 downto 4) <= "0000"; +  EXP(3 downto 0) <= (3 => txd, +          2 => en, +          1 => rst_n, +          0 => clk); +  UART_TXD <= txd; +  LEDR <= SW; +  LEDG <= KEY; + +end architecture rtl;
\ No newline at end of file | 
