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

Subversion Repositories dma_ahb

[/] [dma_ahb/] [trunk/] [src/] [dma_ahb64/] [dma_ahb64_core0_ahbm_timeout.v] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 eyalhoc
//---------------------------------------------------------
2
//-- File generated by RobustVerilog parser
3
//-- Version: 1.0
4
//-- Invoked Fri Mar 25 23:33:00 2011
5
//--
6
//-- Source file: dma_core_ahbm_timeout.v
7
//---------------------------------------------------------
8
 
9
 
10
 
11
module dma_ahb64_core0_ahbm_timeout(clk,reset,HTRANS,HREADY,ahb_timeout);
12
 
13
   input               clk;
14
   input               reset;
15
 
16
   input [1:0]               HTRANS;
17
   input               HREADY;
18
 
19
   output               ahb_timeout;
20
 
21
 
22
   wire               HVALID;
23
   reg [`TIMEOUT_BITS-1:0]    counter;
24
 
25
 
26
 
27
   assign               HVALID      = HTRANS[1];
28
   assign               ahb_timeout = (counter == 'd0);
29
 
30
 
31
   always @(posedge clk or posedge reset)
32
     if (reset)
33
       counter <= #1 {`TIMEOUT_BITS{1'b1}};
34
     else if (HVALID & HREADY)
35
       counter <= #1 {`TIMEOUT_BITS{1'b1}};
36
     else if (HVALID)
37
       counter <= #1 counter - 1'b1;
38
 
39
 
40
 
41
endmodule
42
 
43
 
44
 
45
 
46
 

powered by: WebSVN 2.1.0

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