OpenCores
URL https://opencores.org/ocsvn/a-z80/a-z80/trunk

Subversion Repositories a-z80

[/] [a-z80/] [trunk/] [cpu/] [control/] [decode_state.v] - Blame information for rev 3

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

Line No. Rev Author Line
1 3 gdevic
// Copyright (C) 1991-2013 Altera Corporation
2
// Your use of Altera Corporation's design tools, logic functions 
3
// and other software and tools, and its AMPP partner logic 
4
// functions, and any output files from any of the foregoing 
5
// (including device programming or simulation files), and any 
6
// associated documentation or information are expressly subject 
7
// to the terms and conditions of the Altera Program License 
8
// Subscription Agreement, Altera MegaCore Function License 
9
// Agreement, or other applicable license agreement, including, 
10
// without limitation, that your use is for the sole purpose of 
11
// programming logic devices manufactured by Altera and sold by 
12
// Altera or its authorized distributors.  Please refer to the 
13
// applicable agreement for further details.
14
 
15
// PROGRAM              "Quartus II 64-Bit"
16
// VERSION              "Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Web Edition"
17
// CREATED              "Fri Oct 31 20:27:41 2014"
18
 
19
module decode_state(
20
        ctl_state_iy_set,
21
        ctl_state_ixiy_clr,
22
        ctl_state_ixiy_we,
23
        ctl_state_halt_set,
24
        ctl_state_tbl_clr,
25
        ctl_state_tbl_ed_set,
26
        ctl_state_tbl_cb_set,
27
        ctl_state_alu,
28
        clk,
29
        address_is_1,
30
        ctl_repeat_we,
31
        in_intr,
32
        in_nmi,
33
        nreset,
34
        in_halt,
35
        table_cb,
36
        table_ed,
37
        table_xx,
38
        use_ix,
39
        use_ixiy,
40
        in_alu,
41
        repeat_en
42
);
43
 
44
 
45
input wire      ctl_state_iy_set;
46
input wire      ctl_state_ixiy_clr;
47
input wire      ctl_state_ixiy_we;
48
input wire      ctl_state_halt_set;
49
input wire      ctl_state_tbl_clr;
50
input wire      ctl_state_tbl_ed_set;
51
input wire      ctl_state_tbl_cb_set;
52
input wire      ctl_state_alu;
53
input wire      clk;
54
input wire      address_is_1;
55
input wire      ctl_repeat_we;
56
input wire      in_intr;
57
input wire      in_nmi;
58
input wire      nreset;
59
output reg      in_halt;
60
output wire     table_cb;
61
output wire     table_ed;
62
output wire     table_xx;
63
output wire     use_ix;
64
output wire     use_ixiy;
65
output wire     in_alu;
66
output wire     repeat_en;
67
 
68
reg     DFFE_instNonRep;
69
reg     DFFE_instIY1;
70
reg     DFFE_inst4;
71
reg     DFFE_instED;
72
reg     DFFE_instCB;
73
wire    SYNTHESIZED_WIRE_0;
74
wire    SYNTHESIZED_WIRE_4;
75
wire    SYNTHESIZED_WIRE_3;
76
 
77
assign  in_alu = ctl_state_alu;
78
assign  table_cb = DFFE_instCB;
79
assign  table_ed = DFFE_instED;
80
assign  use_ix = DFFE_inst4;
81
 
82
 
83
 
84
assign  repeat_en =  ~DFFE_instNonRep;
85
 
86
assign  SYNTHESIZED_WIRE_4 = ctl_state_tbl_clr | ctl_state_tbl_ed_set | ctl_state_tbl_cb_set;
87
 
88
assign  use_ixiy = DFFE_instIY1 | DFFE_inst4;
89
 
90
assign  table_xx = ~(DFFE_instED | DFFE_instCB);
91
 
92
 
93
always@(posedge clk or negedge nreset)
94
begin
95
if (!nreset)
96
        begin
97
        DFFE_inst4 <= 0;
98
        end
99
else
100
if (ctl_state_ixiy_we)
101
        begin
102
        DFFE_inst4 <= SYNTHESIZED_WIRE_0;
103
        end
104
end
105
 
106
assign  SYNTHESIZED_WIRE_0 = ~(ctl_state_iy_set | ctl_state_ixiy_clr);
107
 
108
assign  SYNTHESIZED_WIRE_3 = in_nmi | in_intr;
109
 
110
 
111
always@(posedge clk or negedge nreset)
112
begin
113
if (!nreset)
114
        begin
115
        DFFE_instCB <= 0;
116
        end
117
else
118
if (SYNTHESIZED_WIRE_4)
119
        begin
120
        DFFE_instCB <= ctl_state_tbl_cb_set;
121
        end
122
end
123
 
124
 
125
always@(posedge clk or negedge nreset)
126
begin
127
if (!nreset)
128
        begin
129
        DFFE_instED <= 0;
130
        end
131
else
132
if (SYNTHESIZED_WIRE_4)
133
        begin
134
        DFFE_instED <= ctl_state_tbl_ed_set;
135
        end
136
end
137
 
138
 
139
always@(posedge clk or negedge nreset)
140
begin
141
if (!nreset)
142
        begin
143
        in_halt <= 0;
144
        end
145
else
146
        begin
147
        in_halt <= ~in_halt & ctl_state_halt_set | in_halt & ~SYNTHESIZED_WIRE_3;
148
        end
149
end
150
 
151
 
152
always@(posedge clk or negedge nreset)
153
begin
154
if (!nreset)
155
        begin
156
        DFFE_instIY1 <= 0;
157
        end
158
else
159
if (ctl_state_ixiy_we)
160
        begin
161
        DFFE_instIY1 <= ctl_state_iy_set;
162
        end
163
end
164
 
165
 
166
always@(posedge clk or negedge nreset)
167
begin
168
if (!nreset)
169
        begin
170
        DFFE_instNonRep <= 0;
171
        end
172
else
173
if (ctl_repeat_we)
174
        begin
175
        DFFE_instNonRep <= address_is_1;
176
        end
177
end
178
 
179
 
180
endmodule

powered by: WebSVN 2.1.0

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