URL
https://opencores.org/ocsvn/blue/blue/trunk
[/] [blue/] [trunk/] [blue8/] [jkff.v] - Blame information for rev 3
Go to most recent revision |
Details |
Compare with Previous |
View Log
| Line No. |
Rev |
Author |
Line |
| 1 |
2 |
wd5gnr |
/*
|
| 2 |
|
|
This file is part of Blue8.
|
| 3 |
|
|
|
| 4 |
|
|
Foobar is free software: you can redistribute it and/or modify
|
| 5 |
|
|
it under the terms of the GNU Lesser General Public License as published by
|
| 6 |
|
|
the Free Software Foundation, either version 3 of the License, or
|
| 7 |
|
|
(at your option) any later version.
|
| 8 |
|
|
|
| 9 |
|
|
Foobar is distributed in the hope that it will be useful,
|
| 10 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12 |
|
|
GNU Lesser General Public License for more details.
|
| 13 |
|
|
|
| 14 |
|
|
You should have received a copy of the GNU Lesser General Public License
|
| 15 |
|
|
along with Blue8. If not, see <http://www.gnu.org/licenses/>.
|
| 16 |
|
|
|
| 17 |
|
|
Blue8 by Al Williams alw@al-williams.com
|
| 18 |
|
|
*/
|
| 19 |
|
|
|
| 20 |
|
|
`timescale 1ns / 1ps
|
| 21 |
|
|
`default_nettype none
|
| 22 |
|
|
////////////////////////////////////////////////////////////////////////////////
|
| 23 |
|
|
// Company:
|
| 24 |
|
|
// Engineer:
|
| 25 |
|
|
//
|
| 26 |
|
|
// Create Date: 11:17:11 09/21/06
|
| 27 |
|
|
// Design Name:
|
| 28 |
|
|
// Module Name: jkff
|
| 29 |
|
|
// Project Name:
|
| 30 |
|
|
// Target Device:
|
| 31 |
|
|
// Tool versions:
|
| 32 |
|
|
// Description:
|
| 33 |
|
|
//
|
| 34 |
|
|
// Dependencies:
|
| 35 |
|
|
//
|
| 36 |
|
|
// Revision:
|
| 37 |
|
|
// Revision 0.01 - File Created
|
| 38 |
|
|
// Additional Comments:
|
| 39 |
|
|
//
|
| 40 |
|
|
////////////////////////////////////////////////////////////////////////////////
|
| 41 |
|
|
module jkff(input wire clk, input wire s, input wire r, output reg q=0,input wire clear); // warning not edge trigger
|
| 42 |
|
|
always @(posedge clk, posedge clear) begin
|
| 43 |
|
|
if (clear) q<=0;
|
| 44 |
|
|
else begin
|
| 45 |
|
|
case ({s,r})
|
| 46 |
|
|
0: q<=q;
|
| 47 |
|
|
1: q<=1'b0;
|
| 48 |
|
|
2: q<=1'b1;
|
| 49 |
|
|
3: q<=~q;
|
| 50 |
|
|
endcase
|
| 51 |
|
|
end
|
| 52 |
|
|
end
|
| 53 |
|
|
endmodule
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.