// REVISION    : $Revision: 1.8 $
//                   MENTOR Proprietary and Confidential
//                       Copyright (c) 2002, MENTOR
`timescale 1ps/1ps
module
CoreTSE_M2S090_CORETSE_AHB_0_AMCXTFIF_SYS
#
(
parameter
FAMILY
=
19
,
parameter
TABITS
=
12
,
parameter
CORETSEi00i
=
32
,
parameter
CORETSEO10i
=
$clog2
(
CORETSEi00i
/
8
)
,
parameter
CORETSEO
=
0
)
(
CORETSEIli0
,
CORETSElli0
,
CORETSEllii
,
CORETSElioi
,
CORETSEol1i
,
CORETSEoo1I
,
CORETSEIi1I
,
CORETSEOi1I
,
CORETSEli1I
,
CORETSEl11i
,
CORETSEo11i
,
CORETSEi11i
,
CORETSEiOii
,
CORETSEOIii
,
CORETSEIOoi
,
CORETSEll1i
,
CORETSEO00I
,
CORETSElI1I
,
CORETSEiI1I
,
CORETSEII1I
,
CORETSEIo0l
,
CORETSEOO1I
,
CORETSElO1I
,
CORETSEIO1I
,
CORETSEi01i
,
CORETSEO11i
,
CORETSEI11i
,
CORETSEoIoi
,
CORETSEiIoi
)
;
input
CORETSEIli0
;
input
CORETSElli0
;
input
CORETSEllii
;
input
CORETSElioi
;
input
[
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
:
0
]
CORETSEol1i
;
input
CORETSEoo1I
;
input
CORETSEIi1I
;
input
CORETSEOi1I
;
input
CORETSEli1I
;
input
[
TABITS
:
0
]
CORETSEl11i
;
input
CORETSEo11i
;
input
CORETSEi11i
;
input
[
TABITS
+
1
:
0
]
CORETSEiOii
;
input
CORETSEOIii
;
output
CORETSEIOoi
;
output
[
(
TABITS
-
1
)
:
0
]
CORETSEll1i
;
output
[
7
:
0
]
CORETSEO00I
;
output
CORETSElI1I
;
output
CORETSEiI1I
;
output
CORETSEII1I
;
output
CORETSEIo0l
;
output
CORETSEOO1I
;
output
CORETSElO1I
;
output
CORETSEIO1I
;
output
CORETSEi01i
;
output
[
TABITS
:
0
]
CORETSEO11i
;
output
CORETSEI11i
;
output
CORETSEoIoi
;
output
[
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
:
0
]
CORETSEiIoi
;
parameter
CORETSEOlIOI
=
{
(
TABITS
+
1
)
{
1
'b
0
}
}
;
parameter
CORETSEiO1OI
=
{
(
TABITS
+
(
CORETSEO10i
+
1
)
)
{
1
'b
0
}
}
;
parameter
CORETSEOII
=
1
;
reg
[
5
:
0
]
CORETSEOI1OI
;
reg
CORETSEII1OI
;
wire
CORETSElI1OI
;
reg
CORETSEoI1OI
;
reg
CORETSEiI1OI
;
reg
CORETSEOl1OI
;
reg
[
TABITS
:
0
]
CORETSEIl1OI
;
wire
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEilIOI
;
wire
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEll1OI
;
wire
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEol1OI
;
wire
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEO0IOI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEil1OI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEO01OI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEI01OI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEl01OI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEo01OI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEi01OI
;
wire
CORETSEO11OI
;
reg
[
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
:
0
]
CORETSEI11OI
;
wire
CORETSEIOoi
;
reg
[
TABITS
:
0
]
CORETSEO11i
;
reg
CORETSEI11i
;
reg
CORETSEi01i
;
reg
CORETSEl11OI
;
reg
CORETSEI00OI
;
reg
CORETSEo11OI
;
reg
CORETSEi11OI
;
reg
CORETSEOo1OI
;
reg
CORETSEIo1OI
;
wire
CORETSElo1OI
;
wire
CORETSElO1I
;
reg
CORETSEoo1OI
;
reg
CORETSEio1OI
;
reg
CORETSEIO1I
;
wire
CORETSElI1I
;
wire
CORETSEiI1I
;
wire
CORETSEII1I
;
wire
CORETSEIo0l
;
wire
CORETSEOO1I
;
reg
CORETSEOi1OI
;
reg
CORETSEIi1OI
;
reg
CORETSEli1OI
;
reg
[
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
:
0
]
CORETSEiIoi
;
reg
CORETSEoIoi
;
reg
CORETSEoi1OI
;
reg
CORETSEii1OI
;
reg
CORETSEOOoOI
;
reg
CORETSEIOoOI
;
wire
CORETSElOoOI
;
wire
CORETSEoOoOI
;
reg
CORETSEiOoOI
;
reg
CORETSEOIoOI
;
reg
CORETSEIIoOI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSElIoOI
;
reg
[
TABITS
+
CORETSEO10i
:
0
]
CORETSEoIoOI
;
reg
[
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
:
0
]
CORETSEiIoOI
;
wire
CORETSElo1
;
wire
CORETSEoo1
;
//     generate logic as part of synthesis results.
assign
CORETSElo1
=
(
FAMILY
==
25
)
?
1
'b
0
:
CORETSEllii
;
assign
CORETSEoo1
=
(
FAMILY
==
25
)
?
CORETSEllii
:
1
'b
0
;
wire
[
(
TABITS
-
1
)
:
0
]
#
1000
CORETSEll1i
=
CORETSEO01OI
[
(
TABITS
+
(
CORETSEO10i
-
1
)
)
:
CORETSEO10i
]
;
assign
CORETSElI1OI
=
(
(
CORETSEIl1OI
[
(
TABITS
)
]
==
CORETSEll1OI
[
(
TABITS
+
CORETSEO10i
)
]
)
&
(
CORETSEIl1OI
[
(
TABITS
-
1
)
:
0
]
>
CORETSEll1OI
[
(
TABITS
+
CORETSEO10i
-
1
)
:
CORETSEO10i
]
)
)
|
(
(
CORETSEIl1OI
[
(
TABITS
)
]
!=
CORETSEll1OI
[
(
TABITS
+
CORETSEO10i
)
]
)
&
(
CORETSEIl1OI
[
(
TABITS
-
1
)
:
0
]
<=
CORETSEll1OI
[
(
TABITS
+
CORETSEO10i
-
1
)
:
CORETSEO10i
]
)
)
;
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEoI1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
CORETSEoI1OI
<=
#
CORETSEOII
CORETSElI1OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEiI1OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEiI1OI
<=
#
CORETSEOII
CORETSEoI1OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEOl1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
&
(
(
CORETSEoo1I
&
(
CORETSEo01OI
[
CORETSEO10i
-
1
:
0
]
==
{
CORETSEO10i
{
1
'h
1
}
}
)
)
|
CORETSEOI1OI
[
1
]
|
CORETSEOI1OI
[
5
]
|
CORETSEOI1OI
[
3
]
)
)
CORETSEOl1OI
<=
#
CORETSEOII
CORETSEiI1OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
01
;
else
if
(
CORETSElli0
)
case
(
CORETSEOI1OI
)
6
'h
01
:
if
(
CORETSEoI1OI
&
CORETSEOo1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
02
;
else
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
01
;
6
'h
02
:
if
(
CORETSEOi1I
&
~
CORETSEIi1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
08
;
else
if
(
CORETSEoo1I
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
04
;
else
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
02
;
6
'h
04
:
if
(
~
CORETSEOl1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
08
;
else
if
(
CORETSEOi1I
&
~
CORETSEIi1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
10
;
else
if
(
CORETSEIi1I
&
~
CORETSEOi1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
20
;
else
if
(
CORETSEOl1OI
&
~
CORETSElo1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
04
;
else
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
01
;
6
'h
08
:
if
(
CORETSElo1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
01
;
else
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
08
;
6
'h
10
:
if
(
~
CORETSEoo1I
&
~
CORETSEli1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
01
;
else
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
10
;
6
'h
20
:
if
(
CORETSEOl1OI
&
~
CORETSElo1OI
)
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
20
;
else
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
01
;
default
:
CORETSEOI1OI
<=
#
CORETSEOII
6
'h
01
;
endcase
end
assign
CORETSEIOoi
=
CORETSEOo1OI
|
~
CORETSEOI1OI
[
0
]
;
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEII1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
CORETSEII1OI
<=
#
CORETSEOII
CORETSEOI1OI
[
1
]
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEOi1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
CORETSEOi1OI
<=
#
CORETSEOII
CORETSEIi1I
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEIi1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
CORETSEIi1OI
<=
#
CORETSEOII
CORETSEOi1I
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEli1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
CORETSEli1OI
<=
#
CORETSEOII
CORETSEoo1I
;
end
assign
CORETSEol1OI
=
(
CORETSEil1OI
[
(
TABITS
+
CORETSEO10i
)
:
0
]
+
1
)
;
assign
CORETSEO0IOI
=
(
{
CORETSEl01OI
[
(
TABITS
+
CORETSEO10i
)
:
CORETSEO10i
]
,
{
CORETSEO10i
{
1
'b
0
}
}
}
+
(
CORETSEi00i
/
8
)
)
;
assign
CORETSEilIOI
=
(
CORETSEOI1OI
[
4
]
)
?
CORETSEi01OI
:
(
(
CORETSEOI1OI
[
2
]
|
CORETSEOI1OI
[
3
]
|
CORETSEOI1OI
[
5
]
)
&
CORETSElo1OI
)
?
CORETSEO0IOI
:
(
CORETSEoI1OI
&
(
(
(
|
CORETSEOI1OI
[
2
:
1
]
)
&
CORETSEoo1I
)
|
CORETSEOI1OI
[
3
]
|
CORETSEOI1OI
[
5
]
)
)
?
CORETSEol1OI
:
CORETSEil1OI
;
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEil1OI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
CORETSElli0
)
CORETSEil1OI
<=
#
CORETSEOII
CORETSEilIOI
;
end
assign
CORETSEll1OI
=
CORETSEilIOI
+
1
;
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEO01OI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
~
CORETSEiOii
[
TABITS
+
1
]
&
CORETSElOoOI
)
CORETSEO01OI
<=
#
CORETSEOII
{
CORETSEiOii
[
TABITS
:
0
]
,
{
CORETSEO10i
{
1
'h
0
}
}
}
;
else
if
(
CORETSElli0
)
CORETSEO01OI
<=
#
CORETSEOII
CORETSEll1OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEI01OI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
CORETSEI01OI
<=
#
CORETSEOII
CORETSEO01OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEo01OI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
CORETSElli0
&
(
CORETSEoo1I
|
CORETSEOI1OI
[
5
]
|
CORETSEOI1OI
[
3
]
)
)
CORETSEo01OI
<=
#
CORETSEOII
CORETSEil1OI
;
end
generate
if
(
FAMILY
==
25
)
begin
always
@
(
posedge
CORETSEIli0
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSElIoOI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
CORETSElli0
&
(
CORETSEoo1I
|
CORETSEOI1OI
[
5
]
|
CORETSEOI1OI
[
3
]
)
)
CORETSElIoOI
<=
#
CORETSEOII
CORETSEo01OI
;
end
always
@
(
posedge
CORETSEIli0
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEoIoOI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
CORETSElli0
&
(
CORETSEoo1I
|
CORETSEOI1OI
[
5
]
|
CORETSEOI1OI
[
3
]
)
)
CORETSEoIoOI
<=
#
CORETSEOII
CORETSElIoOI
;
end
end
endgenerate
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEi01OI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
CORETSElli0
&
CORETSEOI1OI
[
1
]
&
~
CORETSEII1OI
)
CORETSEi01OI
<=
#
CORETSEOII
CORETSEilIOI
;
end
assign
CORETSEO11OI
=
CORETSEiI1OI
&
(
(
CORETSEoo1I
&
(
CORETSEo01OI
[
(
CORETSEO10i
-
1
)
:
0
]
==
{
CORETSEO10i
{
1
'h
1
}
}
)
)
|
CORETSEOI1OI
[
1
]
|
CORETSEOI1OI
[
5
]
|
CORETSEOI1OI
[
3
]
)
;
generate
if
(
FAMILY
==
25
)
begin
always
@
(
posedge
CORETSEIli0
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEiOoOI
<=
#
CORETSEOII
'h
0
;
else
CORETSEiOoOI
<=
#
CORETSEOII
CORETSEO11OI
;
end
always
@
(
posedge
CORETSEIli0
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEOIoOI
<=
#
CORETSEOII
'h
0
;
else
CORETSEOIoOI
<=
#
CORETSEOII
CORETSEiOoOI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEI11OI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
CORETSEO10i
+
6
)
{
1
'b
0
}
}
;
else
if
(
CORETSElli0
&
CORETSEiOoOI
)
CORETSEI11OI
<=
#
CORETSEOII
CORETSEol1i
;
end
always
@
(
posedge
CORETSEIli0
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEiIoOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
CORETSEO10i
+
6
)
{
1
'b
0
}
}
;
else
if
(
CORETSElli0
&
CORETSEOIoOI
)
CORETSEiIoOI
<=
#
CORETSEOII
CORETSEI11OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEl01OI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
CORETSElli0
&
CORETSEOIoOI
)
CORETSEl01OI
<=
#
CORETSEOII
CORETSEI01OI
;
end
end
else
begin
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEI11OI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
CORETSEO10i
+
6
)
{
1
'b
0
}
}
;
else
if
(
CORETSElli0
&
CORETSEO11OI
)
CORETSEI11OI
<=
#
CORETSEOII
CORETSEol1i
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEl01OI
<=
#
CORETSEOII
CORETSEiO1OI
;
else
if
(
CORETSElli0
&
CORETSEO11OI
)
CORETSEl01OI
<=
#
CORETSEOII
CORETSEI01OI
;
end
end
endgenerate
assign
CORETSEOO1I
=
CORETSEOI1OI
[
1
]
;
generate
if
(
FAMILY
==
25
)
assign
CORETSElo1OI
=
CORETSEio1OI
&
(
CORETSEoo1OI
|
(
CORETSEiIoOI
[
CORETSEi00i
+
CORETSEO10i
]
&
(
CORETSEoIoOI
[
(
CORETSEO10i
-
1
)
:
0
]
==
(
(
(
CORETSEi00i
/
8
)
-
1
)
-
CORETSEiIoOI
[
CORETSEi00i
+:
CORETSEO10i
]
)
)
)
)
;
else
assign
CORETSElo1OI
=
CORETSEio1OI
&
(
CORETSEoo1OI
|
(
CORETSEI11OI
[
CORETSEi00i
+
CORETSEO10i
]
&
(
CORETSEo01OI
[
(
CORETSEO10i
-
1
)
:
0
]
==
(
(
(
CORETSEi00i
/
8
)
-
1
)
-
CORETSEI11OI
[
CORETSEi00i
+:
CORETSEO10i
]
)
)
)
)
;
endgenerate
assign
CORETSElO1I
=
CORETSElo1OI
&
~
CORETSEIO1I
;
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEIO1I
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
CORETSEIO1I
<=
#
CORETSEOII
CORETSEOI1OI
[
3
]
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEoo1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
CORETSEoo1OI
<=
#
CORETSEOII
CORETSElo1OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEio1OI
<=
#
CORETSEOII
1
'b
1
;
else
if
(
CORETSElli0
&
CORETSEoo1OI
)
CORETSEio1OI
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
&
CORETSEOI1OI
[
2
]
)
CORETSEio1OI
<=
#
CORETSEOII
1
'b
1
;
end
generate
if
(
FAMILY
==
25
)
assign
CORETSEO00I
=
CORETSEiIoOI
[
CORETSEoIoOI
[
(
CORETSEO10i
-
1
)
:
0
]
*
8
+:
8
]
;
else
assign
CORETSEO00I
=
CORETSEI11OI
[
CORETSEo01OI
[
(
CORETSEO10i
-
1
)
:
0
]
*
8
+:
8
]
;
endgenerate
assign
CORETSElI1I
=
CORETSEI11OI
[
CORETSEi00i
+
3
]
;
assign
CORETSEiI1I
=
CORETSEI11OI
[
CORETSEi00i
+
4
]
;
assign
CORETSEII1I
=
CORETSEI11OI
[
CORETSEi00i
+
5
]
;
assign
CORETSEIo0l
=
CORETSEI11OI
[
CORETSEi00i
+
7
]
;
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEI11i
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
)
begin
if
(
CORETSEo11OI
)
CORETSEI11i
<=
#
CORETSEOII
1
'b
0
;
else
if
(
(
~
CORETSEoo1OI
&
CORETSElo1OI
)
|
(
~
CORETSEI11i
&
~
CORETSEo11OI
&
~
CORETSEli1I
&
(
CORETSEO11i
!=
CORETSEil1OI
[
TABITS
+
CORETSEO10i
:
CORETSEO10i
]
)
)
)
CORETSEI11i
<=
#
CORETSEOII
1
'b
1
;
end
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEO11i
<=
#
CORETSEOII
CORETSEOlIOI
;
else
if
(
CORETSElli0
&
~
CORETSEI11i
&
~
CORETSEo11OI
&
(
(
~
CORETSEoo1OI
&
CORETSElo1OI
)
|
(
(
CORETSEO11i
!=
CORETSEil1OI
[
TABITS
+
CORETSEO10i
:
CORETSEO10i
]
)
)
)
)
CORETSEO11i
<=
#
CORETSEOII
CORETSEil1OI
[
(
TABITS
+
CORETSEO10i
)
:
CORETSEO10i
]
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEi01i
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
&
~
CORETSEl11OI
)
CORETSEi01i
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSElli0
&
CORETSEl11OI
)
CORETSEi01i
<=
#
CORETSEOII
1
'b
1
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEIl1OI
<=
#
CORETSEOII
CORETSEOlIOI
;
else
if
(
CORETSElli0
&
CORETSEl11OI
&
~
CORETSEi01i
)
CORETSEIl1OI
<=
#
CORETSEOII
CORETSEl11i
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEi11OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEi11OI
<=
#
CORETSEOII
CORETSEi11i
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEo11OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEo11OI
<=
#
CORETSEOII
CORETSEi11OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEI00OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEI00OI
<=
#
CORETSEOII
CORETSEo11i
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEl11OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEl11OI
<=
#
CORETSEOII
CORETSEI00OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEoi1OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEoi1OI
<=
#
CORETSEOII
CORETSEOIii
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEii1OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEii1OI
<=
#
CORETSEOII
CORETSEoi1OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEOOoOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEOOoOI
<=
#
CORETSEOII
CORETSEii1OI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEIOoOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEIOoOI
<=
#
CORETSEOII
CORETSEOOoOI
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEoIoi
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEoIoi
<=
#
CORETSEOII
CORETSEIOoOI
;
end
assign
CORETSElOoOI
=
CORETSEii1OI
&
~
CORETSEOOoOI
;
assign
CORETSEoOoOI
=
CORETSEIOoOI
&
~
CORETSEoIoi
;
generate
if
(
FAMILY
==
25
)
begin
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEiIoi
<=
#
CORETSEOII
{
(
CORETSEi00i
+
CORETSEO10i
+
6
)
{
1
'b
0
}
}
;
else
if
(
~
CORETSEiOii
[
TABITS
+
1
]
&
CORETSEoOoOI
)
CORETSEiIoi
<=
#
CORETSEOII
CORETSEI11OI
;
else
if
(
CORETSEiOii
[
TABITS
+
1
]
&
CORETSElOoOI
)
CORETSEiIoi
<=
#
CORETSEOII
{
{
(
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
)
-
TABITS
{
1
'b
0
}
}
,
CORETSEO01OI
[
TABITS
+
CORETSEO10i
:
CORETSEO10i
]
}
;
end
end
else
begin
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEiIoi
<=
#
CORETSEOII
{
(
CORETSEi00i
+
CORETSEO10i
+
6
)
{
1
'b
0
}
}
;
else
if
(
~
CORETSEiOii
[
TABITS
+
1
]
&
CORETSEoOoOI
)
CORETSEiIoi
<=
#
CORETSEOII
CORETSEol1i
;
else
if
(
CORETSEiOii
[
TABITS
+
1
]
&
CORETSElOoOI
)
CORETSEiIoi
<=
#
CORETSEOII
{
{
(
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
)
-
TABITS
{
1
'b
0
}
}
,
CORETSEll1OI
[
TABITS
+
CORETSEO10i
:
CORETSEO10i
]
}
;
end
end
endgenerate
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEIo1OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEIo1OI
<=
#
CORETSEOII
CORETSElioi
;
end
always
@
(
posedge
CORETSEIli0
or
posedge
CORETSElo1
)
begin
if
(
CORETSElo1
||
CORETSEoo1
)
CORETSEOo1OI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEOo1OI
<=
#
CORETSEOII
CORETSEIo1OI
;
end
endmodule
