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

Subversion Repositories zet86

[/] [zet86/] [trunk/] [soc/] [but_int.v] - Rev 52

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

module but_int (
    input      clk,
    input      rst,
    input      but_,
    output reg intr,
    input      inta
  );
 
  // Register declaration
  reg old_but;
 
  // Behaviour
  always @(posedge clk)
    if (rst) intr <= 1'b0;
    else intr <= intr ? !inta : (but_ && !old_but);
 
  always @(posedge clk) old_but <= but_;
 
endmodule
 

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

powered by: WebSVN 2.1.0

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