URL
https://opencores.org/ocsvn/blue/blue/trunk
Subversion Repositories blue
[/] [blue/] [trunk/] [blue8/] [jkff.v] - Rev 4
Go to most recent revision | Compare with Previous | Blame | View Log
/* This file is part of Blue8. Foobar is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Foobar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Blue8. If not, see <http://www.gnu.org/licenses/>. Blue8 by Al Williams alw@al-williams.com */ `timescale 1ns / 1ps `default_nettype none //////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 11:17:11 09/21/06 // Design Name: // Module Name: jkff // Project Name: // Target Device: // Tool versions: // Description: // // Dependencies: // // Revision: // Revision 0.01 - File Created // Additional Comments: // //////////////////////////////////////////////////////////////////////////////// module jkff(input wire clk, input wire s, input wire r, output reg q=0,input wire clear); // warning not edge trigger always @(posedge clk, posedge clear) begin if (clear) q<=0; else begin case ({s,r}) 0: q<=q; 1: q<=1'b0; 2: q<=1'b1; 3: q<=~q; endcase end end endmodule
Go to most recent revision | Compare with Previous | Blame | View Log