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

Subversion Repositories ps2_host_controller

[/] [ps2_host_controller/] [trunk/] [hdl/] [ps2_host_defines.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tesla
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  ps2_host_defines.v                                          ////
4
////                                                              ////
5
////  Description                                                 ////
6
////  Bunch of defines used in this core                          ////
7
////                                                              ////
8
////  Author:                                                     ////
9
////      - Piotr Foltyn, piotr.foltyn@gmail.com                  ////
10
////                                                              ////
11
//////////////////////////////////////////////////////////////////////
12
////                                                              ////
13
//// Copyright (C) 2011 Author                                    ////
14
////                                                              ////
15
//// This source file may be used and distributed without         ////
16
//// restriction provided that this copyright statement is not    ////
17
//// removed from the file and that any derivative work contains  ////
18
//// the original copyright notice and the associated disclaimer. ////
19
////                                                              ////
20
//// This source file is free software; you can redistribute it   ////
21
//// and/or modify it under the terms of the GNU Lesser General   ////
22
//// Public License as published by the Free Software Foundation; ////
23
//// either version 2.1 of the License, or (at your option) any   ////
24
//// later version.                                               ////
25
////                                                              ////
26
//// This source is distributed in the hope that it will be       ////
27
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
28
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
29
//// PURPOSE.  See the GNU Lesser General Public License for more ////
30
//// details.                                                     ////
31
////                                                              ////
32
//// You should have received a copy of the GNU Lesser General    ////
33
//// Public License along with this source; if not, download it   ////
34
//// from http://www.opencores.org/lgpl.shtml                     ////
35
////                                                              ////
36
//////////////////////////////////////////////////////////////////////
37
 
38 4 tesla
`ifndef SYS_CLOCK_HZ
39 2 tesla
`define SYS_CLOCK_HZ 100_000_000
40 4 tesla
`endif
41
 
42 2 tesla
`define T_100_MICROSECONDS (`SYS_CLOCK_HZ / 10_000)
43
`define T_200_MICROSECONDS (`SYS_CLOCK_HZ /  5_000)
44
// Ideally below define should be $clog2(`T_100_MICROSECONDS + 1)
45
`define T_100_MICROSECONDS_SIZE 14
46
// ... and same here $clog2(`T_200_MICROSECONDS + 1)
47
`define T_200_MICROSECONDS_SIZE 15

powered by: WebSVN 2.1.0

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