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

Subversion Repositories hicovec

[/] [hicovec/] [trunk/] [cpu/] [units/] [flag.vhd] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 hmanske
------------------------------------------------------------------
2 4 hmanske
-- PROJECT:      HiCoVec (highly configurable vector processor)
3 2 hmanske
--
4
-- ENTITY:      flag
5
--
6
-- PURPOSE:     one bit flag for status register
7
--              carry or zero
8
--
9
-- AUTHOR:      harald manske, haraldmanske@gmx.de
10
--
11
-- VERSION:     1.0
12
-----------------------------------------------------------------
13
library ieee;
14
use ieee.std_logic_1164.all;
15
use ieee.std_logic_arith.all;
16
use ieee.numeric_std.all;
17
 
18
entity flag is
19
    port(   clk:        in std_logic;
20
            load:       in std_logic;
21
            data_in:    in std_logic;
22
            data_out:   out std_logic
23
         );
24
end flag;
25
 
26
architecture rtl of flag is
27
    signal q:  std_logic;
28
begin
29
    process
30
    begin
31
        wait until clk='1' and clk'event;
32
 
33
        if load = '1' then
34
            q <= data_in;
35
        else
36
            q <= q;
37
        end if;
38
 
39
        end process;
40
 
41
    data_out <= q;
42
end rtl;
43
 

powered by: WebSVN 2.1.0

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