Rev 200 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
668 | lvd | 1 | // ZX-Evo Base Configuration (c) NedoPC 2008,2009,2010,2011,2012,2013,2014 |
155 | lvd | 2 | // |
3 | // just DOS signal control |
||
4 | |||
668 | lvd | 5 | /* |
6 | This file is part of ZX-Evo Base Configuration firmware. |
||
7 | |||
8 | ZX-Evo Base Configuration firmware is free software: |
||
9 | you can redistribute it and/or modify it under the terms of |
||
10 | the GNU General Public License as published by |
||
11 | the Free Software Foundation, either version 3 of the License, or |
||
12 | (at your option) any later version. |
||
13 | |||
14 | ZX-Evo Base Configuration firmware is distributed in the hope that |
||
15 | it will be useful, but WITHOUT ANY WARRANTY; without even |
||
16 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
17 | See the GNU General Public License for more details. |
||
18 | |||
19 | You should have received a copy of the GNU General Public License |
||
20 | along with ZX-Evo Base Configuration firmware. |
||
21 | If not, see <http://www.gnu.org/licenses/>. |
||
22 | */ |
||
23 | |||
161 | lvd | 24 | `include "../include/tune.v" |
155 | lvd | 25 | |
26 | module zdos( |
||
27 | |||
28 | input wire fclk, |
||
29 | input wire rst_n, |
||
30 | |||
31 | |||
32 | input wire dos_turn_on, |
||
33 | input wire dos_turn_off, |
||
34 | |||
158 | lvd | 35 | input wire cpm_n, |
155 | lvd | 36 | |
158 | lvd | 37 | |
155 | lvd | 38 | output reg dos |
39 | ); |
||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
45 | |||
46 | |||
47 | always @(posedge fclk, negedge rst_n) |
||
48 | if( !rst_n ) |
||
49 | begin |
||
170 | lvd | 50 | dos = 1'b1; |
155 | lvd | 51 | end |
52 | else // posedge fclk |
||
53 | begin |
||
158 | lvd | 54 | if( !cpm_n ) |
55 | dos <= 1'b1; |
||
56 | else if( dos_turn_off ) |
||
155 | lvd | 57 | dos <= 1'b0; |
58 | else if( dos_turn_on ) |
||
59 | dos <= 1'b1; |
||
60 | end |
||
61 | |||
62 | |||
63 | |||
64 | |||
65 | |||
66 | |||
67 | |||
68 | endmodule |
||
69 | |||
70 |