Subversion Repositories pentevo

Rev

Rev 1063 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1063 Rev 1064
Line 39... Line 39...
39
        output reg  i_hpix,
39
        output reg  i_hpix,
40
        output reg  i_vpix,
40
        output reg  i_vpix,
41
 
41
 
42
        // fetch synchronizing signals
42
        // fetch synchronizing signals
43
        output reg  v_init, // prepare fetching whole screen
43
        output reg  v_init, // prepare fetching whole screen
44
        output reg  h_init, // prepare fetching/displaying single line 
44
        output reg  v_step, // step to the next screen line
45
        output reg  h_step, // step to the next screen line
45
        output reg  v_char, // step to the next char line
46
 
46
       
-
 
47
        output reg  h_init, // prepare fetching/displaying single line 
47
        output reg  h_char  // strobes 6 pix_stb's before the pix_stb that begins h_pix,
48
        output reg  h_char  // strobes 6 pix_stb's before the pix_stb that begins h_pix,
48
                            // then continues throughout the visible area. Ends also 6 pix_stb's
49
                            // then continues throughout the visible area. Ends also 6 pix_stb's
49
                            // before the end of h_pix
50
                            // before the end of h_pix
50
);
51
);
51
 
52
 
Line 184... Line 185...
184
                        i_vpix <= 1'b0;
185
                        i_vpix <= 1'b0;
185
        end
186
        end
186
 
187
 
187
 
188
 
188
 
189
 
189
        // fetch/display syncs
190
        // vertical fetch syncs
-
 
191
 
190
        always @(posedge clk)
192
        always @(posedge clk)
191
        if( pix_stb )
193
        if( pix_stb )
192
        begin
194
        begin
193
                if( v_stb && vsync_off )
195
                if( v_stb && vsync_off )
194
                        v_init <= 1'b1;
196
                        v_init <= 1'b1;
195
                else
197
                else
196
                        v_init <= 1'b0;
198
                        v_init <= 1'b0;
197
        end
199
        end
-
 
200
 
198
        //
201
 
-
 
202
        reg [2:0] vctr_6;
199
        always @(posedge clk)
203
        always @(posedge clk)
200
        if( pix_stb )
204
        if( pix_stb )
201
        begin
205
        begin
202
                if( hsync_off )
206
                if( ?? )
203
                        h_init <= 1'b1;
207
                        vctr_6
204
                else
208
                else if( v_stb )
205
                        h_init <= 1'b0;
209
                        vctr_6 <= (vctr_6[2] & vctr_6[0]) ? 3'd0 : (vctr_6 + 3'd1);
206
        end
210
        end
-
 
211
 
207
        //
212
 
208
        always @(posedge clk)
213
        always @(posedge clk)
209
        if( pix_stb )
214
        if( pix_stb )
210
        begin
215
        begin
211
                if( i_vpix && v_stb )
216
                if( i_vpix && v_stb )
212
                        h_step <= 1'b1;
217
                        v_step <= 1'b1;
213
                else
218
                else
214
                        h_step <= 1'b0;
219
                        v_step <= 1'b0;
-
 
220
        end
-
 
221
       
-
 
222
 
-
 
223
 
-
 
224
 
-
 
225
        // horizontal fetch syncs
-
 
226
 
-
 
227
        always @(posedge clk)
-
 
228
        if( pix_stb )
-
 
229
        begin
-
 
230
                if( hsync_off )
-
 
231
                        h_init <= 1'b1;
-
 
232
                else
-
 
233
                        h_init <= 1'b0;
215
        end
234
        end
216
 
235
 
217
       
236
       
218
        wire start_char = vga_on ? (h_counter==(H_VGA_PIX_START-7)) : (h_counter==(H_TV_PIX_START-7));
237
        wire start_char = vga_on ? (h_counter==(H_VGA_PIX_START-7)) : (h_counter==(H_TV_PIX_START-7));
219
        wire stop_char  = vga_on ? (h_counter==(H_VGA_PIX_STOP -7)) : (h_counter==(H_TV_PIX_STOP -7));
238
        wire stop_char  = vga_on ? (h_counter==(H_VGA_PIX_STOP -7)) : (h_counter==(H_TV_PIX_STOP -7));