// REVISION    : $Revision: 1.1 $
// Mentor Graphics Corporation Proprietary and Confidential
// Copyright 2007 Mentor Graphics Corporation and Licensors
`timescale 1ps/1ps
module
CoreTSE_M2S090_CORETSE_AHB_0_MSGMII_CNVRXI
(
CORETSEI0OI
,
CORETSElIOI
,
CORETSEli0II
,
CORETSEoi0II
,
CORETSEii0II
,
CORETSEOO1II
,
CORETSEIO1II
,
CORETSElO1II
,
CORETSEoO1II
,
CORETSEiO1II
,
CORETSEOI1II
,
CORETSEII1II
,
CORETSElI
,
CORETSElI1II
,
CORETSEoI1II
,
CORETSEOOo0
)
;
parameter
FAMILY
=
19
;
input
CORETSEI0OI
;
input
CORETSElIOI
;
input
[
1
:
0
]
CORETSEli0II
;
input
[
15
:
0
]
CORETSEoi0II
;
input
[
1
:
0
]
CORETSEii0II
;
input
[
1
:
0
]
CORETSEOO1II
;
input
CORETSEIO1II
;
input
[
3
:
0
]
CORETSElO1II
;
input
CORETSEOOo0
;
output
[
7
:
0
]
CORETSEoO1II
;
output
CORETSEiO1II
;
output
CORETSEOI1II
;
output
CORETSEII1II
;
output
CORETSElI
;
output
CORETSElI1II
;
output
[
3
:
0
]
CORETSEoI1II
;
`define CORETSEOII  \
# \
1
reg
[
15
:
0
]
CORETSEiI1II
;
reg
[
1
:
0
]
CORETSEOl1II
;
reg
[
1
:
0
]
CORETSEIl1II
;
reg
[
1
:
0
]
CORETSEll1II
;
reg
[
5
:
0
]
CORETSEol1II
;
wire
CORETSEil1II
;
reg
[
3
:
0
]
CORETSEO01II
;
reg
[
9
:
0
]
CORETSEI01II
;
reg
[
9
:
0
]
CORETSEl01II
;
reg
[
9
:
0
]
CORETSEo01II
;
reg
[
9
:
0
]
CORETSEi01II
;
reg
[
9
:
0
]
CORETSEO11II
;
reg
[
9
:
0
]
CORETSEI11II
;
reg
[
9
:
0
]
CORETSEl11II
;
reg
[
9
:
0
]
CORETSEo11II
;
reg
[
9
:
0
]
CORETSEi11II
;
reg
[
9
:
0
]
CORETSEOo1II
;
reg
[
9
:
0
]
CORETSEIo1II
;
reg
[
9
:
0
]
CORETSElo1II
;
reg
[
9
:
0
]
CORETSEoo1II
;
reg
[
9
:
0
]
CORETSEio1II
;
reg
[
9
:
0
]
CORETSEOi1II
;
reg
[
9
:
0
]
CORETSEIi1II
;
wire
[
9
:
0
]
CORETSEli1II
;
wire
CORETSEoi1II
;
wire
CORETSEii1II
;
reg
CORETSElI1II
;
reg
CORETSEOOoII
;
reg
[
3
:
0
]
CORETSEoI1II
;
wire
CORETSEIOoII
;
reg
[
5
:
0
]
CORETSElOoII
;
reg
[
5
:
0
]
CORETSEoOoII
;
wire
CORETSElo1
;
wire
CORETSEoo1
;
assign
CORETSElo1
=
(
FAMILY
==
25
)
?
1
'b
0
:
CORETSEI0OI
;
assign
CORETSEoo1
=
(
FAMILY
==
25
)
?
CORETSEI0OI
:
1
'b
0
;
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEiI1II
<=
`CORETSEOII
16
'h
00
;
else
if
(
CORETSEOOo0
)
CORETSEiI1II
<=
`CORETSEOII
CORETSEoi0II
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEOl1II
<=
`CORETSEOII
2
'b
00
;
else
if
(
CORETSEOOo0
)
CORETSEOl1II
<=
`CORETSEOII
CORETSEii0II
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEll1II
<=
`CORETSEOII
2
'b
00
;
else
if
(
CORETSEOOo0
)
CORETSEll1II
<=
`CORETSEOII
CORETSEOO1II
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEIl1II
<=
`CORETSEOII
2
'b
00
;
else
if
(
CORETSEOOo0
)
CORETSEIl1II
<=
`CORETSEOII
CORETSEOl1II
;
end
assign
CORETSEIOoII
=
CORETSEli0II
==
2
'b
10
;
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEol1II
<=
`CORETSEOII
6
'h
00
;
else
if
(
CORETSEOOo0
)
begin
if
(
CORETSEIOoII
|
(
(
CORETSEli0II
==
2
'b
01
)
&
(
CORETSEol1II
==
6
'd
4
)
)
|
(
(
CORETSEli0II
==
2
'b
00
)
&
(
CORETSEol1II
==
6
'd
49
)
)
)
CORETSEol1II
<=
`CORETSEOII
6
'h
00
;
else
CORETSEol1II
<=
`CORETSEOII
CORETSEol1II
+
6
'h
01
;
end
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSElOoII
<=
`CORETSEOII
6
'h
00
;
else
CORETSElOoII
<=
CORETSEol1II
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEoOoII
<=
`CORETSEOII
6
'h
00
;
else
CORETSEoOoII
<=
CORETSElOoII
;
end
assign
CORETSEil1II
=
CORETSEIOoII
|
(
CORETSEoOoII
==
6
'h
02
)
;
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEO01II
<=
`CORETSEOII
4
'h
0
;
else
if
(
CORETSEil1II
&
CORETSEOOo0
)
CORETSEO01II
<=
`CORETSEOII
CORETSEO01II
+
4
'h
1
;
end
assign
CORETSEii1II
=
(
(
|
CORETSEOl1II
)
&
CORETSEil1II
)
|
(
CORETSElI1II
&
(
|
CORETSEOl1II
)
)
|
(
~
CORETSElI1II
&
~
CORETSEOOoII
&
CORETSEil1II
)
;
assign
CORETSEoi1II
=
(
~
(
|
CORETSEOl1II
)
&
CORETSEil1II
)
|
(
CORETSElI1II
&
CORETSEOOoII
&
CORETSEil1II
)
;
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSElI1II
<=
`CORETSEOII
1
'b
0
;
else
if
(
CORETSEOOo0
)
begin
if
(
CORETSEii1II
)
CORETSElI1II
<=
`CORETSEOII
1
'b
1
;
else
if
(
CORETSEoi1II
)
CORETSElI1II
<=
`CORETSEOII
1
'b
0
;
end
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEoI1II
<=
`CORETSEOII
4
'h
0
;
else
if
(
CORETSEOOo0
)
begin
if
(
~
CORETSElI1II
&
CORETSEii1II
&
(
CORETSEli0II
==
2
'b
10
)
)
CORETSEoI1II
<=
`CORETSEOII
CORETSEO01II
-
4
'h
1
;
else
if
(
~
CORETSElI1II
&
CORETSEii1II
)
CORETSEoI1II
<=
`CORETSEOII
CORETSEO01II
-
4
'h
6
;
end
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEOOoII
<=
`CORETSEOII
1
'b
0
;
else
if
(
CORETSEil1II
&
CORETSEOOo0
)
CORETSEOOoII
<=
`CORETSEOII
CORETSElI1II
;
end
assign
CORETSElI
=
|
CORETSEii0II
;
assign
CORETSEII1II
=
|
CORETSEii0II
&
CORETSEIO1II
;
assign
CORETSEli1II
=
{
10
{
(
CORETSElO1II
==
4
'h
0
)
}
}
&
CORETSEI01II
|
{
10
{
(
CORETSElO1II
==
4
'h
1
)
}
}
&
CORETSEl01II
|
{
10
{
(
CORETSElO1II
==
4
'h
2
)
}
}
&
CORETSEo01II
|
{
10
{
(
CORETSElO1II
==
4
'h
3
)
}
}
&
CORETSEi01II
|
{
10
{
(
CORETSElO1II
==
4
'h
4
)
}
}
&
CORETSEO11II
|
{
10
{
(
CORETSElO1II
==
4
'h
5
)
}
}
&
CORETSEI11II
|
{
10
{
(
CORETSElO1II
==
4
'h
6
)
}
}
&
CORETSEl11II
|
{
10
{
(
CORETSElO1II
==
4
'h
7
)
}
}
&
CORETSEo11II
|
{
10
{
(
CORETSElO1II
==
4
'h
8
)
}
}
&
CORETSEi11II
|
{
10
{
(
CORETSElO1II
==
4
'h
9
)
}
}
&
CORETSEOo1II
|
{
10
{
(
CORETSElO1II
==
4
'h
a
)
}
}
&
CORETSEIo1II
|
{
10
{
(
CORETSElO1II
==
4
'h
b
)
}
}
&
CORETSElo1II
|
{
10
{
(
CORETSElO1II
==
4
'h
c
)
}
}
&
CORETSEoo1II
|
{
10
{
(
CORETSElO1II
==
4
'h
d
)
}
}
&
CORETSEio1II
|
{
10
{
(
CORETSElO1II
==
4
'h
e
)
}
}
&
CORETSEOi1II
|
{
10
{
(
CORETSElO1II
==
4
'h
f
)
}
}
&
CORETSEIi1II
;
assign
CORETSEoO1II
=
CORETSEli1II
[
7
:
0
]
;
assign
CORETSEiO1II
=
CORETSEli1II
[
8
]
;
assign
CORETSEOI1II
=
CORETSEli1II
[
9
]
;
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEI01II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
0
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
0
)
)
)
CORETSEI01II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEl01II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
0
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
1
)
)
)
CORETSEl01II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEo01II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
1
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
2
)
)
)
CORETSEo01II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEi01II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
1
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
3
)
)
)
CORETSEi01II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEO11II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
2
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
4
)
)
)
CORETSEO11II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEI11II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
2
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
5
)
)
)
CORETSEI11II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEl11II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
3
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
6
)
)
)
CORETSEl11II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEo11II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
3
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
7
)
)
)
CORETSEo11II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEi11II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
4
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
8
)
)
)
CORETSEi11II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEOo1II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
4
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
9
)
)
)
CORETSEOo1II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEIo1II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
5
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
10
)
)
)
CORETSEIo1II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSElo1II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
5
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
11
)
)
)
CORETSElo1II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEoo1II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
6
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
12
)
)
)
CORETSEoo1II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEio1II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
6
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
13
)
)
)
CORETSEio1II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEOi1II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
7
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
14
)
)
)
CORETSEOi1II
<=
`CORETSEOII
{
CORETSEll1II
[
0
]
,
CORETSEOl1II
[
0
]
,
CORETSEiI1II
[
7
:
0
]
}
;
end
always
@
(
posedge
CORETSElIOI
or
posedge
CORETSElo1
)
begin
if
(
CORETSEoo1
||
CORETSElo1
)
CORETSEIi1II
<=
`CORETSEOII
10
'h
000
;
else
if
(
CORETSEOOo0
)
if
(
(
CORETSEIOoII
&
(
CORETSEO01II
[
2
:
0
]
==
3
'd
7
)
)
|
(
~
CORETSEIOoII
&
(
CORETSEO01II
[
3
:
0
]
==
4
'd
15
)
)
)
CORETSEIi1II
<=
`CORETSEOII
{
CORETSEll1II
[
1
]
,
CORETSEOl1II
[
1
]
,
CORETSEiI1II
[
15
:
8
]
}
;
end
endmodule
