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.04/] [2.04b/] [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 unsigned(7 downto 0);
9
      CLK     : in std_logic
10
   );
11
end ucecho;
12
 
13
 
14
architecture RTL of ucecho is
15
 
16
--signal declaration
17
signal pb_buf : unsigned(7 downto 0);
18
 
19
begin
20
    dpUCECHO: process(CLK)
21
    begin
22
         if CLK' event and CLK = '1' then
23
            if ( pc >= 97 ) and ( pc <= 122)
24
            then
25
                pb_buf <= pc - 32;
26
            else
27
                pb_buf <= pc;
28
            end if;
29
            pb <= pb_buf;
30
        end if;
31
    end process dpUCECHO;
32
 
33
end RTL;

powered by: WebSVN 2.1.0

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