typeb.v

changeset 0
cd0b58aa6f83
child 26
73de224304c1
     1.1 diff -r 000000000000 -r cd0b58aa6f83 typeb.v
     1.2 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 +++ b/typeb.v	Sun Apr 04 20:40:03 2010 +0100
     1.4 @@ -0,0 +1,58 @@
     1.5 +// =============================================================================
     1.6 +//                           COPYRIGHT NOTICE
     1.7 +// Copyright 2006 (c) Lattice Semiconductor Corporation
     1.8 +// ALL RIGHTS RESERVED
     1.9 +// This confidential and proprietary software may be used only as authorised by
    1.10 +// a licensing agreement from Lattice Semiconductor Corporation.
    1.11 +// The entire notice above must be reproduced on all authorized copies and
    1.12 +// copies may only be made to the extent permitted by a licensing agreement from
    1.13 +// Lattice Semiconductor Corporation.
    1.14 +//
    1.15 +// Lattice Semiconductor Corporation        TEL : 1-800-Lattice (USA and Canada)
    1.16 +// 5555 NE Moore Court                            408-826-6000 (other locations)
    1.17 +// Hillsboro, OR 97124                     web  : http://www.latticesemi.com/
    1.18 +// U.S.A                                   email: techsupport@latticesemi.com
    1.19 +// =============================================================================/
    1.20 +//                         FILE DETAILS
    1.21 +// Project          : LatticeMico32
    1.22 +// File             : TYPEB.v
    1.23 +// Description:
    1.24 +//    This is one of the two types of cells that are used to create ER1/ER2
    1.25 +//    register bits.
    1.26 +// Dependencies     : None
    1.27 +// Version          : 6.1.17
    1.28 +//   Modified typeb module to remove redundant DATA_OUT port.
    1.29 +// Version          : 7.0SP2, 3.0
    1.30 +//                  : No Change
    1.31 +// Version          : 3.1
    1.32 +//                  : No Change
    1.33 +// =============================================================================
    1.34 +module TYPEB
    1.35 +   (
    1.36 +      input CLK,
    1.37 +      input RESET_N,
    1.38 +      input CLKEN,
    1.39 +      input TDI,
    1.40 +      output TDO,
    1.41 +      input DATA_IN,
    1.42 +      input CAPTURE_DR
    1.43 +   );
    1.44 +
    1.45 +   reg tdoInt;
    1.46 +
    1.47 +   always @ (negedge CLK or negedge RESET_N)
    1.48 +   begin
    1.49 +      if (RESET_N== 1'b0)
    1.50 +         tdoInt <= 1'b0;
    1.51 +      else if (CLK == 1'b0)
    1.52 +         if (CLKEN==1'b1)
    1.53 +            if (CAPTURE_DR==1'b0)
    1.54 +               tdoInt <= TDI;
    1.55 +            else
    1.56 +               tdoInt <= DATA_IN;
    1.57 +   end
    1.58 +
    1.59 +   assign TDO = tdoInt;
    1.60 +
    1.61 +endmodule
    1.62 +