OpenCores
URL https://opencores.org/ocsvn/ahbmaster/ahbmaster/trunk

Subversion Repositories ahbmaster

[/] [ahbmaster/] [trunk/] [test79_AHBmaster/] [component/] [work/] [top/] [CoreUARTapb_0/] [rtl/] [vhdl/] [amba_bfm/] [bfm_apbtoapb.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 uson
-- Actel Corporation Proprietary and Confidential
2
-- Copyright 2008 Actel Corporation.  All rights reserved.
3
-- ANY USE OR REDISTRIBUTION IN PART OR IN WHOLE MUST BE HANDLED IN 
4
-- ACCORDANCE WITH THE ACTEL LICENSE AGREEMENT AND MUST BE APPROVED 
5
-- IN ADVANCE IN WRITING.  
6
-- Revision Information:
7
-- SVN Revision Information:
8
-- SVN $Revision: 6419 $
9
-- SVN $Date: 2009-02-04 04:34:22 -0800 (Wed, 04 Feb 2009) $
10
library ieeE;
11
use Ieee.STd_loGIC_1164.all;
12
use iEEE.NUmeriC_Std.all;
13
use work.bfm_MISc.all;
14
use work.BFm_teXTIo.all;
15
use WORk.top_CoreUARTapb_0_bfM_packAGE.all;
16
entity top_CoreUARTapb_0_BFM_APB2APB is
17
generic (TPD: inTEGEr range 0 to 1000 := 1); port (PCLk_pM: in std_Logic;
18
PresETN_pm: in stD_LogiC;
19
PADdr_pM: in stD_LogiC_VectOR(31 downto 0);
20
pWRIte_pM: in std_LOGic;
21
peNABle_PM: in std_LOGic;
22
pwDATa_pm: in sTD_logIC_vecTOR(31 downto 0);
23
PRData_PM: out std_LOGic_vECTor(31 downto 0);
24
PReady_Pm: out sTD_logIC;
25
PSlveRR_pm: out std_LOGic;
26
PClk_sC: in STd_loGIC;
27
Psel_SC: out STD_logIC_vecTOr(15 downto 0);
28
padDR_sc: out Std_lOGIC_veCTOr(31 downto 0);
29
pwrITE_sc: out std_LOGic;
30
PenaBLE_sc: out stD_logiC;
31
pwdATA_sc: out stD_LogiC_VectOR(31 downto 0);
32
pRDATa_sC: in stD_LogiC_VectOR(31 downto 0);
33
PREady_SC: in Std_lOGIc;
34
PslveRR_sc: in std_LOgic);
35
end top_CoreUARTapb_0_BFM_APB2APB;
36
 
37
architecture BFMA1io1oL of top_CoreUARTapb_0_BFM_APB2APB is
38
 
39
type BFMA1i0llL is (BFMA1iiLOL,acTIVe);
40
 
41
signal BFMA1o1LLl: BFMA1I0lll;
42
 
43
type BFMA1l1lLL is (BFMA1ll1oL,BFMA1I1lll,BFMA1il1OL);
44
 
45
signal BFMA1Ooill: BFMA1l1LLl;
46
 
47
signal BFMA1I01ol: sTD_logIC_vecTOR(15 downto 0);
48
 
49
signal BFMA1o11OL: std_LOGic_VECtor(31 downto 0);
50
 
51
signal BFMA1l11OL: std_LOgic;
52
 
53
signal BFMA1I11ol: STD_logIC;
54
 
55
signal BFMA1oooLL: Std_lOGIc_vECTor(31 downto 0);
56
 
57
signal BFMA1OlolL: STd_lOGIc;
58
 
59
signal BFMA1LOill: STD_loGIC_veCTOr(31 downto 0);
60
 
61
signal BFMA1IOIll: std_LOgic;
62
 
63
signal BFMA1OLIll: STd_loGIC;
64
 
65
signal BFMA1llILL: Std_LOGic;
66
 
67
signal BFMA1L0lol: std_LOgic;
68
 
69
constant BFMA1ol00: time := tpD*1 nS;
70
 
71
begin
72
process (pcLK_pm,presETN_pm)
73
begin
74
if pRESEtn_PM = '0' then
75
BFMA1O1lll <= BFMA1iiLOL;
76
BFMA1lLILl <= '0';
77
PreaDY_pm <= '0';
78
pslVERr_pm <= '0';
79
prdATA_pm <= ( others => '0');
80
BFMA1OLill <= '0';
81
elsif pclk_Pm = '1' and Pclk_PM'Event then
82
PREady_PM <= '0';
83
BFMA1OLill <= pENAble_PM;
84
case BFMA1o1lLL is
85
when BFMA1IiloL =>
86
if PEnablE_Pm = '1' and BFMA1olilL = '0' then
87
BFMA1Llill <= '1';
88
BFMA1o1LLL <= ACtive;
89
end if;
90
when ActivE =>
91
if BFMA1l0lOL = '1' then
92
BFMA1o1lLL <= BFMA1iilOL;
93
BFMA1LLill <= '0';
94
preADY_pm <= '1';
95
pslVERr_pm <= BFMA1IOILl;
96
prdaTA_pm <= BFMA1loiLL;
97
end if;
98
end case;
99
end if;
100
end process;
101
process (pCLK_sc,BFMA1Llill)
102
begin
103
if BFMA1LLIll = '0' then
104
BFMA1OOill <= BFMA1ll1OL;
105
BFMA1l0LOL <= '0';
106
BFMA1Loill <= ( others => '0');
107
BFMA1ioiLL <= '0';
108
BFMA1oloLL <= '0';
109
BFMA1I11ol <= '0';
110
BFMA1o11ol <= ( others => '0');
111
BFMA1OOOll <= ( others => '0');
112
BFMA1l11oL <= '0';
113
elsif pclK_sc = '1' and pCLK_sc'EVEnt then
114
case BFMA1ooiLL is
115
when BFMA1LL1ol =>
116
BFMA1OOill <= BFMA1i1llL;
117
BFMA1O11ol <= padDR_pm;
118
BFMA1OOoll <= pwDATA_pm;
119
BFMA1l11Ol <= pwrITE_pm;
120
BFMA1OLoll <= '1';
121
BFMA1I11ol <= '0';
122
BFMA1L0lol <= '0';
123
when BFMA1i1LLL =>
124
BFMA1OoilL <= BFMA1IL1ol;
125
BFMA1i11Ol <= '1';
126
when BFMA1IL1ol =>
127
if prEADy_sC = '1' then
128
BFMA1L0lol <= '1';
129
BFMA1loilL <= prdATA_sc;
130
BFMA1IOIll <= psLVErr_sC;
131
BFMA1OlolL <= '0';
132
BFMA1i11OL <= '0';
133
BFMA1o11OL <= ( others => '0');
134
BFMA1ooolL <= ( others => '0');
135
BFMA1L11oL <= '0';
136
end if;
137
end case;
138
end if;
139
end process;
140
process (BFMA1O11ol,BFMA1olOLL)
141
begin
142
BFMA1i01OL <= ( others => '0');
143
if BFMA1OLOll = '1' then
144
for BFMA1I0ii in 0 to 15
145
loop
146
BFMA1i01OL(BFMA1i0II) <= To_stD_LogiC(tO_IntegER((tO_UnsigNED(BFMA1o11OL(27 downto 24)))) = BFMA1i0II);
147
end loop;
148
end if;
149
end process;
150
psel_SC <= BFMA1i01Ol after BFMA1ol00;
151
PAddr_SC <= BFMA1O11oL after BFMA1oL00;
152
pwriTE_sc <= BFMA1L11ol after BFMA1OL00;
153
penABLe_sc <= BFMA1I11ol after BFMA1OL00;
154
pwdaTA_sc <= BFMA1OOOll after BFMA1ol00;
155
end BFMA1io1OL;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.