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

Subversion Repositories usb_fpga_2_04

[/] [usb_fpga_2_04/] [trunk/] [examples/] [usb-fpga-2.16/] [2.16b/] [ucecho/] [fpga-vivado/] [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
Library UNISIM;
5
use UNISIM.vcomponents.all;
6
 
7
entity ucecho is
8
   port(
9
      pd        : in unsigned(7 downto 0);
10
      pb        : out unsigned(7 downto 0);
11
      fxclk_in  : in std_logic
12
   );
13
end ucecho;
14
 
15
 
16
architecture RTL of ucecho is
17
 
18
--signal declaration
19
signal pb_buf : unsigned(7 downto 0);
20
signal clk : std_logic;
21
 
22
begin
23
    clk_buf : IBUFG
24
    port map (
25
        I => fxclk_in,
26
        O => clk
27
     );
28
 
29
    dpUCECHO: process(CLK)
30
    begin
31
         if CLK' event and CLK = '1' then
32
            if ( pd >= 97 ) and ( pd <= 122)
33
            then
34
                pb_buf <= pd - 32;
35
            else
36
                pb_buf <= pd;
37
            end if;
38
            pb <= pb_buf;
39
        end if;
40
    end process dpUCECHO;
41
 
42
end RTL;

powered by: WebSVN 2.1.0

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