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-2.13/] [2.13d/] [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
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 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
 
21
begin
22
    pb <= pb_buf;
23
 
24
    dpUCECHO: process(fxclk)
25
    begin
26
         if fxclk' event and fxclk = '1' then
27
            if ( pd >= 97 ) and ( pd <= 122)
28
            then
29
                pb_buf <= pd - 32;
30
            else
31
                pb_buf <= pd;
32
            end if;
33
        end if;
34
    end process dpUCECHO;
35
 
36
end RTL;

powered by: WebSVN 2.1.0

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