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 13

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 13 gdevic
// CREATED              "Wed Dec 07 00:18:12 2016"
18 3 gdevic
 
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_ed_set,
25
        ctl_state_tbl_cb_set,
26
        ctl_state_alu,
27
        clk,
28
        address_is_1,
29
        ctl_repeat_we,
30
        in_intr,
31
        in_nmi,
32
        nreset,
33 13 gdevic
        ctl_state_tbl_we,
34
        hold_clk_wait,
35 3 gdevic
        in_halt,
36
        table_cb,
37
        table_ed,
38
        table_xx,
39
        use_ix,
40
        use_ixiy,
41
        in_alu,
42
        repeat_en
43
);
44
 
45
 
46
input wire      ctl_state_iy_set;
47
input wire      ctl_state_ixiy_clr;
48
input wire      ctl_state_ixiy_we;
49
input wire      ctl_state_halt_set;
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 13 gdevic
input wire      ctl_state_tbl_we;
60
input wire      hold_clk_wait;
61 3 gdevic
output reg      in_halt;
62
output wire     table_cb;
63
output wire     table_ed;
64
output wire     table_xx;
65
output wire     use_ix;
66
output wire     use_ixiy;
67
output wire     in_alu;
68
output wire     repeat_en;
69
 
70
reg     DFFE_instNonRep;
71
reg     DFFE_instIY1;
72
reg     DFFE_inst4;
73
reg     DFFE_instED;
74
reg     DFFE_instCB;
75
wire    SYNTHESIZED_WIRE_0;
76 13 gdevic
wire    SYNTHESIZED_WIRE_1;
77
wire    SYNTHESIZED_WIRE_5;
78 3 gdevic
wire    SYNTHESIZED_WIRE_4;
79
 
80
assign  in_alu = ctl_state_alu;
81
assign  table_cb = DFFE_instCB;
82
assign  table_ed = DFFE_instED;
83
assign  use_ix = DFFE_inst4;
84
 
85
 
86
 
87
assign  repeat_en =  ~DFFE_instNonRep;
88
 
89
assign  use_ixiy = DFFE_instIY1 | DFFE_inst4;
90
 
91
assign  table_xx = ~(DFFE_instED | DFFE_instCB);
92
 
93
 
94
always@(posedge clk or negedge nreset)
95
begin
96
if (!nreset)
97
        begin
98
        DFFE_inst4 <= 0;
99
        end
100
else
101
if (ctl_state_ixiy_we)
102
        begin
103
        DFFE_inst4 <= SYNTHESIZED_WIRE_0;
104
        end
105
end
106
 
107
assign  SYNTHESIZED_WIRE_0 = ~(ctl_state_iy_set | ctl_state_ixiy_clr);
108
 
109 13 gdevic
assign  SYNTHESIZED_WIRE_5 = ctl_state_tbl_we & SYNTHESIZED_WIRE_1;
110 3 gdevic
 
111 13 gdevic
assign  SYNTHESIZED_WIRE_4 = in_nmi | in_intr;
112 3 gdevic
 
113 13 gdevic
assign  SYNTHESIZED_WIRE_1 =  ~hold_clk_wait;
114
 
115
 
116 3 gdevic
always@(posedge clk or negedge nreset)
117
begin
118
if (!nreset)
119
        begin
120
        DFFE_instCB <= 0;
121
        end
122
else
123 13 gdevic
if (SYNTHESIZED_WIRE_5)
124 3 gdevic
        begin
125
        DFFE_instCB <= ctl_state_tbl_cb_set;
126
        end
127
end
128
 
129
 
130
always@(posedge clk or negedge nreset)
131
begin
132
if (!nreset)
133
        begin
134
        DFFE_instED <= 0;
135
        end
136
else
137 13 gdevic
if (SYNTHESIZED_WIRE_5)
138 3 gdevic
        begin
139
        DFFE_instED <= ctl_state_tbl_ed_set;
140
        end
141
end
142
 
143
 
144
always@(posedge clk or negedge nreset)
145
begin
146
if (!nreset)
147
        begin
148
        in_halt <= 0;
149
        end
150
else
151
        begin
152 13 gdevic
        in_halt <= ~in_halt & ctl_state_halt_set | in_halt & ~SYNTHESIZED_WIRE_4;
153 3 gdevic
        end
154
end
155
 
156
 
157
always@(posedge clk or negedge nreset)
158
begin
159
if (!nreset)
160
        begin
161
        DFFE_instIY1 <= 0;
162
        end
163
else
164
if (ctl_state_ixiy_we)
165
        begin
166
        DFFE_instIY1 <= ctl_state_iy_set;
167
        end
168
end
169
 
170
 
171
always@(posedge clk or negedge nreset)
172
begin
173
if (!nreset)
174
        begin
175
        DFFE_instNonRep <= 0;
176
        end
177
else
178
if (ctl_repeat_we)
179
        begin
180
        DFFE_instNonRep <= address_is_1;
181
        end
182
end
183
 
184
 
185
endmodule

powered by: WebSVN 2.1.0

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