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

Subversion Repositories tv80

[/] [tv80/] [branches/] [restruc2/] [rtl/] [core/] [tv80_reg.v] - Blame information for rev 86

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

Line No. Rev Author Line
1 2 ghutchis
//
2
// TV80 8-Bit Microprocessor Core
3
// Based on the VHDL T80 core by Daniel Wallner (jesus@opencores.org)
4
//
5
// Copyright (c) 2004 Guy Hutchison (ghutchis@opencores.org)
6
//
7
// Permission is hereby granted, free of charge, to any person obtaining a 
8
// copy of this software and associated documentation files (the "Software"), 
9
// to deal in the Software without restriction, including without limitation 
10
// the rights to use, copy, modify, merge, publish, distribute, sublicense, 
11
// and/or sell copies of the Software, and to permit persons to whom the 
12
// Software is furnished to do so, subject to the following conditions:
13
//
14
// The above copyright notice and this permission notice shall be included 
15
// in all copies or substantial portions of the Software.
16
//
17
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
18
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
19
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
20
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
21
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
22
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
23
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
 
25
module tv80_reg (/*AUTOARG*/
26
  // Outputs
27
  DOBH, DOAL, DOCL, DOBL, DOCH, DOAH,
28
  // Inputs
29
  AddrC, AddrA, AddrB, DIH, DIL, clk, CEN, WEH, WEL
30
  );
31
    input  [2:0] AddrC;
32
    output [7:0] DOBH;
33
    input  [2:0] AddrA;
34
    input  [2:0] AddrB;
35
    input  [7:0] DIH;
36
    output [7:0] DOAL;
37
    output [7:0] DOCL;
38
    input  [7:0] DIL;
39
    output [7:0] DOBL;
40
    output [7:0] DOCH;
41
    output [7:0] DOAH;
42
    input  clk, CEN, WEH, WEL;
43
 
44
  reg [7:0] RegsH [0:7];
45
  reg [7:0] RegsL [0:7];
46
 
47
  always @(posedge clk)
48
    begin
49
      if (CEN)
50
        begin
51
          if (WEH) RegsH[AddrA] <= DIH;
52
          if (WEL) RegsL[AddrA] <= DIL;
53
        end
54
    end
55
 
56
  assign DOAH = RegsH[AddrA];
57
  assign DOAL = RegsL[AddrA];
58
  assign DOBH = RegsH[AddrB];
59
  assign DOBL = RegsL[AddrB];
60
  assign DOCH = RegsH[AddrC];
61
  assign DOCL = RegsL[AddrC];
62
 
63
  // break out ram bits for waveform debug
64
  wire [7:0] H = RegsH[2];
65
  wire [7:0] L = RegsL[2];
66 48 ghutchis
  wire [7:0] B = RegsH[0];
67
  wire [7:0] C = RegsL[0];
68
  wire [7:0] D = RegsH[1];
69
  wire [7:0] E = RegsL[1];
70
 
71 2 ghutchis
// synopsys dc_script_begin
72 48 ghutchis
// set_attribute current_design "revision" "$Id: tv80_reg.v,v 1.1.8.1 2004-11-30 21:58:10 ghutchis Exp $" -type string -quiet
73 2 ghutchis
// synopsys dc_script_end
74
endmodule
75
 

powered by: WebSVN 2.1.0

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