// Actel Corporation Proprietary and Confidential
// Copyright 2013 Actel Corporation.  All rights reserved.
// ANY USE OR REDISTRIBUTION IN PART OR IN WHOLE MUST BE HANDLED IN
// ACCORDANCE WITH THE ACTEL LICENSE AGREEMENT AND MUST BE APPROVED
// IN ADVANCE IN WRITING.
// Revision Information:
// SVN Revision Information:
// SVN $Revision: 21302 $
// SVN $Date: 2013-10-17 11:52:38 -0700 (Thu, 17 Oct 2013) $
`timescale 1ns/1ps
module
CAHBLTIO1I
(
input
HCLK,
input
HRESETN,
input
CAHBLTlO1I,
input
CAHBLTllOI,
output
reg
CAHBLTOI1I,
output
reg
[
31
:
0
]
CAHBLTOIOI,
output
reg
[
2
:
0
]
CAHBLTlIOI,
output
wire
CAHBLTOlOI,
output
reg
CAHBLTIlOI,
output
reg
[
31
:
0
]
CAHBLTII1I,
output
wire
CAHBLTlI1I,
output
reg
CAHBLTIIOI,
input
[
3
:
0
]
CAHBLTIO0,
input
[
3
:
0
]
CAHBLTOl1I,
input
[
3
:
0
]
CAHBLTIl1I,
output
reg
[
3
:
0
]
CAHBLTll1I,
output
reg
[
3
:
0
]
CAHBLTO01I,
output
reg
[
3
:
0
]
CAHBLTI01I,
input
[
31
:
0
]
CAHBLTl01I,
input
CAHBLTOI0,
input
[
2
:
0
]
CAHBLTO11I,
input
CAHBLTI11I,
input
CAHBLTl11I,
input
[
31
:
0
]
CAHBLTOOOl,
input
CAHBLTII0,
input
[
2
:
0
]
CAHBLTIOOl,
input
CAHBLTlOOl,
input
CAHBLTOIOl,
input
[
31
:
0
]
CAHBLTIIOl,
input
CAHBLTlI0,
input
[
2
:
0
]
CAHBLTlIOl,
input
CAHBLTOlOl,
input
CAHBLTIlOl,
input
[
31
:
0
]
CAHBLTllOl,
input
CAHBLTOl0,
input
[
2
:
0
]
CAHBLTO0Ol,
input
CAHBLTI0Ol,
input
CAHBLTl0Ol,
input
[
31
:
0
]
HWDATA_M0,
input
[
31
:
0
]
HWDATA_M1,
input
[
31
:
0
]
HW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OIl
=
CAHBLTOlOl
;
CAHBLTlIOI
=
CAHBLTlIOl
;
CAHBLTIlOI
=
CAHBLTIlOl
;
CAHBLTOIOI
=
CAHBLTIIOl
;
CAHBLTIIOI
=
CAHBLTlI0
;
CAHBLTOOIl
=
CAHBLTIl1I
[
1
]
;
end
4
'b
1???
:
begin
CAHBLTOI1I
=
1
'b
1
;
CAHBLTlOIl
=
CAHBLTI0Ol
;
CAHBLTlIOI
=
CAHBLTO0Ol
;
CAHBLTIlOI
=
CAHBLTl0Ol
;
CAHBLTOIOI
=
CAHBLTllOl
;
CAHBLTIIOI
=
CAHBLTOl0
;
CAHBLTOOIl
=
CAHBLTIl1I
[
1
]
;
end
default
:
begin
CAHBLTOI1I
=
1
'b
0
;
CAHBLTlOIl
=
CAHBLTO1Ol
;
CAHBLTlIOI
=
2
'b
00
;
CAHBLTIlOI
=
1
'b
0
;
CAHBLTOIOI
=
32
'h
0
;
CAHBLTIIOI
=
1
'b
0
;
CAHBLTOOIl
=
1
'b
1
;
end
endcase
end
assign
CAHBLTIOIl
=
|
(
CAHBLTI1Ol
&
CAHBLTOl1I
)
;
assign
CAHBLTOlOI
=
CAHBLTlOIl
&&
(
CAHBLTOOIl
||
CAHBLTIOIl
)
;
assign
CAHBLTlI1I
=
CAHBLTlO1I
;
always
@(*)
begin
casez
(
CAHBLTl1Ol
)
4
'b
???1
:
begin
CAHBLTII1I
=
HWDATA_M0
;
end
4
'b
??1?
:
begin
CAHBLTII1I
=
HWDATA_M1
;
end
4
'b
?1??
:
begin
CAHBLTII1I
=
HWDATA_M2
;
end
4
'b
1???
:
begin
CAHBLTII1I
=
HWDATA_M3
;
end
default
:
begin
CAHBLTII1I
=
32
'h
0
;
end
endcase
end
always
@(*)
begin
CAHBLTI01I
=
2
'b
00
;
casez
(
CAHBLTl1Ol
)
4
'b
???1
:
begin
CAHBLTI01I
[
0
]
=
CAHBLTllOI
;
end
4
'b
??1?
:
begin
CAHBLTI01I
[
1
]
=
CAHBLTllOI
;
end
4
'b
?1??
:
begin
CAHBLTI01I
[
2
]
=
CAHBLTllOI
;
end
4
'b
1???
:
begin
CAHBLTI01I
[
3
]
=
CAHBLTllOI
;
end
default
:
begin
CAHBLTI01I
=
2
'b
00
;
end
endcase
end
always
@(*)
begin
if
(
CAHBLTIO0
[
0
]
&&
!
CAHBLTI1Ol
[
0
]
)
CAHBLTll1I
[
0
]
=
1
'b
0
;
else
if
(
CAHBLTIO0
[
0
]
&&
CAHBLTI1Ol
[
0
]
)
CAHBLTll1I
[
0
]
=
CAHBLTlO1I
;
else
CAHBLTll1I
[
0
]
=
1
'b
1
;
end
always
@(*)
begin
if
(
CAHBLTIO0
[
1
]
&&
!
CAHBLTI1Ol
[
1
]
)
CAHBLTll1I
[
1
]
=
1
'b
0
;
else
if
(
CAHBLTIO0
[
1
]
&&
CAHBLTI1Ol
[
1
]
)
CAHBLTll1I
[
1
]
=
CAHBLTlO1I
;
else
CAHBLTll1I
[
1
]
=
1
'b
1
;
end
always
@(*)
begin
if
(
CAHBLTIO0
[
2
]
&&
!
CAHBLTI1Ol
[
2
]
)
CAHBLTll1I
[
2
]
=
1
'b
0
;
else
if
(
CAHBLTIO0
[
2
]
&&
CAHBLTI1Ol
[
2
]
)
CAHBLTll1I
[
2
]
=
CAHBLTlO1I
;
else
CAHBLTll1I
[
2
]
=
1
'b
1
;
end
always
@(*)
begin
if
(
CAHBLTIO0
[
3
]
&&
!
CAHBLTI1Ol
[
3
]
)
CAHBLTll1I
[
3
]
=
1
'b
0
;
else
if
(
CAHBLTIO0
[
3
]
&&
CAHBLTI1Ol
[
3
]
)
CAHBLTll1I
[
3
]
=
CAHBLTlO1I
;
else
CAHBLTll1I
[
3
]
=
1
'b
1
;
end
always
@(*)
begin
if
(
CAHBLTOl1I
[
0
]
&&
!
CAHBLTl1Ol
[
0
]
)
CAHBLTO01I
[
0
]
=
1
'b
0
;
else
if
(
CAHBLTOl1I
[
0
]
&&
CAHBLTl1Ol
[
0
]
)
CAHBLTO01I
[
0
]
=
CAHBLTlO1I
;
else
CAHBLTO01I
[
0
]
=
1
'b
1
;
end
always
@(*)
begin
if
(
CAHBLTOl1I
[
1
]
&&
!
CAHBLTl1Ol
[
1
]
)
CAHBLTO01I
[
1
]
=
1
'b
0
;
else
if
(
CAHBLTOl1I
[
1
]
&&
CAHBLTl1Ol
[
1
]
)
CAHBLTO01I
[
1
]
=
CAHBLTlO1I
;
else
CAHBLTO01I
[
1
]
=
1
'b
1
;
end
always
@(*)
begin
if
(
CAHBLTOl1I
[
2
]
&&
!
CAHBLTl1Ol
[
2
]
)
CAHBLTO01I
[
2
]
=
1
'b
0
;
else
if
(
CAHBLTOl1I
[
2
]
&&
CAHBLTl1Ol
[
2
]
)
CAHBLTO01I
[
2
]
=
CAHBLTlO1I
;
else
CAHBLTO01I
[
2
]
=
1
'b
1
;
end
always
@(*)
begin
if
(
CAHBLTOl1I
[
3
]
&&
!
CAHBLTl1Ol
[
3
]
)
CAHBLTO01I
[
3
]
=
1
'b
0
;
else
if
(
CAHBLTOl1I
[
3
]
&&
CAHBLTl1Ol
[
3
]
)
CAHBLTO01I
[
3
]
=
CAHBLTlO1I
;
else
CAHBLTO01I
[
3
]
=
1
'b
1
;
end
endmodule
