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

Subversion Repositories usb_fpga_2_13

[/] [usb_fpga_2_13/] [trunk/] [examples/] [usb-fpga-1.15y/] [ucecho/] [fpga/] [ucecho.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
library ieee;
2
use IEEE.std_logic_1164.all;
3
use IEEE.numeric_std.all;
4
 
5
entity ucecho is
6
   port(
7
      pc      : in unsigned(7 downto 0);
8
      pb      : out std_logic_vector(7 downto 0);
9
      CS      : in std_logic;
10
      CLK     : in std_logic
11
 
12
--      SCL     : in std_logic;
13
--      SDA     : in std_logic
14
   );
15
end ucecho;
16
 
17
 
18
architecture RTL of ucecho is
19
 
20
--signal declaration
21
signal pb_buf : unsigned(7 downto 0);
22
 
23
begin
24
    pb <= std_logic_vector( pb_buf ) when CS = '1' else (others => 'Z');
25
 
26
    dpUCECHO: process(CLK)
27
    begin
28
         if CLK' event and CLK = '1' then
29
            if ( pc >= 97 ) and ( pc <= 122)
30
            then
31
                pb_buf <= pc - 32;
32
            else
33
                pb_buf <= pc;
34
            end if;
35
        end if;
36
    end process dpUCECHO;
37
 
38
end RTL;

powered by: WebSVN 2.1.0

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