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

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [cpu/] [fz.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trurl
------------------------------------------------------------------
2
--!
3
--! PDP-8 Processor
4
--!
5
--! \brief
6
--!      CPU Force Zero (FZ) Register
7
--!
8
--! \details
9
--!      The Force Zero (FZ) Register is defined in the HD-6120
10
--!      documentation.  Its functionality is mostly not
11
--!      implemented.
12
--!
13
--! \todo
14
--!      The FZ Register is not implemented.
15
--!
16
--! \file
17
--!      fz.vhd
18
--!
19
--! \author
20
--!      Rob Doyle - doyle (at) cox (dot) net
21
--!
22
--------------------------------------------------------------------
23
--
24
--  Copyright (C) 2009 Rob Doyle
25
--
26
-- This source file may be used and distributed without
27
-- restriction provided that this copyright statement is not
28
-- removed from the file and that any derivative work contains
29
-- the original copyright notice and the associated disclaimer.
30
--
31
-- This source file is free software; you can redistribute it
32
-- and/or modify it under the terms of the GNU Lesser General
33
-- Public License as published by the Free Software Foundation;
34
-- version 2.1 of the License.
35
--
36
-- This source is distributed in the hope that it will be
37
-- useful, but WITHOUT ANY WARRANTY; without even the implied
38
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
39
-- PURPOSE. See the GNU Lesser General Public License for more
40
-- details.
41
--
42
-- You should have received a copy of the GNU Lesser General
43
-- Public License along with this source; if not, download it
44
-- from http://www.gnu.org/licenses/lgpl.txt
45
--
46
--------------------------------------------------------------------
47
--
48
-- Comments are formatted for doxygen
49
--
50
 
51
library ieee;                                   --! IEEE Library
52
use ieee.std_logic_1164.all;                    --! IEEE 1164
53
use ieee.numeric_std.all;                       --! IEEE Numeric Standard
54
use work.cpu_types.all;                        --! Types
55
 
56
--
57
--! CPU Force Zero (FZ) Register Entity
58
--
59
 
60
entity eFZ is port (
61
    sys  : in  sys_t;                           --! Clock/Reset
62
    fzOP : in  fzOP_t;                          --! FZ Operation
63
    FZ   : out std_logic                        --! FZ Output
64
);
65
end eFZ;
66
 
67
--
68
--! CPU Force Zero (FZ) Register RTL
69
--
70
 
71
architecture rtl of eFZ is
72
 
73
    signal fzREG : std_logic;                   -- Force Zero Flag
74
    signal fzMUX : std_logic;                   -- Force Zero Flag Multiplexer
75
 
76
begin
77
 
78
    --
79
    -- FZ Multiplexer
80
    --
81
 
82
    with fzOP select
83
         fzMUX <= fzREG when fzopNOP,           -- FZ <- FZ
84
                  '0'   when fzopCLR,           -- FZ <- '0'
85
                  '1'   when fzopSET;           -- FZ <- '1'
86
 
87
    --
88
    --! FZ Register
89
    --
90
 
91
    REG_FZ : process(sys)
92
    begin
93
        if sys.rst = '1' then
94
            fzREG <= '0';
95
        elsif rising_edge(sys.clk) then
96
            fzREG <= fzMUX;
97
        end if;
98
    end process REG_FZ;
99
 
100
    FZ <= fzREG;
101
 
102
end rtl;

powered by: WebSVN 2.1.0

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