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

Subversion Repositories zet86

[/] [zet86/] [trunk/] [soc/] [but_int.v] - Blame information for rev 49

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 42 zeus
module but_int (
2
    input      clk,
3
    input      rst,
4
    input      but_,
5
    output reg intr,
6
    input      inta
7
  );
8
 
9
  // Register declaration
10
  reg old_but;
11
 
12
  // Behaviour
13
  always @(posedge clk)
14
    if (rst) intr <= 1'b0;
15
    else intr <= intr ? !inta : (but_ && !old_but);
16
 
17
  always @(posedge clk) old_but <= but_;
18
 
19
endmodule

powered by: WebSVN 2.1.0

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