//
// ON Semiconductor
//
// This electronic data contains confidential and proprietary information of 
// ON Semiconductor ("ON") and also may contain confidential and proprietary 
// information of one or more third parties from whom ON has received 
// sub-licensing rights (collectively "Confidential Information").  This 
// Confidential Information may only be distributed to any party outside of ON 
// by or with the express written permission of the ON Intellectual Property 
// Department. 
//
//*******************************************************************************
//
// Technology: ONBCD25 (5V flow only)
// Category: Jet City OTP (NBL)
// Class: Verilog
// Library: NA
// Revision:  Rev1.10
// Date: 20100609
// Owner: VDR    
//
// Original Creation Date : 20090421
// Specification Revision : LFMxONBCD25_SpecSheetRev1.8.xls
//
// Description of the release:(see below)
//
//********************************************************************************

`timescale 1ns/10ps
`celldefine
`suppress_faults
`enable_portfaults
//`define functional

`define lfm064size 64

module LFM064 (dout, memvalid, orout, clk, cursen0, cursen1, gnd, lat, prog, progbias, reset, sensez, serreaden, sftrst, sftset, vdd);

  output [63:0] dout;
  output orout, memvalid;
  input progbias, clk, reset, prog, cursen1, cursen0, lat, sftset, sftrst, sensez, serreaden, vdd, gnd;

  wire [`lfm064size-1:0] do_;
  wire orout_;
  reg [`lfm064size-1:0] dout_, dout_prev;
  reg [`lfm064size-1:0] core[0:0];
  reg [`lfm064size-1:0] fuseMem;
  reg [`lfm064size-1:0] fuseMem_prev;
  reg memvalid_ipd, orout_int;
  reg por_meminvalid, meminvalid;
  integer AddCounter, AddCounter_prev, i;

  reg prog_flag;
  reg notify_reset;
  reg notify_RESET_CLK_s;
  reg notify_RESET_CLK_h;
  reg notify_CLK_RESET_s;
  reg notify_CLK_RESET_h;
  reg notify_RESET_pPROG_s;
  reg notify_RESET_pPROG_h;
  reg notify_RESET_nPROG_s;
  reg notify_RESET_nPROG_h;
  reg notify_RESET_pSFTSET_s;
  reg notify_RESET_pSFTSET_h;
  reg notify_RESET_nSFTSET_s;
  reg notify_RESET_nSFTSET_h;
  reg notify_RESET_pSFTRST_s;
  reg notify_RESET_pSFTRST_h;
  reg notify_RESET_nSFTRST_s;
  reg notify_RESET_nSFTRST_h;
  reg notify_clk_l;
  reg notify_clk_h;
  reg notify_CLK_pPROG_s;
  reg notify_CLK_pPROG_h;
  reg notify_CLK_nPROG_s;
  reg notify_CLK_nPROG_h;
  reg notify_CLK_pSFTSET_s;
  reg notify_CLK_pSFTSET_h;
  reg notify_CLK_nSFTSET_s;
  reg notify_CLK_nSFTSET_h;
  reg notify_CLK_pSFTRST_s;
  reg notify_CLK_pSFTRST_h;
  reg notify_CLK_nSFTRST_s;
  reg notify_CLK_nSFTRST_h;
  reg notify_prog;
  reg notify_LAT_pCLK_s;
  reg notify_LAT_pCLK_h;
  reg notify_LAT_pRESET_s;
  reg notify_LAT_pRESET_h;
  reg notify_LAT_pSFTSET_s;
  reg notify_LAT_pSFTSET_h;
  reg notify_LAT_pSFTRST_s;
  reg notify_LAT_pSFTRST_h;
  reg notify_SENSEZ_pLAT_s;
  reg notify_SENSEZ_pLAT_h;
  reg notify_sftset;
  reg notify_sftrst;

  wire vddnotsensez;
  wire vddnotlat;
  wire vddserreaden;
  wire vddserreadennotsensez;
  wire vddserreadennotlat;

// set parameters for this block

  parameter memInitFile = "fuseMem.init";		// name of the fuse memory init file.

