// REVISION    : $Revision: 1.6 $
//                   MENTOR Proprietary and Confidential
//                       Copyright (c) 2002, MENTOR
`timescale 1ps/1ps
module
CoreTSE_M2S090_CORETSE_AHB_0_AMCXRFIF_FAB
#
(
parameter
FAMILY
=
19
,
parameter
RABITS
=
12
,
parameter
CORETSEi00i
=
32
,
parameter
CORETSEO10i
=
$clog2
(
CORETSEi00i
/
8
)
)
(
CORETSEli0i
,
CORETSEolii
,
CORETSEoioi
,
CORETSEoi0i
,
CORETSEo01i
,
CORETSEoo1i
,
CORETSEio1i
,
CORETSEOi1i
,
CORETSEiIii
,
CORETSEOlii
,
CORETSElOoi
,
CORETSEl01i
,
CORETSEoO1i
,
CORETSEiO1i
,
CORETSEOI1i
,
CORETSEII1i
,
CORETSElI1i
,
CORETSEOo1i
,
CORETSEIo1i
,
CORETSElo1i
,
CORETSElloi
,
CORETSEoloi
)
;
input
CORETSEli0i
;
input
CORETSEolii
;
input
CORETSEoioi
;
input
CORETSEoi0i
;
input
[
(
CORETSEi00i
+
4
)
-
1
:
0
]
CORETSEo01i
;
input
[
RABITS
:
0
]
CORETSEoo1i
;
input
CORETSEio1i
;
input
CORETSEOi1i
;
input
[
RABITS
+
1
:
0
]
CORETSEiIii
;
input
CORETSEOlii
;
output
CORETSElOoi
;
output
[
(
RABITS
-
1
)
:
0
]
CORETSEl01i
;
output
[
(
CORETSEi00i
-
1
)
:
0
]
CORETSEoO1i
;
output
CORETSEiO1i
;
output
CORETSEOI1i
;
output
[
1
:
0
]
CORETSEII1i
;
output
CORETSElI1i
;
output
CORETSEOo1i
;
output
[
RABITS
:
0
]
CORETSEIo1i
;
output
CORETSElo1i
;
output
CORETSElloi
;
output
[
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
:
0
]
CORETSEoloi
;
parameter
CORETSEOlIOI
=
{
(
RABITS
+
1
)
{
1
'b
0
}
}
;
parameter
CORETSEOII
=
1
;
wire
CORETSEIlIOI
;
reg
CORETSEllIOI
;
reg
[
RABITS
:
0
]
CORETSEolIOI
;
wire
[
RABITS
:
0
]
CORETSEilIOI
;
wire
[
RABITS
:
0
]
CORETSEO0IOI
;
reg
[
RABITS
:
0
]
CORETSEI0IOI
;
reg
CORETSElOoi
;
reg
CORETSEl0IOI
;
reg
CORETSEOo1i
;
reg
CORETSElo1i
;
reg
[
RABITS
:
0
]
CORETSEIo1i
;
reg
CORETSEo0IOI
,
CORETSEi0IOI
;
reg
CORETSEO1IOI
,
CORETSEI1IOI
;
reg
CORETSEl1IOI
,
CORETSEo1IOI
;
reg
[
(
CORETSEi00i
+
4
)
-
1
:
0
]
CORETSEi1IOI
;
reg
[
(
CORETSEi00i
+
4
)
-
1
:
0
]
CORETSEOoIOI
;
reg
[
(
CORETSEi00i
+
4
)
-
1
:
0
]
CORETSEIoIOI
;
reg
[
(
CORETSEi00i
+
4
)
-
1
:
0
]
CORETSEloIOI
;
reg
[
3
:
0
]
CORETSEooIOI
;
wire
CORETSElI1i
;
reg
[
(
CORETSEi00i
+
CORETSEO10i
+
6
)
-
1
:
0
]
CORETSEoloi
;
reg
CORETSElloi
;
reg
CORETSEioIOI
;
reg
CORETSEOiIOI
;
reg
CORETSEIiIOI
;
wire
CORETSEliIOI
;
wire
CORETSEoiIOI
;
reg
CORETSEiiIOI
;
wire
CORETSElo1
;
wire
CORETSEoo1
;
//      generate logic as part of synthesis results.
assign
CORETSElo1
=
(
FAMILY
==
25
)
?
1
'b
0
:
CORETSEolii
;
assign
CORETSEoo1
=
(
FAMILY
==
25
)
?
CORETSEolii
:
1
'b
0
;
wire
[
(
RABITS
-
1
)
:
0
]
#
1000
CORETSEl01i
=
(
{
RABITS
{
~
(
~
CORETSEiIii
[
RABITS
+
1
]
&
CORETSEliIOI
)
}
}
&
(
CORETSEilIOI
[
(
RABITS
-
1
)
:
0
]
-
'd
1
)
)
|
(
{
RABITS
{
(
~
CORETSEiIii
[
RABITS
+
1
]
&
CORETSEliIOI
)
}
}
&
(
CORETSEiIii
[
(
RABITS
-
1
)
:
0
]
)
)
;
assign
CORETSEO0IOI
=
CORETSEI0IOI
+
1
'b
1
;
assign
CORETSEIlIOI
=
(
(
CORETSEolIOI
[
RABITS
:
0
]
!=
CORETSEI0IOI
[
RABITS
:
0
]
)
&
CORETSElOoi
&
~
CORETSEooIOI
[
1
]
)
;
assign
CORETSEilIOI
=
CORETSEIlIOI
?
CORETSEO0IOI
:
CORETSEI0IOI
;
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEI0IOI
<=
#
CORETSEOII
CORETSEOlIOI
;
else
CORETSEI0IOI
<=
#
CORETSEOII
CORETSEilIOI
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEllIOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEllIOI
<=
#
CORETSEOII
CORETSEIlIOI
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEiiIOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEiiIOI
<=
#
CORETSEOII
CORETSEllIOI
;
end
generate
if
(
FAMILY
==
25
)
begin
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
begin
CORETSEi1IOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEOoIOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEIoIOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEloIOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
0
;
end
else
begin
case
(
{
CORETSEoi0i
,
CORETSEiiIOI
,
CORETSEooIOI
}
)
6
'b
010000
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
8
;
end
6
'b
011000
:
begin
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
C
;
end
6
'b
011100
:
begin
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
E
;
end
6
'b
011110
:
begin
CORETSEi1IOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
F
;
end
6
'b
101000
:
CORETSEooIOI
<=
#
CORETSEOII
4
'h
0
;
6
'b
101100
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
8
;
end
6
'b
101110
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
C
;
end
6
'b
101111
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEi1IOI
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
E
;
end
6
'b
110000
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
8
;
end
6
'b
111000
:
CORETSEloIOI
<=
#
CORETSEOII
CORETSEo01i
;
6
'b
111100
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEo01i
;
end
6
'b
111110
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEo01i
;
end
6
'b
111111
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEi1IOI
;
CORETSEi1IOI
<=
#
CORETSEOII
CORETSEo01i
;
end
default
:
begin
CORETSEi1IOI
<=
#
CORETSEOII
CORETSEi1IOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEloIOI
<=
#
CORETSEOII
CORETSEloIOI
;
CORETSEooIOI
<=
#
CORETSEOII
CORETSEooIOI
;
end
endcase
end
end
end
else
begin
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
begin
CORETSEi1IOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEOoIOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEIoIOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEloIOI
<=
#
CORETSEOII
{
(
CORETSEi00i
+
4
)
{
1
'b
0
}
}
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
0
;
end
else
begin
case
(
{
CORETSEoi0i
,
CORETSEllIOI
,
CORETSEooIOI
}
)
6
'b
010000
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
8
;
end
6
'b
011000
:
begin
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
C
;
end
6
'b
011100
:
begin
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
E
;
end
6
'b
011110
:
begin
CORETSEi1IOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
F
;
end
6
'b
101000
:
CORETSEooIOI
<=
#
CORETSEOII
4
'h
0
;
6
'b
101100
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
8
;
end
6
'b
101110
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
C
;
end
6
'b
101111
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEi1IOI
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
E
;
end
6
'b
110000
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEo01i
;
CORETSEooIOI
<=
#
CORETSEOII
4
'h
8
;
end
6
'b
111000
:
CORETSEloIOI
<=
#
CORETSEOII
CORETSEo01i
;
6
'b
111100
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEo01i
;
end
6
'b
111110
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEo01i
;
end
6
'b
111111
:
begin
CORETSEloIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEi1IOI
;
CORETSEi1IOI
<=
#
CORETSEOII
CORETSEo01i
;
end
default
:
begin
CORETSEi1IOI
<=
#
CORETSEOII
CORETSEi1IOI
;
CORETSEOoIOI
<=
#
CORETSEOII
CORETSEOoIOI
;
CORETSEIoIOI
<=
#
CORETSEOII
CORETSEIoIOI
;
CORETSEloIOI
<=
#
CORETSEOII
CORETSEloIOI
;
CORETSEooIOI
<=
#
CORETSEOII
CORETSEooIOI
;
end
endcase
end
end
end
endgenerate
assign
{
CORETSEiO1i
,
CORETSEOI1i
,
CORETSEII1i
,
CORETSEoO1i
}
=
CORETSEloIOI
;
assign
CORETSElI1i
=
CORETSEooIOI
[
3
]
;
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEl0IOI
<=
#
CORETSEOII
1
'h
0
;
else
if
(
CORETSElI1i
&
CORETSEoi0i
&
CORETSEiO1i
)
CORETSEl0IOI
<=
#
CORETSEOII
1
'h
1
;
else
if
(
CORETSElI1i
&
CORETSEoi0i
&
CORETSEOI1i
)
CORETSEl0IOI
<=
#
CORETSEOII
1
'h
0
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSElOoi
<=
#
CORETSEOII
1
'h
0
;
else
if
(
CORETSEl1IOI
)
CORETSElOoi
<=
#
CORETSEOII
1
'h
1
;
else
if
(
~
CORETSEl0IOI
&
(
CORETSEolIOI
[
RABITS
:
0
]
!=
CORETSEI0IOI
[
RABITS
:
0
]
)
)
CORETSElOoi
<=
#
CORETSEOII
1
'h
0
;
else
CORETSElOoi
<=
#
CORETSEOII
1
'h
0
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSElo1i
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSEO1IOI
)
CORETSElo1i
<=
#
CORETSEOII
1
'b
0
;
else
CORETSElo1i
<=
#
CORETSEOII
1
'b
1
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEIo1i
<=
#
CORETSEOII
CORETSEOlIOI
;
else
if
(
~
CORETSElo1i
&
~
CORETSEO1IOI
)
CORETSEIo1i
<=
#
CORETSEOII
CORETSEI0IOI
[
RABITS
:
0
]
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEOo1i
<=
#
CORETSEOII
1
'b
0
;
else
if
(
~
CORETSEo0IOI
)
CORETSEOo1i
<=
#
CORETSEOII
1
'b
0
;
else
if
(
CORETSEo0IOI
)
CORETSEOo1i
<=
#
CORETSEOII
1
'b
1
;
end
generate
if
(
FAMILY
==
25
)
begin
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEolIOI
<=
#
CORETSEOII
CORETSEOlIOI
;
else
if
(
CORETSEo0IOI
&
CORETSEOo1i
)
CORETSEolIOI
<=
#
CORETSEOII
CORETSEoo1i
;
end
end
else
begin
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEolIOI
<=
#
CORETSEOII
CORETSEOlIOI
;
else
if
(
CORETSEo0IOI
&
~
CORETSEOo1i
)
CORETSEolIOI
<=
#
CORETSEOII
CORETSEoo1i
;
end
end
endgenerate
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEI1IOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEI1IOI
<=
#
CORETSEOII
CORETSEOi1i
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEO1IOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEO1IOI
<=
#
CORETSEOII
CORETSEI1IOI
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEi0IOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEi0IOI
<=
#
CORETSEOII
CORETSEio1i
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEo0IOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEo0IOI
<=
#
CORETSEOII
CORETSEi0IOI
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEioIOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEioIOI
<=
#
CORETSEOII
CORETSEOlii
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEOiIOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEOiIOI
<=
#
CORETSEOII
CORETSEioIOI
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEIiIOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEIiIOI
<=
#
CORETSEOII
CORETSEOiIOI
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSElloi
<=
#
CORETSEOII
1
'b
0
;
else
CORETSElloi
<=
#
CORETSEOII
CORETSEIiIOI
;
end
assign
CORETSEliIOI
=
CORETSEOiIOI
&
~
CORETSEIiIOI
;
assign
CORETSEoiIOI
=
CORETSEIiIOI
&
~
CORETSElloi
;
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEoloi
<=
#
CORETSEOII
{
(
CORETSEi00i
+
CORETSEO10i
+
6
)
{
1
'b
0
}
}
;
else
if
(
~
CORETSEiIii
[
RABITS
+
1
]
&
CORETSEoiIOI
)
CORETSEoloi
<=
#
CORETSEOII
{
{
(
CORETSEO10i
+
2
)
{
1
'b
0
}
}
,
CORETSEo01i
}
;
else
if
(
CORETSEiIii
[
RABITS
+
1
]
&
CORETSEliIOI
)
CORETSEoloi
<=
#
CORETSEOII
CORETSEilIOI
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEo1IOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEo1IOI
<=
#
CORETSEOII
CORETSEoioi
;
end
always
@
(
posedge
CORETSEli0i
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEl1IOI
<=
#
CORETSEOII
1
'b
0
;
else
CORETSEl1IOI
<=
#
CORETSEOII
CORETSEo1IOI
;
end
endmodule
