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

Subversion Repositories bu_pacman

[/] [bu_pacman/] [tags/] [arelease/] [buffer_machine.v] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 soloist_hu
`timescale 1ns / 1ps
2
//////////////////////////////////////////////////////////////////////////////////
3
// Company: 
4
// Engineer: 
5
// 
6
// Create Date:    00:50:54 11/20/2008 
7
// Design Name: 
8
// Module Name:    buffer_machine 
9
// Project Name: 
10
// Target Devices: 
11
// Tool versions: 
12
// Description: 
13
//
14
// Dependencies: 
15
//
16
// Revision: 
17
// Revision 0.01 - File Created
18
// Additional Comments: 
19
//
20
//////////////////////////////////////////////////////////////////////////////////
21
module buffer_machine(hcount,vcount,buf_cntrl);
22
 
23
//Inputs
24
input [10:0] hcount;
25
input [10:0] vcount;
26
 
27
//Outputs
28
output buf_cntrl;
29
 
30
//regs
31
reg buf_cntrl;
32
reg buf_state = 0;
33
 
34
//parameters
35
parameter state1 = 0;
36
parameter state2 = 1;
37
 
38
always @ (hcount,vcount)
39
begin
40
        if(hcount == 639 && vcount == 479) begin
41
                case(buf_state)
42
                        state1: begin
43
                                buf_state <= state2;
44
                                buf_cntrl <= 1;
45
                                end
46
                        state2: begin
47
                                buf_state <= state1;
48
                                buf_cntrl <= 0;
49
                                end
50
                        endcase
51
                end
52
end
53
 
54
endmodule

powered by: WebSVN 2.1.0

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