// Output buffers   
    buf u0[`lfm064size-1:0](dout,do_);
    buf u1 (memvalid, memvalid_ipd);
    buf u2 (orout, orout_);

    // Functional Checks: F1.7,F1.2
    assign orout_ = serreaden ? orout_int : (~serreaden ? 1'b1 : 1'bx);
   
    assign do_ = dout_;
// --------------------------------------------------------------------------
// Used buffers to avoid MIPD's Error
// --------------------------------------------------------------------------
   
    buf (progbias_ipd,progbias);
    buf (clk_ipd,clk);
    buf (reset_ipd,reset);
    buf (prog_ipd,prog);
    buf (cursen1_ipd,cursen1);
    buf (cursen0_ipd,cursen0);
    buf (lat_ipd,lat);
    buf (sftset_ipd,sftset);
    buf (sftrst_ipd,sftrst);
    buf (sensez_ipd,sensez);
    buf (serreaden_ipd,serreaden);
    buf (vdd_ipd,vdd);

	assign vddnotsensez = vdd_ipd & !sensez_ipd;
	assign vddnotlat = vdd_ipd & !lat_ipd;
  	assign vddserreaden = vdd_ipd & serreaden_ipd;
  	assign vddserreadennotsensez = vdd_ipd & serreaden_ipd & !sensez_ipd;
  	assign vddserreadennotlat = vdd_ipd & serreaden_ipd & !lat_ipd;
    
	`ifdef functional
	initial $display("\n *** ATTENTION! Functional Simulation, All Timing Disabled In Module %m -- SDF Will NOT Be Annotated, Ignore any SDF Errors *** \n\n");
`else
	`ifdef TETRAMAX
	`else
	specify

		specparam
			TDR_SFTSET_DO = 0,
			TDF_SFTSET_DO = 0,
			TDR_SFTRST_DO = 0,
			TDF_SFTRST_DO = 0,
			TDR_LAT_DO = 0,
			TDF_LAT_DO = 0,
			TDR_NSENSEZ_DO = 0,
			TDF_NSENSEZ_DO = 0,
			TDR_PSENSEZ_DO = 0,
			TDF_PSENSEZ_DO = 0,
			TDR_PROG_DO = 0,
			TDF_PROG_DO = 0,
			TDR_VDD_DO = 0,
			TDF_VDD_DO = 0,
			TDR_VDD_MEMVALID = 0,
			TDF_VDD_MEMVALID = 0,
			TDR_SERREADEN_OROUT = 0,
			TDF_SERREADEN_OROUT = 0,
			TDR_CLK_OROUT = 0,
			TDF_CLK_OROUT = 0,
			TDR_RESET_OROUT = 0,
			TDF_RESET_OROUT = 0,
			TDR_SFTSET_OROUT = 0,
			TDF_SFTSET_OROUT = 0,
			TDR_SFTRST_OROUT = 0,
			TDF_SFTRST_OROUT = 0,
			TDR_LAT_OROUT = 0,
			TDF_LAT_OROUT = 0,
			TDR_NSENSEZ_OROUT = 0,
			TDF_NSENSEZ_OROUT = 0,
			TDR_PSENSEZ_OROUT = 0,
			TDF_PSENSEZ_OROUT = 0,
			TDR_PROG_OROUT = 0,
			TDF_PROG_OROUT = 0,
			TDR_VDD_OROUT = 0,
			TDF_VDD_OROUT = 0,
			TWP_RESET = 0,
			TSU_RESET_CLK = 0,
			THD_CLK_RESET = 0,
			TSU_CLK_RESET = 0,
			THD_RESET_CLK = 0,
			TSU_RESET_PPROG = 0,
			THD_PPROG_RESET = 0,
			TSU_RESET_NPROG = 0,
			THD_NPROG_RESET = 0,
			TSU_RESET_PSFTSET = 0,
			THD_PSFTSET_RESET = 0,
			TSU_RESET_NSFTSET = 0,
			THD_NSFTSET_RESET = 0,
			TSU_RESET_PSFTRST = 0,
			THD_PSFTRST_RESET = 0,
			TSU_RESET_NSFTRST = 0,
			THD_NSFTRST_RESET = 0,
			TWPL_CLK = 0,
			TWPH_CLK = 0,
			TSU_CLK_PPROG = 0,
            THD_PPROG_CLK = 0,
            TSU_CLK_NPROG = 0,
            THD_NPROG_CLK = 0,
            TSU_CLK_PSFTSET = 0,
            THD_PSFTSET_CLK = 0,
            TSU_CLK_NSFTSET = 0,
            THD_NSFTSET_CLK = 0,
            TSU_CLK_PSFTRST = 0,
            THD_PSFTRST_CLK = 0,
            TSU_CLK_NSFTRST = 0,
			THD_NSFTRST_CLK = 0,
			TWP_PROG = 0,
			TSU_LAT_CLK = 0,
            THD_CLK_LAT = 0,
            TSU_LAT_RESET = 0,
            THD_RESET_LAT = 0,
            TSU_LAT_SFTSET = 0,
            THD_SFTSET_LAT = 0,
            TSU_LAT_SFTRST = 0,
            THD_SFTRST_LAT = 0,
            TSU_SENSEZ_LAT = 0,
            THD_LAT_SENSEZ = 0,
			TWP_SFTSET = 0,
			TWP_SFTRST = 0;

			// -----------------------------------------------------------------
			// Path delay construct in the design
			// -----------------------------------------------------------------
		if(vdd) (posedge sftset => (dout[0] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[1] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[2] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[3] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[4] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[5] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[6] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[7] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[8] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[9] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[10] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[11] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[12] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[13] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[14] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[15] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[16] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[17] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[18] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[19] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[20] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[21] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[22] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[23] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[24] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[25] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[26] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[27] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[28] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[29] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[30] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[31] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[32] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[33] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[34] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[35] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[36] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[37] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[38] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[39] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[40] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[41] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[42] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[43] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[44] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[45] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[46] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[47] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[48] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[49] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[50] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[51] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[52] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[53] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[54] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[55] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[56] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[57] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[58] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[59] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[60] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[61] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[62] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		if(vdd) (posedge sftset => (dout[63] : 1'bx)) = (TDR_SFTSET_DO, TDF_SFTSET_DO);
		
		if(vdd) (posedge sftrst => (dout[0] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[1] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[2] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[3] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[4] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[5] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[6] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[7] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[8] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[9] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[10] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[11] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[12] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[13] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[14] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[15] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[16] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[17] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[18] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[19] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[20] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[21] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[22] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[23] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[24] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[25] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[26] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[27] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[28] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[29] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[30] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[31] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[32] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[33] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[34] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[35] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[36] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[37] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[38] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[39] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[40] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[41] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[42] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[43] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[44] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[45] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[46] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[47] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[48] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[49] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[50] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[51] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[52] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[53] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[54] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[55] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[56] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[57] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[58] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[59] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[60] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[61] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[62] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		if(vdd) (posedge sftrst => (dout[63] : 1'bx)) = (TDR_SFTRST_DO, TDF_SFTRST_DO);
		
		if(vdd) (negedge lat => (dout[0] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[1] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[2] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[3] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[4] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[5] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[6] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[7] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[8] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[9] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[10] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[11] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[12] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[13] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[14] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[15] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[16] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[17] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[18] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[19] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[20] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[21] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[22] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[23] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[24] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[25] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[26] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[27] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[28] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[29] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[30] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[31] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[32] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[33] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[34] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[35] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[36] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[37] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[38] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[39] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[40] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[41] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[42] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[43] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[44] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[45] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[46] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[47] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[48] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[49] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[50] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[51] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[52] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[53] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[54] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[55] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[56] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[57] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[58] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[59] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[60] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[61] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[62] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		if(vdd) (negedge lat => (dout[63] : 1'bx)) = (TDR_LAT_DO, TDF_LAT_DO);
		
		if(vddnotlat) (negedge sensez => (dout[0] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[1] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[2] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[3] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[4] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[5] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[6] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[7] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[8] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[9] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[10] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[11] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[12] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[13] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[14] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[15] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[16] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[17] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[18] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[19] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[20] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[21] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[22] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[23] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[24] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[25] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[26] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[27] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[28] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[29] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[30] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[31] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[32]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[33]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[34]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[35]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[36]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[37]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[38]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[39]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[40]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[41]: 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[42] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[43] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[44] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[45] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[46] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[47] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[48] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[49] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[50] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[51] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[52] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[53] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[54] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[55] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[56] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[57] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[58] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[59] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[60] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[61] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[62] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);
		if(vddnotlat) (negedge sensez => (dout[63] : 1'bx)) = (TDR_NSENSEZ_DO, TDF_NSENSEZ_DO);

		if(vddnotlat) (posedge sensez => (dout[0] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[1] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[2] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[3] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[4] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[5] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[6] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[7] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[8] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[9] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[10] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[11] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[12] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[13] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[14] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[15] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[16] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[17] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[18] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[19] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[20] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[21] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[22] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[23] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[24] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[25] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[26] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[27] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[28] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[29] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[30] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[31] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[32]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[33]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[34]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[35]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[36]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[37]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[38]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[39]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[40]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[41]: 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[42] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[43] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[44] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[45] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[46] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[47] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[48] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[49] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[50] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[51] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[52] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[53] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[54] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[55] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[56] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[57] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[58] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[59] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[60] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[61] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[62] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);
		if(vddnotlat) (posedge sensez => (dout[63] : 1'bx)) = (TDR_PSENSEZ_DO, TDF_PSENSEZ_DO);

		if(vddnotsensez) (posedge prog => (dout[0] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[1] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[2] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[3] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[4] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[5] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[6] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[7] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[8] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[9] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[10] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[11] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[12] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[13] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[14] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[15] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[16] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[17] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[18] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[19] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[20] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[21] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[22] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[23] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[24] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[25] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[26] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[27] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[28] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[29] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[30] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[31] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[32]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[33]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[34]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[35]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[36]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[37]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[38]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[39]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[40]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[41]: 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[42] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[43] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[44] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[45] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[46] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[47] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[48] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[49] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[50] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[51] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[52] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[53] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[54] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[55] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[56] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[57] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[58] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[59] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[60] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[61] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[62] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);
		if(vddnotsensez) (posedge prog => (dout[63] : 1'bx)) = (TDR_PROG_DO, TDF_PROG_DO);

//		if(vddnotsensez) (posedge vdd => (dout[0] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[1] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[2] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[3] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[4] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[5] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[6] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[7] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[8] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[9] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[10] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[11] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[12] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[13] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[14] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[15] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[16] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[17] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[18] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[19] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[20] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[21] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[22] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[23] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[24] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[25] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[26] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[27] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[28] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[29] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[30] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		if(vddnotsensez) (posedge vdd => (dout[31] : 1'bx)) = (TDR_VDD_DO, TDF_VDD_DO);
//		
//		if(vddnotsensez) (posedge vdd => (memvalid : 1'bx)) = (TDR_VDD_MEMVALID, TDF_VDD_MEMVALID);
		
		if(vdd) (serreaden => (orout : 1'bx)) = (TDR_SERREADEN_OROUT, TDF_SERREADEN_OROUT);
		
		if(vddserreaden) (clk => (orout : 1'bx)) = (TDR_CLK_OROUT, TDF_CLK_OROUT);
		if(vddserreaden) (reset => (orout : 1'bx)) = (TDR_RESET_OROUT, TDF_RESET_OROUT);
		
		if(vddserreaden) (sftset => (orout : 1'bx)) = (TDR_SFTSET_OROUT, TDF_SFTSET_OROUT);
		
		if(vddserreaden) (sftrst => (orout : 1'bx)) = (TDR_SFTRST_OROUT, TDF_SFTRST_OROUT);
		
		if(vddserreaden) (negedge lat => (orout : 1'bx)) = (TDR_LAT_OROUT, TDF_LAT_OROUT);
		
		if(vddserreadennotlat) (negedge sensez => (orout : 1'bx)) = (TDR_NSENSEZ_OROUT, TDF_NSENSEZ_OROUT);
		
		if(vddserreadennotlat) (posedge sensez => (orout : 1'bx)) = (TDR_PSENSEZ_OROUT, TDF_PSENSEZ_OROUT);
		
		if(vddserreaden) (prog => (orout : 1'bx)) = (TDR_PROG_OROUT, TDF_PROG_OROUT);
		
//		if(vddserreaden) (posedge vdd => (orout : 1'bx)) = (TDR_VDD_OROUT, TDF_VDD_OROUT);
	
		// ---------------------------------------------------------------------
		// Timing checks construct in the design i.e setup/hold/width/period
		// --------------------------------------------------------------------
		$width(posedge reset &&& vdd, TWP_RESET, 0, notify_reset);

		$setup(negedge reset, posedge clk &&& vdd, TSU_RESET_CLK, notify_RESET_CLK_s);
		$hold(posedge clk &&& vdd, negedge reset, THD_CLK_RESET, notify_RESET_CLK_h);
		
		$setup(posedge clk, posedge reset &&& vdd, TSU_CLK_RESET, notify_CLK_RESET_s);
		$hold(posedge reset &&& vdd, posedge clk, THD_RESET_CLK, notify_CLK_RESET_h);
		
		$setup(posedge reset, posedge prog &&& vdd, TSU_RESET_PPROG, notify_RESET_pPROG_s);
		$hold(posedge prog &&& vdd, posedge reset, THD_PPROG_RESET, notify_RESET_pPROG_h);
		
		$setup(posedge reset, negedge prog &&& vdd, TSU_RESET_NPROG, notify_RESET_nPROG_s);
		$hold(negedge prog &&& vdd, posedge reset, THD_NPROG_RESET, notify_RESET_nPROG_h);
		
		$setup(posedge reset, posedge sftset &&& vdd, TSU_RESET_PSFTSET, notify_RESET_pSFTSET_s);
		$hold(posedge sftset &&& vdd, posedge reset, THD_PSFTSET_RESET, notify_RESET_pSFTSET_h);
		
		$setup(posedge reset, negedge sftset &&& vdd, TSU_RESET_NSFTSET, notify_RESET_nSFTSET_s);
		$hold(negedge sftset &&& vdd, posedge reset, THD_NSFTSET_RESET, notify_RESET_nSFTSET_h);
		
		$setup(posedge reset, posedge sftrst &&& vdd, TSU_RESET_PSFTRST, notify_RESET_pSFTRST_s);
		$hold(posedge sftrst &&& vdd, posedge reset, THD_PSFTRST_RESET, notify_RESET_pSFTRST_h);
		
		$setup(posedge reset, negedge sftrst &&& vdd, TSU_RESET_NSFTRST, notify_RESET_nSFTRST_s);
		$hold(negedge sftrst &&& vdd, posedge reset, THD_NSFTRST_RESET, notify_RESET_nSFTRST_h);
		
		$width(negedge clk &&& vdd, TWPL_CLK, 0, notify_clk_l);
		$width(posedge clk &&& vdd, TWPH_CLK, 0, notify_clk_h);
		
		$setup(posedge clk, posedge prog &&& vdd, TSU_CLK_PPROG, notify_CLK_pPROG_s);
		$hold(posedge prog &&& vdd, posedge clk, THD_PPROG_CLK, notify_CLK_pPROG_h);
		
		$setup(posedge clk, negedge prog &&& vdd, TSU_CLK_NPROG, notify_CLK_nPROG_s);
		$hold(negedge prog &&& vdd, posedge clk, THD_NPROG_CLK, notify_CLK_nPROG_h);
		
		$setup(posedge clk, posedge sftset &&& vdd, TSU_CLK_PSFTSET, notify_CLK_pSFTSET_s);
		$hold(posedge sftset &&& vdd, posedge clk, THD_PSFTSET_CLK, notify_CLK_pSFTSET_h);
		
		$setup(posedge clk, negedge sftset &&& vdd, TSU_CLK_NSFTSET, notify_CLK_nSFTSET_s);
		$hold(negedge sftset &&& vdd, posedge clk, THD_NSFTSET_CLK, notify_CLK_nSFTSET_h);
		
		$setup(posedge clk, posedge sftrst &&& vdd, TSU_CLK_PSFTRST, notify_CLK_pSFTRST_s);
		$hold(posedge sftrst &&& vdd, posedge clk, THD_PSFTRST_CLK, notify_CLK_pSFTRST_h);
		
		$setup(posedge clk, negedge sftrst &&& vdd, TSU_CLK_NSFTRST, notify_CLK_nSFTRST_s);
		$hold(negedge sftrst &&& vdd, posedge clk, THD_NSFTRST_CLK, notify_CLK_nSFTRST_h);
		
		$width(posedge prog &&& vdd, TWP_PROG, 0, notify_prog);
		
		$setup(posedge lat, posedge clk &&& vdd, TSU_LAT_CLK, notify_LAT_pCLK_s);
		$hold(posedge clk &&& vdd, posedge lat, THD_CLK_LAT, notify_LAT_pCLK_h);
		
		$setup(posedge lat, posedge reset &&& vdd, TSU_LAT_RESET, notify_LAT_pRESET_s);
		$hold(posedge reset &&& vdd, posedge lat, THD_RESET_LAT, notify_LAT_pRESET_h);

		$setup(posedge lat, posedge sftset &&& vdd, TSU_LAT_SFTSET, notify_LAT_pSFTSET_s);
		$hold(posedge sftset &&& vdd, posedge lat, THD_SFTSET_LAT, notify_LAT_pSFTSET_h);
		
		$setup(posedge lat, posedge sftrst &&& vdd, TSU_LAT_SFTRST, notify_LAT_pSFTRST_s);
		$hold(posedge sftrst &&& vdd, posedge lat, THD_SFTRST_LAT, notify_LAT_pSFTRST_h);
		
		$setup(posedge lat, posedge sensez &&& vdd, TSU_SENSEZ_LAT, notify_SENSEZ_pLAT_s);
		$hold(posedge sensez &&& vdd, posedge lat, THD_LAT_SENSEZ, notify_SENSEZ_pLAT_h);

		$width(posedge sftset &&& vdd, TWP_SFTSET, 0, notify_sftset);
		$width(posedge sftrst &&& vdd, TWP_SFTRST, 0, notify_sftrst);

	endspecify

	`endif

// Timing Checks Handling Strategy
//********************************

	always @ (notify_reset) begin
		$display("Timing Violation T1.2 : reset pulse high width less than specified at time %t. Address counter X'd", $realtime);
		AddCounter = 'bx;
        orout_int = 1'bx;
	end

	always @ (notify_RESET_CLK_s) begin
		$display("Timing Violation T4.2: Setup of negedge Reset wrt CLK at time %t. Address counter X'd", $realtime);
		AddCounter = 'bx;
        orout_int = 1'bx;
	end

	always @ (notify_RESET_CLK_h) begin
		$display("Timing Violation T5.2 : Hold of negedge Reset wrt CLK at time %t. Address counter X'd", $realtime);
		AddCounter = 'bx;
        orout_int = 1'bx;
	end

	always @ (notify_CLK_RESET_s) begin
		$display("Timing Violation T39.2: Setup of posedge clk wrt posedge reset at time %t. Address counter X'd", $realtime);
		AddCounter = 'bx;
        orout_int = 1'bx;
	end

	always @ (notify_CLK_RESET_h) begin
		$display("Timing Violation T40.2 : Hold of posedge clk wrt posedge reset at time %t. Address counter X'd", $realtime);
		AddCounter = 'bx;
        orout_int = 1'bx;
	end

	always @ (notify_RESET_pPROG_s) begin
		$display("Timing Violation T35.2: Setup of Reset wrt posedge PROG at time %t. Involved Bits X'd", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
            orout_int = dout_[AddCounter];
	end

	always @ (notify_RESET_pPROG_h) begin
		$display("Timing Violation: Hold of Reset wrt posedge PROG at time %t. Involved Bits X'd", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
            orout_int = dout_[AddCounter];
	end

	always @ (notify_RESET_nPROG_s) begin
		$display("Timing Violation: Setup of Reset wrt negedge PROG at time %t. Involved Bits X'd", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
            orout_int = dout_[AddCounter];
	end

	always @ (notify_RESET_nPROG_h) begin
		$display("Timing Violation T36.2: Hold of Reset wrt negedge PROG at time %t. Involved Bits X'd", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
            orout_int = dout_[AddCounter];
	end

	always @ (notify_RESET_pSFTSET_s) begin
		$display("Timing Violation T18.2: Setup of Reset wrt posedge sftset at time %t. Involved Bits X'd", $realtime);
		if (dout_prev[AddCounter_prev] !== 1'b1) begin
    	    dout_[AddCounter_prev] = 1'bx;
        end
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_RESET_pSFTSET_h) begin
		$display("Timing Violation T20.2: Hold of Reset wrt posedge sftset at time %t. Involved Bits X'd", $realtime);
		if (dout_prev[AddCounter_prev] !== 1'b1) begin
    	    dout_[AddCounter_prev] = 1'bx;
        end
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_RESET_nSFTSET_s) begin
		$display("Timing Violation T19.2: Setup of Reset wrt negedge sftset at time %t. Involved Bits X'd", $realtime);
		if (dout_prev[AddCounter_prev] !== 1'b1) begin
    	    dout_[AddCounter_prev] = 1'bx;
        end
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_RESET_nSFTSET_h) begin
		$display("Timing Violation T21.2: Hold of Reset wrt negedge sftset at time %t. Involved Bits X'd", $realtime);
		if (dout_prev[AddCounter_prev] !== 1'b1) begin
    	    dout_[AddCounter_prev] = 1'bx;
        end
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_RESET_pSFTRST_s) begin
		$display("Timing Violation T26.2: Setup of Reset wrt posedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_RESET_pSFTRST_h) begin
		$display("Timing Violation T28.2: Hold of Reset wrt posedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_RESET_nSFTRST_s) begin
		$display("Timing Violation T27.2: Setup of Reset wrt negedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_RESET_nSFTRST_h)
	begin
		$display("Timing Violation T29.2: Hold of Reset wrt negedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1)
		begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_clk_l)
	begin
		$display("Timing Violation T3.2: Width of CLK low pulse less than specified at time %t. Address counter X'd", $realtime);
		AddCounter = 'bx;
        orout_int = 1'bx;
	end

	always @ (notify_clk_h)
	begin
		$display("Timing Violation T2.2: Width of CLK high pulse less than specified at time %t. Address counter X'd", $realtime);
		AddCounter = 'bx;
        orout_int = 1'bx;
	end

	always @ (notify_CLK_pPROG_s) begin
		$display("Timing Violation T37.2: Setup of Clk wrt posedge prog at time %t", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_CLK_pPROG_h)
	begin
		$display("Timing Violation: Hold of Clk wrt posedge prog at time %t", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_CLK_nPROG_s)
	begin
		$display("Timing Violation: Setup of Clk wrt negedge prog at time %t", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_CLK_nPROG_h)
	begin
		$display("Timing Violation T38.2: Hold of Clk wrt negedge prog at time %t", $realtime);
		if (fuseMem_prev[AddCounter_prev] !== 1) begin
			fuseMem[AddCounter_prev] = 1'bx; 
		end
		if (fuseMem_prev[AddCounter] !== 1) begin
			fuseMem[AddCounter] = 1'bx; 
		end
		if (sensez_ipd == 0 && lat_ipd == 0) begin
    	    dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
    	    dout_[AddCounter] = fuseMem[AddCounter];
        end
		if (sensez_ipd == 0 && lat_ipd == 1) begin
    	    if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                dout_[AddCounter_prev] = 1'bx;
    	    if (dout_[AddCounter] !== fuseMem[AddCounter])
                dout_[AddCounter] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_CLK_pSFTSET_s)
	begin
		$display("Timing Violation T22.2: Setup of Clk wrt posedge sftset at time %t", $realtime);
		if (dout_prev[AddCounter_prev] !== 1'b1) begin
    	    dout_[AddCounter_prev] = 1'bx;
        end
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_CLK_pSFTSET_h)
	begin
		$display("Timing Violation T24.2: Hold of Clk wrt posedge sftset at time %t", $realtime);
		if (dout_prev[AddCounter_prev] !== 1'b1) begin
    	    dout_[AddCounter_prev] = 1'bx;
        end
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_CLK_nSFTSET_s)
	begin
		$display("Timing Violation T23.2: Setup of Clk wrt negedge sftset at time %t", $realtime);
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_CLK_nSFTSET_h)
	begin
		$display("Timing Violation T25.2: Hold of Clk wrt negedge sftset at time %t", $realtime);
		if (dout_prev[AddCounter] !== 1'b1) begin
    	    dout_[AddCounter] = 1'bx;
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
	end

	always @ (notify_CLK_pSFTRST_s)
	begin
		$display("Timing Violation T30.2: Setup of Clk wrt posedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_CLK_pSFTRST_h)
	begin
		$display("Timing Violation T64.2: Hold of Clk wrt posedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_CLK_nSFTRST_s)
	begin
		$display("Timing Violation T31.2: Setup of Clk wrt negedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_CLK_nSFTRST_h)
	begin
		$display("Timing Violation T33.2: Hold of Clk wrt negedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
		    orout_int = dout_[AddCounter];
	end

	always @ (notify_prog) begin
		$display("Timing Violation T34.2: Width of PROG high pulse less than specified at time %t", $realtime);
        if (!(AddCounter >= `lfm064size)) begin
		    if (fuseMem_prev[AddCounter] !== 1) begin
		    	fuseMem[AddCounter] = 1'bx; 
		    	if(!(lat_ipd === 1'b1 && sensez_ipd === 1'b1)) begin
	        	    dout_[AddCounter] = 1'bx;
    	            orout_int = 1'bx;
		    	end
		    end
		end
	end
	
	always @ (notify_LAT_pCLK_s) begin
		$display("Timing Violation T8.2: Setup of lat wrt posedge clk at time %t, orout X'd", $realtime);
        if (!(AddCounter >= `lfm064size))
	    	orout_int = 1'bx;
	end

	always @ (notify_LAT_pCLK_h) begin
		$display("Timing Violation T9.2: Hold of lat wrt posedge clk at time %t, orout X'd", $realtime);
        if (!(AddCounter >= `lfm064size))
	    	orout_int = 1'bx;
	end

	always @ (notify_LAT_pRESET_s) begin
		$display("Timing Violation T10.2 : Setup of lat wrt posedge reset at time %t, orout X'd", $realtime);
        if (!(AddCounter >= `lfm064size))
	    	orout_int = 1'bx;
	end

	always @ (notify_LAT_pRESET_h) begin
		$display("Timing Violation T11.2 : Hold of lat wrt posedge reset at time %t, orout X'd", $realtime);
        if (!(AddCounter >= `lfm064size))
	    	orout_int = 1'bx;
	end

	always @ (notify_LAT_pSFTSET_s) begin
		$display("Timing Violation T15.2: Setup of lat wrt posedge sftset at time %t", $realtime);
        if (!(AddCounter >= `lfm064size)) begin
		    if(dout_prev[AddCounter] !== 1'b1) begin
                dout_[AddCounter] = 1'bx;
                orout_int = 1'bx;
		    end
		end
	end

	always @ (notify_LAT_pSFTSET_h) begin
		$display("Timing Violation T16.2: Hold of lat wrt posedge sftset at time %t", $realtime);
        if (!(AddCounter >= `lfm064size)) begin
		    if(dout_prev[AddCounter] !== 1'b1) begin
                dout_[AddCounter] = 1'bx;
                orout_int = 1'bx;
		    end
		end
	end

	always @ (notify_LAT_pSFTRST_s) begin
		$display("Timing Violation T14.2: Setup of lat wrt posedge sftrst at time %t, Outputs X'd", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
	    	orout_int = dout_[AddCounter];
	end

	always @ (notify_LAT_pSFTRST_h)
	begin
		$display("Timing Violation T17.2: Hold of lat wrt posedge sftrst at time %t", $realtime);
		for (i = 0; i < `lfm064size; i = i + 1) begin
        	if (dout_prev[i] !== 0)
            	dout_[i] = 1'bx;
        end
        if (!(AddCounter >= `lfm064size))
	    	orout_int = dout_[AddCounter];
	end

	always @ (notify_SENSEZ_pLAT_s)
	begin
		$display("Timing Violation T6.0: Setup of sensez wrt posedge lat at time %t", $realtime);
	end

	always @ (notify_SENSEZ_pLAT_h)
	begin
		$display("Timing Violation T7.0: Hold of sensez wrt posedge lat at time %t", $realtime);
	end

	always @ (notify_sftset) begin
		$display("Timing Violation T12.2 : Width of sftset pulse less than specified at time %t, Output bit X'd", $realtime);
        if (!(AddCounter >= `lfm064size)) begin
		    if(dout_prev[AddCounter] !== 1'b1) begin
                dout_[AddCounter] = 1'bx;
                orout_int = 1'bx;
		    end
		end
	end

	always @ (notify_sftrst) begin
		$display("Timing Violation T13.2 : Width of sftrst high pulse less than specified at time %t", $realtime);
        if (!(AddCounter >= `lfm064size)) begin
		    for (i = 0; i < `lfm064size; i = i + 1) begin
            	if (dout_prev[i] !== 0)
                	dout_[i] = 1'bx;
            end
        end
		orout_int = dout_[AddCounter];
	end

`endif

    // Logic for memvalid signal
    and ( meminvalid_int, meminvalid, ~lat ); 		// catches the case where lat goes low during a memvalid = 0 condition.
    nor ( memvalid_int, por_meminvalid, meminvalid_int ); // combine with POR case to create internal memvalid

  initial
    begin
        AddCounter = 'bx;
        AddCounter_prev = 'bx;
        meminvalid = 1'b0; 				// this signal is used to generate memvalid in non powerup situations.
    end

   // --------------------------------------------------------------------------
   // Preloading the Memory
   // --------------------------------------------------------------------------
  
    initial 
    begin
//         if ($test$plusargs("rom_preload")) begin
//             $readmemh(memInitFile, core);
//             $display("NOTE:  ROM Preload Enabled");
//             fuseMem = core[0];
//             fuseMem_prev = core[0];
//         end
//         else begin
//             $display("NOTE:  ROM Initialized to All Zeroes");
//             fuseMem = {`lfm064size{1'b0}};
//             fuseMem_prev = {`lfm064size{1'b0}};
//         end
        `ifdef rom_preload
            $readmemh(memInitFile, core);
            $display("NOTE:  ROM Preload Enabled");
            fuseMem = core[0];
            fuseMem_prev = core[0];
        `else
            $display("NOTE:  ROM Initialized to All Zeroes");
            fuseMem = {`lfm064size{1'b0}};
            fuseMem_prev = {`lfm064size{1'b0}};
        `endif
    end

    // Memvalid handling strategy
    always @ ( sftrst_ipd or lat_ipd or sensez_ipd or memvalid_int ) begin
        if( sftrst & sensez )
            memvalid_ipd = 1'b0;
        else if(( ~lat & ~sensez ) || por_meminvalid ) 	// memvalid can only update if lat and sensez both low
            memvalid_ipd = memvalid_int;                     	// note: this assumes memvalid latch powerup will reliably be zero
    end

    always @(vdd_ipd) begin
    //Signal Condition Checks: S8.0 to S8.5
        if ((vdd_ipd !== 0) && (vdd_ipd !== 1)) begin
            por_meminvalid = 1'b1;
            dout_ = {`lfm064size{1'bx}};
            orout_int = 1'bx;
            if (prog_ipd == 1) begin
                $display("Signal Condition Check(S8.3, S8.4, S8.5): vdd goes X during program. Address bit %d is corrupted if not already programmed at %0t in %m", AddCounter, $realtime);
                if (!(AddCounter >= `lfm064size))
                    if (fuseMem_prev[AddCounter] !== 1)
                        fuseMem[AddCounter] = 1'bx;
            end
            else begin
                $display("Signal Condition Check(S8.0, S8.1, S8.2): vdd goes X at %0t in %m", $realtime);
            end
        end
    end

    always @(por_meminvalid or lat_ipd or sensez_ipd or sftset_ipd or sftrst_ipd) begin
        if ((por_meminvalid == 0) && (sensez_ipd == 1) && (lat_ipd == 0)) begin
            $display("Functional Check: SenseAmp OFF and Latch OFF; DO goes X at %0t in %m", $realtime);
            dout_ = {`lfm064size{1'bx}};
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
    // Functional Checks: F1.0, F1.1, F3.11, F4.11
        else if ((por_meminvalid == 0) && (sensez_ipd == 0) && (lat_ipd == 0)) begin
            if ((sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                $display ("Functional Check: Read with SenseAmp ON, Latch OFF im module %m at time %t", $realtime);
                dout_ = fuseMem;
                if (!(AddCounter >= `lfm064size))
                    orout_int = fuseMem[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                $display ("Functional Check: SenseAmp ON, Latch OFF during SFTSET im module %m at time %t", $realtime);
                dout_prev = dout_;
                dout_ = fuseMem;
                if (!(AddCounter >= `lfm064size)) begin
                    if (dout_[AddCounter] !== 1'b1)
                        dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if ((sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                $display ("Functional Check: SenseAmp ON, Latch OFF during SFTRST im module %m at time %t", $realtime);
                dout_prev = dout_;
                dout_ = fuseMem;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (dout_[i] !== 1'b0)
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 1)) begin
                $display ("Functional Check: SenseAmp ON, Latch OFF during SFTSET=1 & SFTRST=1 im module %m at time %t", $realtime);
                dout_prev = dout_;
                dout_ = fuseMem;
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (dout_[i] !== 1'b0)
                        dout_[i] = 1'bx;
                end
            end
        end
        else if ((por_meminvalid == 0) && (sensez_ipd == 0) && (lat_ipd == 1)) begin
            if ((sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                $display ("Functional Check: Read with SenseAmp ON, Latch ON im module %m at time %t", $realtime);
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem[i] !== dout_[i])
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                $display ("Functional Check: SenseAmp ON, Latch ON during SFTSET im module %m at time %t", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem[i] !== dout_[i])
                        dout_[i] = 1'bx;
                    if (i == AddCounter && fuseMem[i] == 1'b1)
                        dout_[i] = 1'b1;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    if (dout_[AddCounter] !== 1'b1)
                        dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if ((sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                $display ("Functional Check: SenseAmp ON, Latch ON during SFTRST im module %m at time %t", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 1)) begin
                $display ("Functional Check: SenseAmp ON, Latch ON during SFTSET=1 & SFTRST=1 im module %m at time %t", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
        end
        else if ((por_meminvalid == 0) && (sensez_ipd == 1) && (lat_ipd == 1)) begin
            if ((sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                $display ("Functional Check: SenseAmp OFF, Latch ON during SFTSET im module %m at time %t", $realtime);
                dout_prev = dout_;
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'b1;
                    orout_int = dout_[AddCounter];
                end
            end
            else if ((sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                $display ("Functional Check: SenseAmp OFF, Latch ON during SFTRST im module %m at time %t", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    dout_[i] = 1'b0;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 1)) begin
                $display ("Functional Check: SenseAmp OFF, Latch ON during SFTSET=1 & SFTRST=1 im module %m at time %t", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    dout_[i] = 1'b0;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
        end
    end

    always @(por_meminvalid or lat_ipd or sensez_ipd or sftset_ipd or sftrst_ipd) begin
    //Signal Condition Checks: S5.1, S5.3, S5.5, S5.7, S5.9, S5.11
        if ((por_meminvalid == 0) && (sensez_ipd == 1) && (lat_ipd !== 0) && (lat_ipd !== 1)) begin
            $display("Signal Condition Check: SenseAmp OFF and Latch=X; DO goes X at %0t in %m", $realtime);
            dout_ = {`lfm064size{1'bx}};
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
    //Signal Condition Checks: 
        else if ((por_meminvalid == 0) && (sensez_ipd == 0) && (lat_ipd !== 0) && (lat_ipd !== 1) && (clk_ipd == 0 || clk_ipd == 1) && (reset_ipd == 0 || reset_ipd == 1)) begin
            if ((sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X at %0t in %m", $realtime);
                //Interra: This for loop is redundant
                //for (i = 0; i < `lfm064size; i = i + 1) begin
                //    if (fuseMem[i] !== dout_[i])
                //        dout_[i] = 1'bx;
                //end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X during SFTSET at %0t in %m", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem[i] !== dout_[i])
                        dout_[i] = 1'bx;
                    if (i == AddCounter && fuseMem[i] == 1'b1)
                        dout_[i] = 1'b1;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    if (dout_[AddCounter] !== 1'b1)
                        dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if ((sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X during SFTRST at %0t in %m", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 1)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X during SFTSET=1 & SFTRST=1 at %0t in %m", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
        end
    //Signal Condition Checks: S4.0 to S4.11
        else if ((por_meminvalid == 0) && (sensez_ipd !== 0) && (sensez_ipd !== 1)) begin
            $display("Signal Condition Check(S4): SenseAmp=X; DO goes X at %0t in %m", $realtime);
            dout_ = {`lfm064size{1'bx}};
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
        else if ((por_meminvalid == 0) && (sftset_ipd !== 0) && (sftset_ipd !== 1) && (sftrst_ipd == 0) && (clk_ipd == 0 || clk_ipd == 1) && (reset_ipd == 0 || reset_ipd == 1)) begin
            $display("Signal Condition Check: SFTSET=X with SFTRST=0 at %0t in %m", $realtime);
            if (sensez_ipd == 0 && lat_ipd == 0) begin
                dout_ = fuseMem;
                if (!(AddCounter >= `lfm064size)) begin
                    if (dout_[AddCounter] !== 1'b1)
                        dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if (sensez_ipd == 0 && lat_ipd == 1) begin
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem[i] !== dout_[i])
                        dout_[i] = 1'bx;
                    if (i == AddCounter && fuseMem[i] == 1'b0)
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    if (dout_[AddCounter] !== 1'b1)
                        dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if (sensez_ipd == 1 && lat_ipd == 1) begin
                if (!(AddCounter >= `lfm064size)) begin
                    if (dout_[AddCounter] !== 1'b1)
                        dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
        end
        else if ((por_meminvalid == 0) && (sftset_ipd !== 0) && (sftset_ipd !== 1) && (sftrst_ipd == 1) && (clk_ipd == 0 || clk_ipd == 1) && (reset_ipd == 0 || reset_ipd == 1)) begin
            $display("Signal Condition Check: SFTSET=X with SFTRST=1 at %0t in %m", $realtime);
            if (sensez_ipd == 0 && lat_ipd == 0) begin
                dout_ = fuseMem;
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (dout_[i] !== 1'b0)
                        dout_[i] = 1'bx;
                end
            end
            else if (sensez_ipd == 0 && lat_ipd == 1) begin
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
            else if (sensez_ipd == 1 && lat_ipd == 1) begin
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    dout_[i] = 1'b0;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
        end
        else if ((por_meminvalid == 0) && (sftrst_ipd !== 0) && (sftrst_ipd !== 1) && (sftset_ipd == 0) && (clk_ipd == 0 || clk_ipd == 1) && (reset_ipd == 0 || reset_ipd == 1)) begin
            $display("Signal Condition Check: SFTRST=X with SFTSET=0 at %0t in %m", $realtime);
            if (sensez_ipd == 0 && lat_ipd == 0) begin
                dout_ = fuseMem;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (dout_[i] !== 1'b0)
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if (sensez_ipd == 0 && lat_ipd == 1) begin
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if (sensez_ipd == 1 && lat_ipd == 1) begin
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (dout_[i] !== 1'b0)
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
        end
        else if ((por_meminvalid == 0) && (sftrst_ipd !== 0) && (sftrst_ipd !== 1) && (sftset_ipd == 1) && (clk_ipd == 0 || clk_ipd == 1) && (reset_ipd == 0 || reset_ipd == 1)) begin
            $display("Signal Condition Check: SFTRST=X with SFTSET=1 at %0t in %m", $realtime);
            if (sensez_ipd == 0 && lat_ipd == 0) begin
                dout_ = fuseMem;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (dout_[i] !== 1'b0)
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if (sensez_ipd == 0 && lat_ipd == 1) begin
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if (sensez_ipd == 1 && lat_ipd == 1) begin
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (dout_[i] !== 1'b0)
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
        end
    end

    always @(negedge vdd_ipd) begin
    // Functional Checks: F1.25, F3.15, F4.15
        if (vdd_ipd == 0) begin
            por_meminvalid = 1'b1;
            dout_ = {`lfm064size{1'bx}};
            orout_int = 1'bx;
            if (prog_ipd == 1) begin
    // Functional Checks: F2.17
                $display("Functional Violation: VDD goes low during program mode. Address bit %d may be corrupted at %0t in %m", AddCounter, $realtime);
                if (fuseMem_prev[AddCounter] !== 1)
            	    fuseMem[AddCounter] = 1'bx;
	        end
        end
    end

    always @(posedge clk_ipd) begin
		if (clk_ipd == 1 && vdd_ipd == 1) begin
            AddCounter_prev = AddCounter;
            if (AddCounter < 255)
                AddCounter = AddCounter + 1;
            else if (AddCounter == 255)
                AddCounter = 0;

    // Functional Checks: F5.0, F5.1
            if (AddCounter >= `lfm064size) begin
                $display("Functional Warning: Address out of bounds. Any Program mode will fail. RESET the memory for valid operation at %0t in %m", $realtime);
                orout_int = 1'b0;
            end
            else if (reset_ipd == 1) begin
                $display("Functional Violation: Posedge CLK during reset=1; Address counter goes X at %0t in %m", $realtime);
                AddCounter = 'bx;
                orout_int = 1'bx;
                if (prog_ipd == 1) begin
                    $display("Functional Violation: Posedge of CLK during program mode with reset=1. All unblown fuses will be corrupted at %0t in %m", $realtime);
                    for (i = 0; i < `lfm064size; i = i + 1) begin
                        if (fuseMem[i] !== 1'b1) begin
                            fuseMem[i] = 1'bx;
                            if (sensez_ipd == 0)
                                dout_[i] = 1'bx;
                        end
                    end
                end
                else if (prog_ipd !== 0) begin
                    $display("Signal Condition Violation: Posedge of CLK during program=X with reset=1. All unblown fuses will be corrupted at %0t in %m", $realtime);
                    for (i = 0; i < `lfm064size; i = i + 1) begin
                        if (fuseMem[i] !== 1'b1) begin
                            fuseMem[i] = 1'bx;
                            if (sensez_ipd == 0)
                                dout_[i] = 1'bx;
                        end
                    end
                end
            end
    // Functional Checks: F1.3,F1.9,F1.15,F1.20
            else if ((prog_ipd == 0) && (reset_ipd == 0) && (sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                orout_int = dout_[AddCounter];
                $display("Functional Check: Posedge CLK during read at %0t in %m", $realtime);
            end
    // Functional Checks: F3.12
            else if ((prog_ipd == 0) && (reset_ipd == 0) && (sftset_ipd !== 0) && (sftrst_ipd == 0)) begin
                if (sftset_ipd == 1)
                    $display("Functional Violation: Posedge CLK during sftset mode at %0t in %m", $realtime);
                else
                    $display("Signal Condition Violation: Posedge CLK during sftset=X at %0t in %m", $realtime);
                if (dout_[AddCounter] !== 1'b1) begin
                    dout_[AddCounter] = 1'bx;
                end
                orout_int = dout_[AddCounter];
            end
    // Functional Checks: F4.12
            else if ((prog_ipd == 0) && (reset_ipd == 0) && (sftset_ipd == 0) && (sftrst_ipd !== 0)) begin
                if (sftrst_ipd == 1)
                    $display("Functional Check: Posedge CLK during sftrst mode at %0t in %m", $realtime);
                else
                    $display("Signal Condition Check: Posedge CLK during sftrst=X at %0t in %m", $realtime);
                orout_int = dout_[AddCounter];
            end
            else if ((prog_ipd == 0) && (reset_ipd == 0) && (sftset_ipd !== 0) && (sftrst_ipd == 1)) begin
                if (sftset_ipd == 1)
                    $display("Functional Violation: Posedge CLK during sftrst=1 & sftset=1 at %0t in %m", $realtime);
                else
                    $display("Signal Condition Violation: Posedge CLK during sftrst=1 & sftset=X at %0t in %m", $realtime);
                dout_[AddCounter] = 1'bx;
                orout_int = 1'bx;
            end
    // Functional Checks: F2.11
            else if ((prog_ipd !== 0) && (reset_ipd == 0)) begin
                if (prog_ipd == 1)
                    $display("Functional Violation: Posedge of CLK during program mode. Involved address bits %d, %d are corrupted if unblown at %0t in %m", AddCounter_prev, AddCounter, $realtime);
                else
                    $display("Signal Condition Violation: Posedge of CLK during program=X. Involved address bits %d, %d are corrupted if unblown at %0t in %m", AddCounter_prev, AddCounter, $realtime);

                if (fuseMem_prev[AddCounter] !== 1)
                    fuseMem[AddCounter] = 1'bx;
                if (fuseMem_prev[AddCounter_prev] !== 1)
                    fuseMem[AddCounter_prev] = 1'bx;
                if ((sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                    if (sensez_ipd == 0 && lat_ipd == 0) begin
                        dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
                        dout_[AddCounter] = fuseMem[AddCounter];
                    end
                    else if (sensez_ipd == 0 && lat_ipd == 1) begin
                        if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                            dout_[AddCounter_prev] = 1'bx;
                        if (dout_[AddCounter] !== fuseMem[AddCounter])
                            dout_[AddCounter] = 1'bx;
                        //dout_[AddCounter_prev] =  fuseMem[AddCounter_prev];
                        //dout_[AddCounter] =  fuseMem[AddCounter];
                    end
                end
                else if ((sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                    if (sensez_ipd == 0 && lat_ipd == 0) begin
                        dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
                        dout_[AddCounter] = fuseMem[AddCounter];
                    end
                    else if (sensez_ipd == 0 && lat_ipd == 1) begin
                        if ((dout_[AddCounter_prev] !== fuseMem[AddCounter_prev]) || (dout_[AddCounter_prev] !== 1'b1))
                            dout_[AddCounter_prev] = 1'bx;
                        if ((dout_[AddCounter] !== fuseMem[AddCounter]) || (dout_[AddCounter] !== 1'b1))
                            dout_[AddCounter] = 1'bx;
                    end
                    else if (sensez_ipd == 1 && lat_ipd == 1) begin
                        //Interra: Commented the if statement as this dout bit is always high due to sftset mode
                        //if (dout_[AddCounter_prev] !== 1'b1)
                        //    dout_[AddCounter_prev] = 1'bx;
                        if (dout_[AddCounter] !== 1'b1)
                            dout_[AddCounter] = 1'bx;
                    end
                end
                else if ((sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                    if (sensez_ipd == 0) begin
                        dout_[AddCounter] = 1'bx;
                    end
                end
                else if ((sftset_ipd == 1) && (sftrst_ipd == 1)) begin
                    dout_[AddCounter] = 1'bx;
                end
                orout_int = dout_[AddCounter];
            end
        end
    end

    always @(clk_ipd) begin
		if ((clk_ipd !== 1) && (clk_ipd !== 0)) begin
			AddCounter = 'bx;
			orout_int = 1'bx;
            if (prog_ipd == 1) begin
                $display("Signal Condition Check: Clk goes X during program mode at %0t in %m", $realtime);
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem_prev[i] !== 1'b1) begin
                        fuseMem[i] = 1'bx;
                        if (sensez_ipd == 0)
                            dout_[i] = 1'bx;
                    end
                end
            end
            else begin
                $display("Signal Condition Check: Clk goes X at %0t in %m", $realtime);
            end
            if (sftset_ipd == 1 && sftrst_ipd == 0) begin
                for (i = 0; i < `lfm064size; i = i + 1)
                    if (dout_[i] !== 1'b1)
                        dout_[i] = 1'bx;
            end
            else if (sftset_ipd == 1 && sftrst_ipd == 1) begin
                dout_ = `lfm064size'bx;
            end
		end
    end

    always @(posedge reset_ipd) begin
		if (reset_ipd == 1 && vdd_ipd == 1) begin
            if  ((clk_ipd == 0) || (clk_ipd == 1)) begin
                AddCounter_prev = AddCounter;
                AddCounter = 0;
            end
    // Functional Checks: F1.5,F1.11,F1.17,F1.22
            if ((prog_ipd == 0) && (sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                orout_int = dout_[AddCounter];
                $display("Functional Check: Posedge reset during read at %0t in %m", $realtime);
            end
    // Functional Checks: F3.14
            else if ((prog_ipd == 0) && (sftset_ipd !== 0) && (sftrst_ipd == 0)) begin
                if (sftset_ipd == 1)
                    $display("Functional Violation: Posedge reset during sftset mode at %0t in %m", $realtime);
                else
                    $display("Signal Condition Violation: Posedge reset during sftset=X at %0t in %m", $realtime);
                if (dout_[AddCounter] !== 1'b1) begin
                    dout_[AddCounter] = 1'bx;
                end
                orout_int = dout_[AddCounter];
            end
    // Functional Checks: F4.14
            else if ((prog_ipd == 0) && (sftset_ipd == 0) && (sftrst_ipd !== 0)) begin
                if (sftrst_ipd == 1)
                    $display("Functional Check: Posedge reset during sftrst mode at %0t in %m", $realtime);
                else
                    $display("Signal Condition Check: Posedge reset during sftrst=X at %0t in %m", $realtime);
                orout_int = dout_[AddCounter];
            end
            else if ((prog_ipd == 0) && (sftset_ipd !== 0) && (sftrst_ipd == 1)) begin
                if (sftset_ipd == 1)
                    $display("Functional Violation: Posedge reset during sftrst=1 & sftset=1 at %0t in %m", $realtime);
                else
                    $display("Signal Condition Violation: Posedge reset during sftrst=1 & sftset=X at %0t in %m", $realtime);
                dout_[AddCounter] = 1'bx;
                orout_int = 1'bx;
            end
    // Functional Checks: F2.14
            else if (prog_ipd !== 0) begin
                if (prog_ipd == 1)
                    $display("Functional Violation: Posedge of reset during program mode. Involved address bits %d, %d are corrupted at %0t in %m", AddCounter_prev, AddCounter, $realtime);
                else
                    $display("Signal Condition Violation: Posedge of reset during program=X. Involved address bits %d, %d are corrupted at %0t in %m", AddCounter_prev, AddCounter, $realtime);
                if (fuseMem_prev[AddCounter] !== 1)
                    fuseMem[AddCounter] = 1'bx;
                if ((AddCounter_prev < `lfm064size) && (fuseMem_prev[AddCounter_prev] !== 1))
                    fuseMem[AddCounter_prev] = 1'bx;
                if ((sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                    if (sensez_ipd == 0 && lat_ipd == 0) begin
                        dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
                        dout_[AddCounter] = fuseMem[AddCounter];
                    end
                    else if (sensez_ipd == 0 && lat_ipd == 1) begin
                        if (dout_[AddCounter_prev] !== fuseMem[AddCounter_prev])
                            dout_[AddCounter_prev] = 1'bx;
                        if (dout_[AddCounter] !== fuseMem[AddCounter])
                            dout_[AddCounter] = 1'bx;
                    end
                end
                else if ((sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                    if (sensez_ipd == 0 && lat_ipd == 0) begin
                        dout_[AddCounter_prev] = fuseMem[AddCounter_prev];
                        dout_[AddCounter] = fuseMem[AddCounter];
                    end
                    else if (sensez_ipd == 0 && lat_ipd == 1) begin
                        if ((dout_[AddCounter_prev] !== fuseMem[AddCounter_prev]) || (dout_[AddCounter_prev] !== 1'b1))
                            dout_[AddCounter_prev] = 1'bx;
                        if ((dout_[AddCounter] !== fuseMem[AddCounter]) || (dout_[AddCounter] !== 1'b1))
                            dout_[AddCounter] = 1'bx;
                    end
                    else if (sensez_ipd == 1 && lat_ipd == 1) begin
                        //if (dout_[AddCounter_prev] !== 1'b1)
                        //    dout_[AddCounter_prev] = 1'bx;
                        if (dout_[AddCounter] !== 1'b1)
                            dout_[AddCounter] = 1'bx;
                    end
                end
                else if ((sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                    if (sensez_ipd == 0) begin
                        dout_[AddCounter] = 1'bx;
                    end
                end
                else if ((sftset_ipd == 1) && (sftrst_ipd == 1)) begin
                    dout_[AddCounter] = 1'bx;
                end
                orout_int = dout_[AddCounter];
            end
        end
    end

    always @(reset_ipd) begin
		if ((reset_ipd !== 1) && (reset_ipd !== 0)) begin
			AddCounter = 'bx;
			orout_int = 1'bx;
            if (prog_ipd == 1) begin
                $display("Signal Condition Check: reset goes X during program mode at %0t in %m", $realtime);
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem_prev[i] !== 1'b1) begin
                        fuseMem[i] = 1'bx;
                        if (sensez_ipd == 0)
                            dout_[i] = 1'bx;
                    end
                end
            end
            else begin
                $display("Signal Condition Check: reset goes X at %0t in %m", $realtime);
            end
            if (sftset_ipd == 1 && sftrst_ipd == 0) begin
                for (i = 0; i < `lfm064size; i = i + 1)
                    if (dout_[i] !== 1'b1)
                        dout_[i] = 1'bx;
            end
            else if (sftset_ipd == 1 && sftrst_ipd == 1) begin
                dout_ = `lfm064size'bx;
            end
		end
	end

    always @(posedge prog_ipd) begin
        if (por_meminvalid == 0 && prog_ipd == 1 && AddCounter < `lfm064size) begin
            fuseMem_prev = fuseMem;
            dout_prev = dout_;
            if ((fuseMem[AddCounter] == 0) || (fuseMem[AddCounter] == 1)) begin
                fuseMem[AddCounter] = 1'b1;
                $display("Functional Check: Programming fuse %d at %0t in %m", AddCounter, $realtime);
            end
    // Functional Checks: F2.12
            else begin
                $display("Functional Violation: Programming a corrupted fuse %d. PROG mode fails at %0t in %m", AddCounter, $realtime);
            end
        end
    // Functional Checks: F5.1
        if ((AddCounter >= `lfm064size) && (prog_ipd == 1) && (por_meminvalid == 0)) begin
            $display("Functional Violation: Add out of bounds, PROG failed, Fuse not corrupted at %0t in %m", $realtime);
            orout_int = 1'b0;
        end
        else if ((prog_ipd == 1) && (por_meminvalid == 0) && (^AddCounter === 1'bx)) begin
            $display("Signal Condition Violation: prog is high during AddCounter=X. All Fuses may be corrupted at %0t in %m", $realtime);
            for (i = 0; i < `lfm064size; i = i + 1) begin
                if (fuseMem[i] !== 1'b1) begin
                    fuseMem[i] = 1'bx;
                    if (sensez_ipd == 0)
                        dout_[i] = 1'bx;
                end
            end
        end
        else if ((prog_ipd == 1) && (vdd_ipd !== 0) && (vdd_ipd !== 1)) begin
            fuseMem_prev = fuseMem;
            dout_prev = dout_;
            $display("Signal Condition Violation: prog goes high during VDD=X. Address bit %d may be corrupted at %0t in %m", AddCounter, $realtime);
            if (fuseMem[AddCounter] !== 1)
                fuseMem[AddCounter] = 1'bx;
        end
        else if ((por_meminvalid == 0) && (prog_ipd == 1) && ((sensez_ipd == 0) || (sensez_ipd == 1)) && ((lat_ipd == 0) || (lat_ipd == 1)) && (sftset_ipd == 0) && (sftrst_ipd == 0)) begin
    // Functional Checks: F2.1, F2.2,F2.3
            if ((sensez_ipd == 0) && (lat_ipd == 0)) begin
                $display("Functional Check: During Program mode sense amp enabled and latch disabled at %0t in %m", $realtime);
                dout_ = fuseMem;
                orout_int = fuseMem[AddCounter];
            end
    // Functional Checks: F2.7, F2.6
            else if  ((sensez_ipd == 0) && (lat_ipd == 1)) begin
                $display("Functional Check: During Program mode sense amp and latch enabled at %0t in %m", $realtime);
                if (dout_[AddCounter] !== 1'b1) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
        end
    // Functional Checks: F3.22,F3.23,F3.24,F3.25
        else if ((por_meminvalid == 0) && (prog_ipd == 1) && ((sensez_ipd == 0) || (sensez_ipd == 1)) && ((lat_ipd == 0) || (lat_ipd == 1)) && (sftset_ipd !== 0) && (sftrst_ipd == 0)) begin
            if ((sensez_ipd == 0)) begin
                if (sftset_ipd == 1)
                    $display("Functional Check: Program mode starts with sense amp enabled and sftset active at %0t in %m", $realtime);
                else
                    $display("Signal Condition Check: Program mode starts with sense amp enabled and sftset=X at %0t in %m", $realtime);
                if (fuseMem[AddCounter] == 1'b1) begin
                    dout_[AddCounter] = 1'b1;
                    orout_int = dout_[AddCounter];
                end
                else begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
        end
    // Functional Checks: F4.22,F4.23,F4.24,F4.25
        else if ((por_meminvalid == 0) && (prog_ipd == 1) && ((sensez_ipd == 0) || (sensez_ipd == 1)) && ((lat_ipd == 0) || (lat_ipd == 1)) && (sftset_ipd == 0) && (sftrst_ipd !== 0)) begin
            if (sensez_ipd == 0) begin
                if (sftrst_ipd == 1)
                    $display("Functional Check: Program mode starts when sense amp enabled and softrst active at %0t in %m", $realtime);
                else
                    $display("Signal Condition Check: Program mode starts when sense amp enabled and softrst=X at %0t in %m", $realtime);
                dout_[AddCounter] = 1'bx;
                orout_int = 1'bx;
            end
        end
        else if ((por_meminvalid == 0) && (prog_ipd == 1) && (sensez_ipd == 1) && (lat_ipd !== 0) && (lat_ipd !== 1)) begin
            $display("Signal Condition Check: SenseAmp OFF and Latch=X during program mode; DO goes X at %0t in %m", $realtime);
            dout_ = {`lfm064size{1'bx}};
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
    //Signal Condition Checks: 
        else if ((por_meminvalid == 0) && (prog_ipd == 1) && (sensez_ipd == 0) && (lat_ipd !== 0) && (lat_ipd !== 1) && (clk_ipd == 0 || clk_ipd == 1) && (reset_ipd == 0 || reset_ipd == 1)) begin
            if ((sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X during program mode at %0t in %m", $realtime);
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem[i] !== dout_[i])
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X during program mode with SFTSET at %0t in %m", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if (fuseMem[i] !== dout_[i])
                        dout_[i] = 1'bx;
                    if (i == AddCounter && fuseMem[i] == 1'b1)
                        dout_[i] = 1'b1;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    if (dout_[AddCounter] !== 1'b1)
                        dout_[AddCounter] = 1'bx;
                    orout_int = dout_[AddCounter];
                end
            end
            else if ((sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X during program mode SFTRST at %0t in %m", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size))
                    orout_int = dout_[AddCounter];
            end
            else if ((sftset_ipd == 1) && (sftrst_ipd == 1)) begin
                $display("Signal Condition Check: SenseAmp ON and Latch=X during program mode SFTSET=1 & SFTRST=1 at %0t in %m", $realtime);
                dout_prev = dout_;
                for (i = 0; i < `lfm064size; i = i + 1) begin
                    if ((fuseMem[i] !== dout_[i]) || (dout_[i] !== 1'b0))
                        dout_[i] = 1'bx;
                end
                if (!(AddCounter >= `lfm064size)) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
        end
    //Signal Condition Checks: S4.0 to S4.11
        else if ((por_meminvalid == 0) && (prog_ipd == 1) && (sensez_ipd !== 0) && (sensez_ipd !== 1)) begin
            $display("Signal Condition Check(S4): SenseAmp=X during program mode; DO goes X at %0t in %m", $realtime);
            dout_ = {`lfm064size{1'bx}};
            if (!(AddCounter >= `lfm064size))
                orout_int = 1'bx;
        end
    // Functional Checks: F2.0
        else if (vdd_ipd == 0 ) begin
            $display("Functional Violation: Program mode with VDD low. PROG failed, Fuse not corrupted at %0t in %m", $realtime);
        end
    end

    always @( prog_ipd) begin
        if (prog_ipd == 1)
            prog_flag = 1;
        if (prog_ipd == 0)
            prog_flag = 0;

        if ((prog_ipd !== 0 && prog_ipd !== 1) && (por_meminvalid == 0) && (prog_flag == 0)) begin
            fuseMem_prev = fuseMem;
        end

        if ((prog_ipd !== 0 && prog_ipd !== 1) && (por_meminvalid == 0) && (^AddCounter === 1'bx)) begin
            $display("Signal Condition Violation: prog is X during AddCounter=X. All Fuses may be corrupted at %0t in %m", $realtime);
            for (i = 0; i < `lfm064size; i = i + 1) begin
                if (fuseMem_prev[i] !== 1'b1) begin
                    fuseMem[i] = 1'bx;
                    if (sensez_ipd == 0)
                        dout_[i] = 1'bx;
                end
            end
        end
	    else if (prog_ipd !== 0 && prog_ipd !== 1 && (por_meminvalid == 0)) begin
            $display("Signal Condition Violation: prog goes X. Address bit %d may be corrupted at %0t in %m", AddCounter, $realtime);
            if (fuseMem_prev[AddCounter] !== 1)
                fuseMem[AddCounter] = 1'bx;

            if (((reset_ipd == 0) || (reset_ipd == 1)) && ((clk_ipd == 0) || (clk_ipd == 1)) && (sftset_ipd == 0) && (sftrst_ipd == 0)) begin
                if ((sensez_ipd == 0) && (lat_ipd == 0)) begin
                    dout_[AddCounter] = fuseMem[AddCounter];
                    orout_int = fuseMem[AddCounter];
                end
                else if ((sensez_ipd == 0) && (lat_ipd == 1)) begin
                    if (fuseMem[AddCounter] !== dout_[AddCounter]) begin
                        dout_[AddCounter] = 1'bx;
                        orout_int = 1'bx;
                    end
                end
            end
            else if (((reset_ipd == 0) || (reset_ipd == 1)) && ((clk_ipd == 0) || (clk_ipd == 1)) && (sftset_ipd == 1) && (sftrst_ipd == 0)) begin
                if ((sensez_ipd == 0)) begin
                    if (fuseMem[AddCounter] == 1'b1) begin
                        dout_[AddCounter] = 1'b1;
                        orout_int = dout_[AddCounter];
                    end
                    else begin
                        dout_[AddCounter] = 1'bx;
                        orout_int = dout_[AddCounter];
                    end
                end
            end
            else if (((reset_ipd == 0) || (reset_ipd == 1)) && ((clk_ipd == 0) || (clk_ipd == 1)) && (sftset_ipd == 0) && (sftrst_ipd == 1)) begin
                if (sensez_ipd == 0) begin
                    dout_[AddCounter] = 1'bx;
                    orout_int = 1'bx;
                end
            end
	    end
	end

    always @(posedge vdd_ipd) begin
        if (vdd_ipd == 1) begin
            por_meminvalid = 1'b1;
            por_meminvalid = #2000 1'b0; 			// power up 2us
            if (prog_ipd == 1) begin
                $display("Functional Violation: VDD goes high during program mode. Address bit %d may be corrupted at %0t in %m", AddCounter, $realtime);
                if ((AddCounter < `lfm064size) && (fuseMem_prev[AddCounter] !== 1))
                    fuseMem[AddCounter] = 1'bx;
                dout_ = `lfm064size'bx;
                if (!(AddCounter >= `lfm064size))
                    orout_int = 1'bx;
            end
            else if (prog_ipd !== 0 && prog_ipd !== 1) begin
                $display("Signal Condition Violation: VDD goes high during program=X. Address bit %d may be corrupted at %0t in %m", AddCounter, $realtime);
                if ((AddCounter < `lfm064size) && (fuseMem_prev[AddCounter] !== 1))
                    fuseMem[AddCounter] = 1'bx;
                dout_ = `lfm064size'bx;
                if (!(AddCounter >= `lfm064size))
                    orout_int = 1'bx;
            end
        end
    end


endmodule

`disable_portfaults
`nosuppress_faults
`endcelldefine
