`timescale 1ns/10ps
//-----------------------------------------------------------------------------
// (c) Copyright 2006 Actel Corporation
//
// name:		smev.v
// function:	System Monitor State Machine (Evaluation Phase) block
// Rev:			1.1 16Jan06
//
//-----------------------------------------------------------------------------
module nbnjbfrkqwq(ncpstvtwqnj,rpfzgwrwdkg,gcmhrkbppgk,jbwprskzkqd,hjpffdxwpbw,
ddpxkdxnzzm,cvgrnnhzfgx,pmnnjbksbnp,xmpjfckcwxc,mxgpfwdmwkr,kphbsmpswkm,
hfzgjxkdrpz,zxrxtxxbsks,zhkvvfnsbjb,ftjpqbkvjxw,mhxzjtkwkbd,rnzjdwddzmq,
brfcnbqvhcm,tbjwqrfwfrn,dsvtxghkjbb,ddbbjvkdkcq,hvbjzpshknp,mqmgjkmdztb,
mkmkbnghgkd,pfbntnkqtmt,zcjzqnkdqwb,rrjdhmvhdjx,djdxztmwwqc,zbcrjjxqjgg,
kkjrqmngvjc,zbqggxmnpbs,jrgzmrqhbkv,frhjqwkkhgk);parameter xpcbfxxdxkn=6;
parameter nktdnxxpfkw=1;parameter ggtrvzfhvzg=0;parameter wqxrhkntcsq=0;
parameter fnkkfbknbsc=0;parameter cvjhxdkdhtp=1;parameter tbfvnhctzpk=9;
parameter gzpxmwsppbw=5;parameter gqvfcjcxrbx=0;input ncpstvtwqnj;input
rpfzgwrwdkg;input[xpcbfxxdxkn - 1:0] gcmhrkbppgk;input jbwprskzkqd;input
hjpffdxwpbw;input ddpxkdxnzzm;input[4:0] cvgrnnhzfgx;output[4:0] pmnnjbksbnp;
wire[4:0] pmnnjbksbnp;input[tbfvnhctzpk - 1:0] xmpjfckcwxc;input mxgpfwdmwkr;
input[8:0] kphbsmpswkm;input hfzgjxkdrpz;input[tbfvnhctzpk - 1:0] zxrxtxxbsks;
input zhkvvfnsbjb;output ftjpqbkvjxw;wire ftjpqbkvjxw;input[tbfvnhctzpk - 1:0]
mhxzjtkwkbd;input rnzjdwddzmq;output brfcnbqvhcm;wire brfcnbqvhcm;output
tbjwqrfwfrn;wire tbjwqrfwfrn;output[8:0] dsvtxghkjbb;wire[8:0] dsvtxghkjbb;
output ddbbjvkdkcq;wire ddbbjvkdkcq;input[8:0] hvbjzpshknp;input mqmgjkmdztb;
output[tbfvnhctzpk - 1:0] mkmkbnghgkd;wire[tbfvnhctzpk - 1:0] mkmkbnghgkd;
output pfbntnkqtmt;wire pfbntnkqtmt;output zcjzqnkdqwb;wire zcjzqnkdqwb;
output[8:0] rrjdhmvhdjx;wire[8:0] rrjdhmvhdjx;output[tbfvnhctzpk - 1:0]
djdxztmwwqc;wire[tbfvnhctzpk - 1:0] djdxztmwwqc;output zbcrjjxqjgg;wire
zbcrjjxqjgg;output kkjrqmngvjc;wire kkjrqmngvjc;output[8:0] zbqggxmnpbs;
wire[8:0] zbqggxmnpbs;input[8:0] jrgzmrqhbkv;output frhjqwkkhgk;wire
frhjqwkkhgk;parameter[2:0] bbgbwbsfrfg=3'b000;parameter[2:0] xbpzprjgbtz=3'b001;
parameter[2:0] gwnrsjgrpbc=3'b010;parameter[2:0] jswmkwkntrs=3'b011;
parameter[2:0] cgrzbdcbzpz=3'b100;parameter[2:0] zddwkjwwzbw=3'b101;
parameter[2:0] nrpbqkqfsmf=3'b110;parameter[2:0] jgnwnzmddbg=3'b111;
parameter[1:0] nmwcwxjntmm=2'b00;parameter[1:0] pcfxjtkxtsg=2'b01;
parameter[2:0] xwwgksgtkqh=3'b011;parameter[2:0] njddmfhbdwc=3'b100;wire
vfmncnnxwxb;wire cdhmfjmbskp;wire[5:0] xxprmjznqgq;wire[xpcbfxxdxkn - 1:0]
wdxjqgrpnwg;wire kdbzpfbdnrt;wire qfdjfxfcbmd;wire bbmxngswjfs;wire[4:0]
pnndcxmnbpm;wire[4:0] sfhfzbqtdrd;wire[tbfvnhctzpk - 1:0] cgkgctmdngm;wire
ggqwscctmsj;wire[8:0] qdrnwmghkbr;wire kdnvqzwcfgg;wire[tbfvnhctzpk - 1:0]
sqqjqswwxnp;wire qgsvmvtzdhp;wire bsbdfcsghvh;wire[tbfvnhctzpk - 1:0]
bmqzhbnrjrt;wire hhbskjdwkbg;wire fxxtkzxdddv;wire qnkbpwrmzbs;wire[8:0]
ncbdsnccxsc;wire kzxjbrgqmtq;wire[8:0] jsjbsdptpds;wire tnhpwppptjx;
wire[tbfvnhctzpk - 1:0] gwkwrcnhmmj;wire rtfmbvnhxzd;wire dzvzctcwtdh;wire[8:0]
gjmhhphthkr;wire[tbfvnhctzpk - 1:0] kvdwfbqqtdx;wire wvftvqhpsbt;wire
pqsqdxgrqnr;wire[8:0] kzwwfrhnrpc;wire[8:0] gxkdnvhmgwf;wire bpwnwvtjxjg;
parameter[4:0] kntgqgfbzkr=0;parameter[4:0] cgxqzmxpnxk=1;parameter[4:0]
zjkzxqtrnnb=2;parameter[4:0] qrqqppcxnvn=3;parameter[4:0] fvkvddpjhhn=4;
parameter[4:0] ggzhpgqrzwh=5;parameter[4:0] xxntrgztxmd=6;parameter[4:0]
fjkwxwrhjth=7;parameter[4:0] fwhsjhtxbzz=8;parameter[4:0] gxvwpbbfszd=9;
parameter[4:0] sdcwbhhndvx=10;parameter[4:0] rqsqdpqbsvd=11;parameter[4:0]
hqxrmvjrpxb=12;parameter[4:0] tkfbpdjdwdh=13;parameter[4:0] znqvsmrcdpb=14;
parameter[4:0] szzwndnzvgm=15;parameter[4:0] qrtrwbcbrcg=16;parameter[4:0]
fkfmkfrjbkn=17;reg[4:0] tkcbxxqbtfx;reg[4:0] nqmczbhbzpg;wire xgwbqmjjjkn;
reg[5:0] kkkmkxwwscv;reg[4:0] mtbjcfqsbqf;wire hmzcpnxsdwg;reg rgmpzqrbghh;
wire[1:0] smthxpxkchd;reg fskhwddcbbg;reg rnrwrhfrhnn;reg[8:0] dbdctxjdvkp;
wire[2:0] fgsfsntrzph;wire[1:0] drdwnnhrznk;reg[1:0] rfrdbqfdrhx;reg
rhqwjqkhdhr;wire[tbfvnhctzpk - 1:0] kcwskqfgkht;reg[1:0] qjgqqmtvtqp;reg
rrtqrjpchxz;wire[8:0] vbjvwgrtxjw;reg[8:0] dhzrwbnrbpw;wire[8:0] rcdrbftvtnj;
reg gpwvqcjqzjx;wire djkvsqpmrfg;reg[1:0] smsgrfvbrts;reg szccsnzpbrp;reg
bskrjhjvqpf;reg zqwvqwfmrqx;reg[tbfvnhctzpk - 1:0] qrbxknbdvjj;reg bmkwsvgbnqv;
reg qjgcfcnxqtr;reg khtmpxkgdxf;reg[11:0] rqrqhcwpqdn;wire[8:0] ccmxksvcjtp;
wire[2:0] gmvgxmhwtfn;reg[11:0] bnvtvdkcnpp;reg[5:0] ftbkrvpxdbp;wire[5:0]
hpbqnqzdwpj;wire[8:0] jzprkzxhccd;wire[2:0] nksbnjfbsqk;wire xkwrgrspmcf;wire
mvnkctvqsgp;wire qvqqfftqsfc;wire kkgccghmrzf;reg qbszkvfxpws;reg spbznmtdmpd;
wire[12:0] tvhnmpjfhrb;wire[12:0] chxkngxwqdj;reg jtxvvnrrdjw;wire pbzxzjhqhwz;
wire[gzpxmwsppbw - 1:0] skvvrjsfzcv;reg szfwdhbbdnb;wire[gzpxmwsppbw - 1:0]
qxxpzmphrcg;wire[gzpxmwsppbw - 1:0] cvfspjtfprm;reg cmkddgvkrrs;reg gcqsptsqnzg;
wire wqpbnjzjqsx;wire gpjgkmhxbkn;reg[gzpxmwsppbw - 1:0] ckghxwbsztp;reg
sphhbprckfk;reg chxjmrqxptz;wire zvzgbvvmvvb;reg hdwxrmxfsxp;reg tddhwjzbsrj;
wire[8:0] qdcctbddgxq;reg pztgdsnzsrn;wire[3:0] bvjqfzmkvqs;reg[3:0]
rdgwgtpkbgc;wire sccpfkbpjqm;reg jqfgrkqqqrt;reg vtwdkxfrcqb;wire[8:0]
fnpzmsbhgzc;wire[2:0] wpkhxgbwwzt;wire[18:0] nvxptftwxwj;wire[18:0] fqkdsnjfpdb;
reg[18:0] gjkdbmpgrtc;reg[18:0] bnwcvzjbgtc;reg[8:0] dcqfdcmfzss;reg
cptqppmhhfr;reg vghtsgpnxjg;reg xwhwqsjfmgh;reg njhxtffzjds;wire qmmwhjxxxmv;
parameter[8:0] pnwpqmrtsvr=9'b111111111;parameter[5:0] zzrrppgmfrr=6'b000000;
parameter[7:0] cmxrrdpdrcs=8'b00000000;parameter[8:0] shsxpvrhshq=9'b000000000;
assign fgsfsntrzph=gxkdnvhmgwf[8:6];assign drdwnnhrznk=gxkdnvhmgwf[5:4];assign
bvjqfzmkvqs=gxkdnvhmgwf[3:0];assign smthxpxkchd=gxkdnvhmgwf[1:0];assign
ccmxksvcjtp=gxkdnvhmgwf[8:0];assign gmvgxmhwtfn=gxkdnvhmgwf[2:0];assign
jzprkzxhccd=gxkdnvhmgwf[8:0];assign nksbnjfbsqk=gxkdnvhmgwf[2:0];assign
vbjvwgrtxjw=gxkdnvhmgwf;assign fnpzmsbhgzc=jsjbsdptpds[8:0];assign
wpkhxgbwwzt=jsjbsdptpds[2:0];assign hpbqnqzdwpj=gxkdnvhmgwf[8:3];assign
hmzcpnxsdwg=qfdjfxfcbmd&bbmxngswjfs;always @(posedge vfmncnnxwxb or negedge
cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin rgmpzqrbghh<=1'b0;end else begin
rgmpzqrbghh<=hmzcpnxsdwg;end end generate if(xpcbfxxdxkn<6)begin:csqgbwcxxsz
genvar i;for(i=xpcbfxxdxkn;i<=5;i=i + 1)begin:hcnmwpsxgbv assign
xxprmjznqgq[i]=1'b0;end assign xxprmjznqgq[xpcbfxxdxkn - 1:0]=wdxjqgrpnwg;end
endgenerate generate if(xpcbfxxdxkn==6)begin:mvsbjfbmzsh assign
xxprmjznqgq=wdxjqgrpnwg;end endgenerate assign qmmwhjxxxmv=kdbzpfbdnrt&
bbmxngswjfs;always @(posedge vfmncnnxwxb or negedge cdhmfjmbskp)begin if(
cdhmfjmbskp==1'b0)begin kkkmkxwwscv<={6{1'b0}};mtbjcfqsbqf<={5{1'b0}};end else
begin if(qmmwhjxxxmv==1'b1)begin kkkmkxwwscv<=xxprmjznqgq;
mtbjcfqsbqf<=pnndcxmnbpm;end end end assign rcdrbftvtnj={3'b000,mtbjcfqsbqf,
1'b0};always @(posedge vfmncnnxwxb or negedge cdhmfjmbskp)begin:pptwzsjcmcz if(
cdhmfjmbskp==1'b0)begin dhzrwbnrbpw<={9{1'b0}};end else begin if(
rgmpzqrbghh==1'b1)begin dhzrwbnrbpw<=rcdrbftvtnj;end else if(bmkwsvgbnqv==1'b1)
begin dhzrwbnrbpw<=qrbxknbdvjj[8:0];end else begin if(gpwvqcjqzjx==1'b1)begin
dhzrwbnrbpw<=vbjvwgrtxjw;end else if(bskrjhjvqpf==1'b1)begin dhzrwbnrbpw<=((
dhzrwbnrbpw)+ 1);end end end end assign djkvsqpmrfg=(dhzrwbnrbpw==pnwpqmrtsvr)?
1'b1:1'b0;generate if(tbfvnhctzpk>9)begin:kptxmggmzsq always @(posedge
vfmncnnxwxb or negedge cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin
smsgrfvbrts<={2{1'b0}};qjgqqmtvtqp<={2{1'b0}};end else begin if(
szccsnzpbrp==1'b1)begin smsgrfvbrts<=smthxpxkchd;end if(rgmpzqrbghh==1'b1)begin
qjgqqmtvtqp<={2{1'b0}};end else if(bmkwsvgbnqv==1'b1)begin
qjgqqmtvtqp[tbfvnhctzpk - 10:0]<=qrbxknbdvjj[tbfvnhctzpk - 1:9];end else begin
if(rrtqrjpchxz==1'b1)begin qjgqqmtvtqp<=smsgrfvbrts;end else if(
djkvsqpmrfg==1'b1&bskrjhjvqpf==1'b1)begin qjgqqmtvtqp<=((qjgqqmtvtqp)+ 1);end
end end end assign kcwskqfgkht={qjgqqmtvtqp[tbfvnhctzpk - 10:0],dhzrwbnrbpw};
end endgenerate generate if(tbfvnhctzpk<10)begin:dhjmmgtrjjb assign
kcwskqfgkht=dhzrwbnrbpw;wire[1:0] wire_xhdl25={2{1'b0}};always @(wire_xhdl25)
begin qjgqqmtvtqp<=wire_xhdl25;end end endgenerate always @(posedge vfmncnnxwxb
or negedge cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin
qrbxknbdvjj<={tbfvnhctzpk - 1-(0)+1{1'b0}};end else begin if(zqwvqwfmrqx==1'b1)
begin qrbxknbdvjj<=kcwskqfgkht;end end end always @(posedge vfmncnnxwxb or
negedge cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin rfrdbqfdrhx<={2{1'b0}};end
else begin if(rhqwjqkhdhr==1'b1)begin rfrdbqfdrhx<=drdwnnhrznk;end end end
assign mvnkctvqsgp=(rfrdbqfdrhx==nmwcwxjntmm&qjgcfcnxqtr==1'b1)? 1'b1:1'b0;
assign xkwrgrspmcf=(rfrdbqfdrhx==nmwcwxjntmm&khtmpxkgdxf==1'b1)? 1'b1:1'b0;
assign kkgccghmrzf=(rfrdbqfdrhx==pcfxjtkxtsg&qjgcfcnxqtr==1'b1)? 1'b1:1'b0;
assign qvqqfftqsfc=((rfrdbqfdrhx==pcfxjtkxtsg&khtmpxkgdxf==1'b1)|
szfwdhbbdnb==1'b1)? 1'b1:1'b0;always @(posedge vfmncnnxwxb or negedge
cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin rqrqhcwpqdn<={12{1'b0}};end else
begin if(jqfgrkqqqrt==1'b1)begin rqrqhcwpqdn[8:0]<=fnpzmsbhgzc;end else if(
xkwrgrspmcf==1'b1)begin rqrqhcwpqdn[8:0]<=ccmxksvcjtp;end if(vtwdkxfrcqb==1'b1)
begin rqrqhcwpqdn[11:9]<=wpkhxgbwwzt;end else if(mvnkctvqsgp==1'b1)begin
rqrqhcwpqdn[11:9]<=gmvgxmhwtfn;end end end always @(posedge vfmncnnxwxb or
negedge cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin bnvtvdkcnpp<={12{1'b0}};
ftbkrvpxdbp<={6{1'b0}};end else begin if(qbszkvfxpws==1'b1)begin
bnvtvdkcnpp<=fqkdsnjfpdb[17:6];ftbkrvpxdbp<=fqkdsnjfpdb[5:0];end else begin if(
qvqqfftqsfc==1'b1)begin bnvtvdkcnpp[8:0]<=jzprkzxhccd;end if(kkgccghmrzf==1'b1)
begin bnvtvdkcnpp[11:9]<=nksbnjfbsqk;ftbkrvpxdbp<=hpbqnqzdwpj;end end end end
generate if(wqxrhkntcsq==1)begin:drvqzndhqrj assign tvhnmpjfhrb=(({1'b0,
rqrqhcwpqdn})+({1'b0,bnvtvdkcnpp}));end endgenerate generate if(wqxrhkntcsq==0)
begin:pvxwrmmhfrt assign tvhnmpjfhrb={13{1'b0}};end endgenerate generate if(
fnkkfbknbsc==1)begin:tpvkgfjtrjt assign chxkngxwqdj=(({1'b0,rqrqhcwpqdn})-(
{1'b0,bnvtvdkcnpp}));end endgenerate generate if(fnkkfbknbsc==0)
begin:pgrfxmzhkpm assign chxkngxwqdj={13{1'b0}};end endgenerate generate if(
cvjhxdkdhtp==1)begin:pvtdpmmqdpp assign pbzxzjhqhwz=((rqrqhcwpqdn)>(bnvtvdkcnpp)
)? 1'b1:1'b0;end endgenerate generate if(cvjhxdkdhtp==0)begin:wgzfrmtzrgq
assign pbzxzjhqhwz=1'b0;end endgenerate always @(posedge vfmncnnxwxb or negedge
cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin spbznmtdmpd<=1'b0;end else begin
if(jtxvvnrrdjw==1'b1)begin spbznmtdmpd<=pbzxzjhqhwz;end end end assign
skvvrjsfzcv=rqrqhcwpqdn[gzpxmwsppbw:1];assign zvzgbvvmvvb=rqrqhcwpqdn[0];assign
qxxpzmphrcg=bnvtvdkcnpp[gzpxmwsppbw:1];assign
cvfspjtfprm=gxkdnvhmgwf[gzpxmwsppbw:1];always @(posedge vfmncnnxwxb or negedge
cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin ckghxwbsztp<={gzpxmwsppbw - 1-(0)
+1{1'b0}};tddhwjzbsrj<=1'b0;end else begin if(sphhbprckfk==1'b1)begin
ckghxwbsztp<={gzpxmwsppbw - 1-(0)+1{1'b0}};end else if(chxjmrqxptz==1'b1)begin
ckghxwbsztp<=((skvvrjsfzcv)+ 1);end if(cmkddgvkrrs==1'b1)begin
tddhwjzbsrj<=1'b1;end else if(gcqsptsqnzg==1'b1)begin tddhwjzbsrj<=1'b0;end end
end assign wqpbnjzjqsx=(skvvrjsfzcv==qxxpzmphrcg)? 1'b1:1'b0;assign
gpjgkmhxbkn=(skvvrjsfzcv==cvfspjtfprm)? 1'b1:1'b0;generate if(gzpxmwsppbw<=5)
begin:sjmhhpsnqjz assign qdcctbddgxq[8:gzpxmwsppbw + 1]={8-(0)+1{1'b0}};assign
qdcctbddgxq[gzpxmwsppbw:1]=ckghxwbsztp;assign qdcctbddgxq[0]=tddhwjzbsrj;end
endgenerate generate if(ggtrvzfhvzg==1)begin:wpmngnmsqcx always @(posedge
vfmncnnxwxb or negedge cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin
rdgwgtpkbgc<={4{1'b0}};end else begin if(pztgdsnzsrn==1'b1)begin
rdgwgtpkbgc<=bvjqfzmkvqs;end end end assign nvxptftwxwj[18]=1'b0;assign
nvxptftwxwj[17:6]=bnvtvdkcnpp;assign nvxptftwxwj[5:0]=ftbkrvpxdbp;end
endgenerate generate if(ggtrvzfhvzg==0)begin:jpkscwttmbk wire[3:0]
wire_xhdl55={4{1'b0}};always @(wire_xhdl55)begin rdgwgtpkbgc<=wire_xhdl55;end
assign nvxptftwxwj={19{1'b0}};end endgenerate assign sccpfkbpjqm=(
rdgwgtpkbgc==4'b0000)? 1'b1:1'b0;always @(tkcbxxqbtfx or rgmpzqrbghh or
fgsfsntrzph or kkkmkxwwscv or tddhwjzbsrj or tvhnmpjfhrb or chxkngxwqdj or
pbzxzjhqhwz or fqkdsnjfpdb or zvzgbvvmvvb or spbznmtdmpd or wqpbnjzjqsx or
gpjgkmhxbkn or qdcctbddgxq)begin nqmczbhbzpg<=tkcbxxqbtfx;rnrwrhfrhnn<=1'b1;
fskhwddcbbg<=1'b1;dbdctxjdvkp<=shsxpvrhshq;bskrjhjvqpf<=1'b0;szccsnzpbrp<=1'b0;
rrtqrjpchxz<=1'b0;gpwvqcjqzjx<=1'b0;zqwvqwfmrqx<=1'b0;bmkwsvgbnqv<=1'b0;
rhqwjqkhdhr<=1'b0;pztgdsnzsrn<=1'b0;dcqfdcmfzss<={kkkmkxwwscv,xwwgksgtkqh};
cptqppmhhfr<=1'b0;jtxvvnrrdjw<=1'b0;qbszkvfxpws<=1'b0;szfwdhbbdnb<=1'b0;
qjgcfcnxqtr<=1'b0;khtmpxkgdxf<=1'b0;vtwdkxfrcqb<=1'b0;jqfgrkqqqrt<=1'b0;
sphhbprckfk<=1'b0;chxjmrqxptz<=1'b0;hdwxrmxfsxp<=tddhwjzbsrj;cmkddgvkrrs<=1'b0;
gcqsptsqnzg<=1'b0;vghtsgpnxjg<=1'b0;case(tkcbxxqbtfx)kntgqgfbzkr:begin if(
rgmpzqrbghh==1'b1)begin nqmczbhbzpg<=cgxqzmxpnxk;end else begin
nqmczbhbzpg<=kntgqgfbzkr;end end cgxqzmxpnxk:begin rnrwrhfrhnn<=1'b0;
bskrjhjvqpf<=1'b1;nqmczbhbzpg<=zjkzxqtrnnb;end zjkzxqtrnnb:begin
rnrwrhfrhnn<=1'b0;szccsnzpbrp<=1'b1;nqmczbhbzpg<=qrqqppcxnvn;end
qrqqppcxnvn:begin rrtqrjpchxz<=1'b1;gpwvqcjqzjx<=1'b1;nqmczbhbzpg<=fvkvddpjhhn;
end fvkvddpjhhn:begin rnrwrhfrhnn<=1'b0;bskrjhjvqpf<=1'b1;
nqmczbhbzpg<=ggzhpgqrzwh;end ggzhpgqrzwh:begin case(fgsfsntrzph)
xbpzprjgbtz:begin rnrwrhfrhnn<=1'b0;rhqwjqkhdhr<=1'b1;szccsnzpbrp<=1'b1;
bskrjhjvqpf<=1'b1;nqmczbhbzpg<=xxntrgztxmd;end gwnrsjgrpbc:begin
pztgdsnzsrn<=1'b1;dcqfdcmfzss<={kkkmkxwwscv,xwwgksgtkqh};cptqppmhhfr<=1'b1;
nqmczbhbzpg<=sdcwbhhndvx;end jswmkwkntrs:begin rnrwrhfrhnn<=1'b0;
fskhwddcbbg<=1'b0;dbdctxjdvkp<=tvhnmpjfhrb[8:0];bskrjhjvqpf<=1'b1;
nqmczbhbzpg<=znqvsmrcdpb;end cgrzbdcbzpz:begin rnrwrhfrhnn<=1'b0;
fskhwddcbbg<=1'b0;dbdctxjdvkp<=chxkngxwqdj[8:0];bskrjhjvqpf<=1'b1;
nqmczbhbzpg<=szzwndnzvgm;end zddwkjwwzbw:begin rnrwrhfrhnn<=1'b0;
fskhwddcbbg<=1'b0;dbdctxjdvkp<={cmxrrdpdrcs,pbzxzjhqhwz};jtxvvnrrdjw<=1'b1;
bskrjhjvqpf<=1'b1;nqmczbhbzpg<=fvkvddpjhhn;end nrpbqkqfsmf:begin
szfwdhbbdnb<=1'b1;rnrwrhfrhnn<=1'b0;nqmczbhbzpg<=qrtrwbcbrcg;end
jgnwnzmddbg:begin vghtsgpnxjg<=1'b1;nqmczbhbzpg<=kntgqgfbzkr;end default:begin
bskrjhjvqpf<=1'b1;nqmczbhbzpg<=fvkvddpjhhn;end endcase end xxntrgztxmd:begin
rrtqrjpchxz<=1'b1;gpwvqcjqzjx<=1'b1;zqwvqwfmrqx<=1'b1;nqmczbhbzpg<=fjkwxwrhjth;
end fjkwxwrhjth:begin rnrwrhfrhnn<=1'b0;bskrjhjvqpf<=1'b1;
nqmczbhbzpg<=fwhsjhtxbzz;end fwhsjhtxbzz:begin rnrwrhfrhnn<=1'b0;
khtmpxkgdxf<=1'b1;nqmczbhbzpg<=gxvwpbbfszd;end gxvwpbbfszd:begin
qjgcfcnxqtr<=1'b1;bmkwsvgbnqv<=1'b1;nqmczbhbzpg<=fvkvddpjhhn;end
sdcwbhhndvx:begin jqfgrkqqqrt<=1'b1;dcqfdcmfzss<={kkkmkxwwscv,njddmfhbdwc};
cptqppmhhfr<=1'b1;nqmczbhbzpg<=rqsqdpqbsvd;end rqsqdpqbsvd:begin
vtwdkxfrcqb<=1'b1;nqmczbhbzpg<=hqxrmvjrpxb;end hqxrmvjrpxb:begin
rnrwrhfrhnn<=1'b0;fskhwddcbbg<=1'b0;dbdctxjdvkp<=fqkdsnjfpdb[14:6];
bskrjhjvqpf<=1'b1;nqmczbhbzpg<=tkfbpdjdwdh;end tkfbpdjdwdh:begin
rnrwrhfrhnn<=1'b0;fskhwddcbbg<=1'b0;dbdctxjdvkp<={fqkdsnjfpdb[5:0],
fqkdsnjfpdb[17:15]};bskrjhjvqpf<=1'b1;qbszkvfxpws<=1'b1;
nqmczbhbzpg<=fvkvddpjhhn;end znqvsmrcdpb:begin rnrwrhfrhnn<=1'b0;
fskhwddcbbg<=1'b0;dbdctxjdvkp<={zzrrppgmfrr,tvhnmpjfhrb[11:9]};
bskrjhjvqpf<=1'b1;nqmczbhbzpg<=fvkvddpjhhn;end szzwndnzvgm:begin
rnrwrhfrhnn<=1'b0;fskhwddcbbg<=1'b0;dbdctxjdvkp<={zzrrppgmfrr,
chxkngxwqdj[11:9]};bskrjhjvqpf<=1'b1;nqmczbhbzpg<=fvkvddpjhhn;end
qrtrwbcbrcg:begin bskrjhjvqpf<=1'b1;if(zvzgbvvmvvb==1'b0)begin if(
spbznmtdmpd==1'b1)begin if(wqpbnjzjqsx==1'b1)begin cmkddgvkrrs<=1'b1;
sphhbprckfk<=1'b1;end else begin gcqsptsqnzg<=1'b1;chxjmrqxptz<=1'b1;end end
else begin gcqsptsqnzg<=1'b1;sphhbprckfk<=1'b1;end end else begin if(
spbznmtdmpd==1'b0)begin if(gpjgkmhxbkn==1'b1)begin gcqsptsqnzg<=1'b1;
sphhbprckfk<=1'b1;end else begin cmkddgvkrrs<=1'b1;chxjmrqxptz<=1'b1;end end
else begin cmkddgvkrrs<=1'b1;sphhbprckfk<=1'b1;end end nqmczbhbzpg<=fkfmkfrjbkn;
end fkfmkfrjbkn:begin rnrwrhfrhnn<=1'b0;fskhwddcbbg<=1'b0;
dbdctxjdvkp<=qdcctbddgxq;bskrjhjvqpf<=1'b1;nqmczbhbzpg<=fvkvddpjhhn;end endcase
end assign xgwbqmjjjkn=kdnvqzwcfgg;always @(posedge vfmncnnxwxb or negedge
cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin tkcbxxqbtfx<=kntgqgfbzkr;end else
begin if(xgwbqmjjjkn==1'b1)begin tkcbxxqbtfx<=nqmczbhbzpg;end else begin
tkcbxxqbtfx<=kntgqgfbzkr;end end end always @(posedge vfmncnnxwxb or negedge
cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin xwhwqsjfmgh<=1'b0;end else begin
xwhwqsjfmgh<=vghtsgpnxjg;end end always @(posedge vfmncnnxwxb or negedge
cdhmfjmbskp)begin if(cdhmfjmbskp==1'b0)begin njhxtffzjds<=1'b0;end else begin
if(vghtsgpnxjg==1'b1|kdnvqzwcfgg==1'b0)begin njhxtffzjds<=1'b0;end else if(
qmmwhjxxxmv==1'b1)begin njhxtffzjds<=1'b1;end end end always @(rdgwgtpkbgc or
rqrqhcwpqdn)begin case(rdgwgtpkbgc)4'b0001:begin gjkdbmpgrtc<={2'b00,
rqrqhcwpqdn[11:0],5'b00000};end 4'b0010:begin gjkdbmpgrtc<={3'b000,
rqrqhcwpqdn[11:0],4'b0000};end 4'b0011:begin gjkdbmpgrtc<={4'b0000,
rqrqhcwpqdn[11:0],3'b000};end 4'b0100:begin gjkdbmpgrtc<={5'b00000,
rqrqhcwpqdn[11:0],2'b00};end 4'b0101:begin gjkdbmpgrtc<={6'b000000,
rqrqhcwpqdn[11:0],1'b0};end 4'b0110:begin gjkdbmpgrtc<={7'b0000000,
rqrqhcwpqdn[11:0]};end 4'b0111:begin gjkdbmpgrtc<={8'b00000000,
rqrqhcwpqdn[11:1]};end 4'b1000:begin gjkdbmpgrtc<={9'b000000000,
rqrqhcwpqdn[11:2]};end 4'b1001:begin gjkdbmpgrtc<={10'b0000000000,
rqrqhcwpqdn[11:3]};end 4'b1010:begin gjkdbmpgrtc<={11'b00000000000,
rqrqhcwpqdn[11:4]};end 4'b1011:begin gjkdbmpgrtc<={12'b000000000000,
rqrqhcwpqdn[11:5]};end default:begin gjkdbmpgrtc<={1'b0,rqrqhcwpqdn[11:0],
6'b000000};end endcase end always @(rdgwgtpkbgc or nvxptftwxwj)begin case(
rdgwgtpkbgc)4'b0001:begin bnwcvzjbgtc<={2'b00,nvxptftwxwj[17:1]};end
4'b0010:begin bnwcvzjbgtc<={3'b000,nvxptftwxwj[17:2]};end 4'b0011:begin
bnwcvzjbgtc<={4'b0000,nvxptftwxwj[17:3]};end 4'b0100:begin
bnwcvzjbgtc<={5'b00000,nvxptftwxwj[17:4]};end 4'b0101:begin
bnwcvzjbgtc<={6'b000000,nvxptftwxwj[17:5]};end 4'b0110:begin
bnwcvzjbgtc<={7'b0000000,nvxptftwxwj[17:6]};end 4'b0111:begin
bnwcvzjbgtc<={8'b00000000,nvxptftwxwj[17:7]};end 4'b1000:begin
bnwcvzjbgtc<={9'b000000000,nvxptftwxwj[17:8]};end 4'b1001:begin
bnwcvzjbgtc<={10'b0000000000,nvxptftwxwj[17:9]};end 4'b1010:begin
bnwcvzjbgtc<={11'b00000000000,nvxptftwxwj[17:10]};end 4'b1011:begin
bnwcvzjbgtc<={12'b000000000000,nvxptftwxwj[17:11]};end default:begin
bnwcvzjbgtc<={1'b0,nvxptftwxwj[17:0]};end endcase end assign fqkdsnjfpdb=((
nvxptftwxwj)+(gjkdbmpgrtc)-(bnwcvzjbgtc));assign sfhfzbqtdrd=mtbjcfqsbqf;assign
qnkbpwrmzbs=xwhwqsjfmgh;assign fxxtkzxdddv=njhxtffzjds;assign
kvdwfbqqtdx=kcwskqfgkht;assign wvftvqhpsbt=fskhwddcbbg;assign
pqsqdxgrqnr=rnrwrhfrhnn;assign kzwwfrhnrpc=dbdctxjdvkp;assign
ncbdsnccxsc=dcqfdcmfzss;assign kzxjbrgqmtq=cptqppmhhfr;generate if(
nktdnxxpfkw==1)begin:rgwqjtfwpfh assign gwkwrcnhmmj=(kdnvqzwcfgg==1'b0)?
cgkgctmdngm:(hhbskjdwkbg==1'b1)? bmqzhbnrjrt:sqqjqswwxnp;assign dzvzctcwtdh=(
kdnvqzwcfgg==1'b0)? ~ggqwscctmsj:(hhbskjdwkbg==1'b1)? 1'b0:(qgsvmvtzdhp==1'b1)?
1'b0:1'b1;end endgenerate generate if(nktdnxxpfkw==0)begin:fqpgmsnbjkp assign
gwkwrcnhmmj=(kdnvqzwcfgg==1'b0)? cgkgctmdngm:bmqzhbnrjrt;assign dzvzctcwtdh=(
kdnvqzwcfgg==1'b0)? ~ggqwscctmsj:(hhbskjdwkbg==1'b1)? 1'b0:1'b1;end endgenerate
assign rtfmbvnhxzd=(kdnvqzwcfgg==1'b0)? ~ggqwscctmsj:1'b1;assign
gjmhhphthkr=qdrnwmghkbr;assign bsbdfcsghvh=hhbskjdwkbg|~kdnvqzwcfgg;assign
bpwnwvtjxjg=(wvftvqhpsbt==1'b0&pqsqdxgrqnr==1'b0)? 1'b1:1'b0;assign
vfmncnnxwxb=ncpstvtwqnj;assign cdhmfjmbskp=rpfzgwrwdkg;assign
wdxjqgrpnwg=gcmhrkbppgk;assign kdbzpfbdnrt=jbwprskzkqd;assign
qfdjfxfcbmd=hjpffdxwpbw;assign bbmxngswjfs=ddpxkdxnzzm;assign
pnndcxmnbpm=cvgrnnhzfgx;assign pmnnjbksbnp=sfhfzbqtdrd;assign
cgkgctmdngm=xmpjfckcwxc;assign ggqwscctmsj=mxgpfwdmwkr;assign
qdrnwmghkbr=kphbsmpswkm;assign kdnvqzwcfgg=hfzgjxkdrpz;assign
sqqjqswwxnp=zxrxtxxbsks;assign qgsvmvtzdhp=zhkvvfnsbjb;assign
ftjpqbkvjxw=bsbdfcsghvh;assign bmqzhbnrjrt=mhxzjtkwkbd;assign
hhbskjdwkbg=rnzjdwddzmq;assign brfcnbqvhcm=fxxtkzxdddv;assign
tbjwqrfwfrn=qnkbpwrmzbs;assign dsvtxghkjbb=ncbdsnccxsc;assign
ddbbjvkdkcq=kzxjbrgqmtq;assign jsjbsdptpds=hvbjzpshknp;assign
tnhpwppptjx=mqmgjkmdztb;assign mkmkbnghgkd=gwkwrcnhmmj;assign
pfbntnkqtmt=rtfmbvnhxzd;assign zcjzqnkdqwb=dzvzctcwtdh;assign
rrjdhmvhdjx=gjmhhphthkr;assign djdxztmwwqc=kvdwfbqqtdx;assign
zbcrjjxqjgg=wvftvqhpsbt;assign kkjrqmngvjc=pqsqdxgrqnr;assign
zbqggxmnpbs=kzwwfrhnrpc;assign gxkdnvhmgwf=jrgzmrqhbkv;assign
frhjqwkkhgk=bpwnwvtjxjg;endmodule
`timescale 1ns/10ps
module SMEV(CLK,NRESET,ASSC_SEQOUT,ASSC_SEQCHANGE,ASSC_DONE,ASSC_SAMPFLAG,
ADC_CHNR,EV_CHHOLD,INIT_ADDR,INIT_EV_WR,INIT_DI,INIT_DONE,USER_EV_ADDR,
USER_EV_RD,USER_EV_RAM_BUSY,TR_EV_ADDR,TR_EV_RD,EV_EVFLAG,EV_DONE,EV_ASSC_ADDR,
EV_ASSC_RD,ASSC_RAM_DO_A,ASSC_RAM_WR_BUSY_B,EV_RAM_ADDR_A,EV_RAM_RW_A,
EV_RAM_CSN_A,EV_RAM_DI_A,EV_RAM_ADDR_B,EV_RAM_RW_B,EV_RAM_CSN_B,EV_RAM_DI_B,
EV_RAM_DO_B,EV_RAM_WR_BUSY_B);parameter TS_WIDTH=6;parameter ALLOW_USER_EV=1;
parameter ALLOW_DLPF=0;parameter ALLOW_A_PLUS_B=0;parameter ALLOW_A_MINUS_B=0;
parameter ALLOW_A_GT_B=1;parameter EV_ASIZE=9;parameter ST_CNT_WIDTH=5;
parameter USE_NON_G3=0;input CLK;input NRESET;input[TS_WIDTH - 1:0] ASSC_SEQOUT;
input ASSC_SEQCHANGE;input ASSC_DONE;input ASSC_SAMPFLAG;input[4:0] ADC_CHNR;
output[4:0] EV_CHHOLD;wire[4:0] EV_CHHOLD;input[EV_ASIZE - 1:0] INIT_ADDR;input
INIT_EV_WR;input[8:0] INIT_DI;input INIT_DONE;input[EV_ASIZE - 1:0]
USER_EV_ADDR;input USER_EV_RD;output USER_EV_RAM_BUSY;wire USER_EV_RAM_BUSY;
input[EV_ASIZE - 1:0] TR_EV_ADDR;input TR_EV_RD;output EV_EVFLAG;wire EV_EVFLAG;
output EV_DONE;wire EV_DONE;output[8:0] EV_ASSC_ADDR;wire[8:0] EV_ASSC_ADDR;
output EV_ASSC_RD;wire EV_ASSC_RD;input[8:0] ASSC_RAM_DO_A;input
ASSC_RAM_WR_BUSY_B;output[EV_ASIZE - 1:0] EV_RAM_ADDR_A;wire[EV_ASIZE - 1:0]
EV_RAM_ADDR_A;output EV_RAM_RW_A;wire EV_RAM_RW_A;output EV_RAM_CSN_A;wire
EV_RAM_CSN_A;output[8:0] EV_RAM_DI_A;wire[8:0] EV_RAM_DI_A;output[EV_ASIZE -
1:0] EV_RAM_ADDR_B;wire[EV_ASIZE - 1:0] EV_RAM_ADDR_B;output EV_RAM_RW_B;wire
EV_RAM_RW_B;output EV_RAM_CSN_B;wire EV_RAM_CSN_B;output[8:0] EV_RAM_DI_B;
wire[8:0] EV_RAM_DI_B;input[8:0] EV_RAM_DO_B;output EV_RAM_WR_BUSY_B;wire
EV_RAM_WR_BUSY_B;nbnjbfrkqwq #(.xpcbfxxdxkn(TS_WIDTH),.nktdnxxpfkw(
ALLOW_USER_EV),.ggtrvzfhvzg(ALLOW_DLPF),.wqxrhkntcsq(ALLOW_A_PLUS_B),
.fnkkfbknbsc(ALLOW_A_MINUS_B),.cvjhxdkdhtp(ALLOW_A_GT_B),.tbfvnhctzpk(EV_ASIZE),
.gzpxmwsppbw(ST_CNT_WIDTH),.gqvfcjcxrbx(USE_NON_G3))u_nbnjbfrkqwq(.ncpstvtwqnj(
CLK),.rpfzgwrwdkg(NRESET),.gcmhrkbppgk(ASSC_SEQOUT),.jbwprskzkqd(ASSC_SEQCHANGE)
,.hjpffdxwpbw(ASSC_DONE),.ddpxkdxnzzm(ASSC_SAMPFLAG),.cvgrnnhzfgx(ADC_CHNR),
.pmnnjbksbnp(EV_CHHOLD),.xmpjfckcwxc(INIT_ADDR),.mxgpfwdmwkr(INIT_EV_WR),
.kphbsmpswkm(INIT_DI),.hfzgjxkdrpz(INIT_DONE),.zxrxtxxbsks(USER_EV_ADDR),
.zhkvvfnsbjb(USER_EV_RD),.ftjpqbkvjxw(USER_EV_RAM_BUSY),.mhxzjtkwkbd(TR_EV_ADDR)
,.rnzjdwddzmq(TR_EV_RD),.brfcnbqvhcm(EV_EVFLAG),.tbjwqrfwfrn(EV_DONE),
.dsvtxghkjbb(EV_ASSC_ADDR),.ddbbjvkdkcq(EV_ASSC_RD),.hvbjzpshknp(ASSC_RAM_DO_A),
.mqmgjkmdztb(ASSC_RAM_WR_BUSY_B),.mkmkbnghgkd(EV_RAM_ADDR_A),.pfbntnkqtmt(
EV_RAM_RW_A),.zcjzqnkdqwb(EV_RAM_CSN_A),.rrjdhmvhdjx(EV_RAM_DI_A),.djdxztmwwqc(
EV_RAM_ADDR_B),.zbcrjjxqjgg(EV_RAM_RW_B),.kkjrqmngvjc(EV_RAM_CSN_B),
.zbqggxmnpbs(EV_RAM_DI_B),.jrgzmrqhbkv(EV_RAM_DO_B),.frhjqwkkhgk(
EV_RAM_WR_BUSY_B));endmodule
