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

Subversion Repositories rtftextcontroller

[/] [rtftextcontroller/] [trunk/] [rtl/] [verilog/] [VT163.v] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 robfinch
// (C) 2007  Robert T Finch
2
// All Rights Reserved.
3
//
4
// VT163 - 74LS163 counter
5
//
6
// Webpack 9.1i  xc3s1000-4ft256
7
// 4 slices / 8 LUTs / 324.675 MHz
8
 
9
module VT163(clk, clr_n, ent, enp, ld_n, d, q, rco);
10
        parameter WID=4;
11
        input clk;
12
        input clr_n;    // clear active low
13
        input ent;              // clock enable
14
        input enp;              // clock enable
15
        input ld_n;             // load active low
16
        input [WID:1] d;
17
        output [WID:1] q;
18
        reg [WID:1] q;
19
        output rco;
20
 
21
        assign rco = &{q[WID:1],ent};
22
 
23
        always @(posedge clk)
24
                begin
25
                        if (!clr_n)
26
                                q <= {WID{1'b0}};
27
                        else if (!ld_n)
28
                                q <= d;
29
                        else if (enp & ent)
30
                                q <= q + {{WID-1{1'b0}},1'b1};
31
                end
32
 
33
endmodule

powered by: WebSVN 2.1.0

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