IP documentation » History » Version 21
Jean-Christophe Pellion, 27/02/2014 07:07 PM
1 | 10 | Jean-Christophe Pellion | {{>toc}} |
---|---|---|---|
2 | 1 | Jean-Christophe Pellion | |
3 | 11 | Jean-Christophe Pellion | h1. IP Documentation |
4 | 1 | Jean-Christophe Pellion | |
5 | 15 | Jean-Christophe Pellion | ---- |
6 | |||
7 | 11 | Jean-Christophe Pellion | h2. General Purpose |
8 | 1 | Jean-Christophe Pellion | |
9 | 15 | Jean-Christophe Pellion | h3. Edge Detection |
10 | 1 | Jean-Christophe Pellion | |
11 | 15 | Jean-Christophe Pellion | {{collapse(Edge_Detection) |
12 | EdgeDetection permit to detect the edge of the sin signal. |
||
13 | |||
14 | p=. !{width: 20%}edge_detection.png! |
||
15 | |||
16 | <pre><code class="vhdl"> |
||
17 | COMPONENT lpp_edge_detection |
||
18 | PORT ( |
||
19 | clk : IN STD_LOGIC; |
||
20 | rstn : IN STD_LOGIC; |
||
21 | sin : IN STD_LOGIC; |
||
22 | sout : OUT STD_LOGIC); |
||
23 | END COMPONENT; |
||
24 | </code></pre> |
||
25 | |||
26 | |_.Signal |_.Direction |_.Size |_.Function |_. Active | |
||
27 | |clk |input |1 |clock domain 1 |rising edge | |
||
28 | |rstn |input |1 |reset |low | |
||
29 | |sin |input |1 |signal in | | |
||
30 | |sout |ouput |1 |signal out | | |
||
31 | |||
32 | }} |
||
33 | {{collapse(Edge_to_level) |
||
34 | 20 | Jean-Christophe Pellion | EdgeToLevel permit to transform the positive edge information into a level information. |
35 | 15 | Jean-Christophe Pellion | |
36 | 16 | Jean-Christophe Pellion | p=. !{width: 20%}edge_to_level.png! |
37 | 15 | Jean-Christophe Pellion | |
38 | <pre><code class="vhdl"> |
||
39 | 17 | Jean-Christophe Pellion | COMPONENT lpp_edge_to_level |
40 | 15 | Jean-Christophe Pellion | PORT ( |
41 | clk : IN STD_LOGIC; |
||
42 | rstn : IN STD_LOGIC; |
||
43 | sin : IN STD_LOGIC; |
||
44 | sout : OUT STD_LOGIC); |
||
45 | END COMPONENT; |
||
46 | </code></pre> |
||
47 | |||
48 | |_.Signal |_.Direction |_.Size |_.Function |_. Active | |
||
49 | |clk |input |1 |clock domain 1 |rising edge | |
||
50 | |rstn |input |1 |reset |low | |
||
51 | |sin |input |1 |signal in | | |
||
52 | |sout |ouput |1 |signal out | | |
||
53 | |||
54 | }} |
||
55 | |||
56 | 13 | Jean-Christophe Pellion | h3. Synchronizer |
57 | 8 | Jean-Christophe Pellion | |
58 | {{collapse(SYNC_FF) |
||
59 | 19 | Jean-Christophe Pellion | Sync_FF permit to synchronize a signal A in the clock domain clk. Normally, A signal should be the output of a FF cloked in an other domain. You shouldtn't have "logic" between the 2 domain. |
60 | You can configure the number FF use to synchronize (NB_FF_OF_SYNC). This number is depending of the MTBF(Mean Time Between Failure). |
||
61 | 13 | Jean-Christophe Pellion | |
62 | p=. !{width: 15%}SYNC_FF.png! |
||
63 | 8 | Jean-Christophe Pellion | |
64 | <pre><code class="vhdl"> |
||
65 | COMPONENT SYNC_FF_LPP_JCP |
||
66 | GENERIC ( |
||
67 | NB_FF_OF_SYNC : INTEGER); |
||
68 | PORT ( |
||
69 | clk : IN STD_LOGIC; |
||
70 | rstn : IN STD_LOGIC; |
||
71 | A : IN STD_LOGIC; |
||
72 | A_sync : OUT STD_LOGIC); |
||
73 | END COMPONENT; |
||
74 | </code></pre> |
||
75 | |||
76 | |_.Parameter |_.Type |_.Size |_.Description |_.Default | |
||
77 | 7 | Jean-Christophe Pellion | |NB_FF_OF_SYNC |Integer | |Number of FF |2 | |
78 | 1 | Jean-Christophe Pellion | |\5.| |
79 | |_.Signal |_.Direction |_.Size |_.Function |_. Active | |
||
80 | |clk |input |1 |clock |rising edge | |
||
81 | |rstn |input |1 |reset |low | |
||
82 | 15 | Jean-Christophe Pellion | |sin |input |1 |signal in | | |
83 | |sout |ouput |1 |signal synchronized | | |
||
84 | 13 | Jean-Christophe Pellion | |
85 | }} |
||
86 | |||
87 | 1 | Jean-Christophe Pellion | {{collapse(SYNC_VALID_BIT) |
88 | 14 | Jean-Christophe Pellion | SYNC_VALID_BIT permit to synchronize a signal of validity from clock domain clk_in to clock domain clk_out. A validity bit is a signal set "high" only one cycle and zero others. To Synchronize this type of signal, a first stage detect the positive edge, a second synchronizes this signal, and a last transform the edge information to a validity bit. |
89 | 19 | Jean-Christophe Pellion | You can configure the FF number of the second stage (NB_FF_OF_SYNC). |
90 | 14 | Jean-Christophe Pellion | |
91 | 13 | Jean-Christophe Pellion | p=. !{width: 20%}SYNC_VALID_BIT.png! |
92 | |||
93 | <pre><code class="vhdl"> |
||
94 | COMPONENT SYNC_VALID_BIT_LPP_JCP |
||
95 | GENERIC ( |
||
96 | NB_FF_OF_SYNC : INTEGER); |
||
97 | PORT ( |
||
98 | clk_in : IN STD_LOGIC; |
||
99 | clk_out : IN STD_LOGIC; |
||
100 | rstn : IN STD_LOGIC; |
||
101 | sin : IN STD_LOGIC; |
||
102 | sout : OUT STD_LOGIC); |
||
103 | END COMPONENT; |
||
104 | </code></pre> |
||
105 | |||
106 | |_.Parameter |_.Type |_.Size |_.Description |_.Default | |
||
107 | 1 | Jean-Christophe Pellion | |NB_FF_OF_SYNC |Integer | |Number of FF |2 | |
108 | 13 | Jean-Christophe Pellion | |\5.| |
109 | 18 | Jean-Christophe Pellion | |_.Signal |_.Direction |_.Size |_.Function |_. Active | |
110 | |clk_in |input |1 |clock domain 1 |rising edge | |
||
111 | |clk_out |input |1 |clock domain 1 |rising edge | |
||
112 | |rstn |input |1 |reset |low | |
||
113 | |sin |input |1 |valid bit clocked in domain 1| | |
||
114 | |sout |output |1 |valid bit clocked in domain 2| | |
||
115 | 2 | Jean-Christophe Pellion | |
116 | }} |
||
117 | 21 | Jean-Christophe Pellion | |
118 | |||
119 | ---- |
||
120 | |||
121 | h2. SoC (System On Chip) |
||
122 | |||
123 | {{collapse(Leon3_Soc) |
||
124 | Leon3_SoC is an IP which integrate all the basic IP for using a Leon3 System. This System is configurable : |
||
125 | * activate the DSU, AHB uart, APB UART, IRQ manager and timer manager |
||
126 | * activate the FPU and select the type of IP using for (netlist or rtl) |
||
127 | |||
128 | You can connect easily external AMBA IP. For example, if you have only one Leon3 and you want to add an AHB Master My_AHB_MST. You set NB_AHB_MASTER to 1 and connect My_AHB_MST_ahbmi signal to the input ahbi_m_ext and My_AHB_MST_ahbm0 to ahbo_m_ext(1). |
||
129 | |||
130 | <pre><code class="vhdl"> |
||
131 | COMPONENT leon3_soc_LPP_JCP |
||
132 | GENERIC ( |
||
133 | fabtech : INTEGER; |
||
134 | memtech : INTEGER; |
||
135 | padtech : INTEGER; |
||
136 | clktech : INTEGER; |
||
137 | disas : INTEGER; |
||
138 | dbguart : INTEGER; |
||
139 | pclow : INTEGER; |
||
140 | clk_freq : INTEGER; |
||
141 | NB_CPU : INTEGER; |
||
142 | ENABLE_FPU : INTEGER; |
||
143 | FPU_NETLIST : INTEGER; |
||
144 | ENABLE_DSU : INTEGER; |
||
145 | ENABLE_AHB_UART : INTEGER; |
||
146 | ENABLE_APB_UART : INTEGER; |
||
147 | ENABLE_IRQMP : INTEGER; |
||
148 | ENABLE_GPT : INTEGER; |
||
149 | NB_AHB_MASTER : INTEGER; |
||
150 | NB_AHB_SLAVE : INTEGER; |
||
151 | NB_APB_SLAVE : INTEGER); |
||
152 | PORT ( |
||
153 | clk : IN STD_ULOGIC; |
||
154 | rstn : IN STD_ULOGIC; |
||
155 | errorn : OUT STD_ULOGIC; |
||
156 | ahbrxd : IN STD_ULOGIC; |
||
157 | ahbtxd : OUT STD_ULOGIC; |
||
158 | urxd1 : IN STD_ULOGIC; |
||
159 | utxd1 : OUT STD_ULOGIC; |
||
160 | address : OUT STD_LOGIC_VECTOR(19 DOWNTO 0); |
||
161 | data : INOUT STD_LOGIC_VECTOR(31 DOWNTO 0); |
||
162 | nSRAM_BE0 : OUT STD_LOGIC; |
||
163 | nSRAM_BE1 : OUT STD_LOGIC; |
||
164 | nSRAM_BE2 : OUT STD_LOGIC; |
||
165 | nSRAM_BE3 : OUT STD_LOGIC; |
||
166 | nSRAM_WE : OUT STD_LOGIC; |
||
167 | nSRAM_CE : OUT STD_LOGIC; |
||
168 | nSRAM_OE : OUT STD_LOGIC; |
||
169 | apbi_ext : OUT apb_slv_in_type; |
||
170 | apbo_ext : IN soc_apb_slv_out_vector(NB_APB_SLAVE-1+5 DOWNTO 5); |
||
171 | ahbi_s_ext : OUT ahb_slv_in_type; |
||
172 | ahbo_s_ext : IN soc_ahb_slv_out_vector(NB_AHB_SLAVE-1+3 DOWNTO 3); |
||
173 | ahbi_m_ext : OUT AHB_Mst_In_Type; |
||
174 | ahbo_m_ext : IN soc_ahb_mst_out_vector(NB_AHB_MASTER-1+NB_CPU DOWNTO NB_CPU)); |
||
175 | END COMPONENT; |
||
176 | </code></pre> |
||
177 | |||
178 | |_.Parameter |_.Type |_.Size |_.Description |_.Default | |
||
179 | |fabtech | INTEGER | |Target technologie |apa3e | |
||
180 | |memtech | INTEGER | |Memory Target technologie |apa3e | |
||
181 | |padtech | INTEGER | |Pad Target technologie |inferred | |
||
182 | |clktech | INTEGER | |Clock target technologie |inferred | |
||
183 | |disas | INTEGER | |Activate the disassembler |0 | |
||
184 | |dbguart | INTEGER | |Activate debug uart |0 | |
||
185 | |pclow | INTEGER | | |2 | |
||
186 | |clk_freq | INTEGER | |Clock input frequency (in kHz) |25000 | |
||
187 | |NB_CPU | INTEGER | |Number of Leon3 |1 | |
||
188 | |ENABLE_FPU | INTEGER | |Enable the FPU |1 | |
||
189 | |FPU_NETLIST | INTEGER | |Select the FPU Used (1=> NetList, 0=> RTL) |1 | |
||
190 | |ENABLE_DSU | INTEGER | |Enable the Debug System Unit |1 | |
||
191 | |ENABLE_AHB_UART | INTEGER | |Enable AHB UART |1 | |
||
192 | |ENABLE_APB_UART | INTEGER | |Enable APB UART |1 | |
||
193 | |ENABLE_IRQMP | INTEGER | |Enable irq manager |1 | |
||
194 | |ENABLE_GPT | INTEGER | |Enable the timer |1 | |
||
195 | |NB_AHB_MASTER | INTEGER | |Number of AHB Master outside the SoC |0 | |
||
196 | |NB_AHB_SLAVE | INTEGER | |Number of AHB Slave outside the SoC |0 | |
||
197 | |NB_APB_SLAVE | INTEGER | |Number of APB Slave outside the SoC |0 | |
||
198 | |\5.| |
||
199 | |_.Signal |_.Direction |_.Size or Type |_.Function |_. Active | |
||
200 | |clk | input |1 |clock |rising edge | |
||
201 | |rstn | input |1 |reset |low | |
||
202 | |errorn | output |1 |leon 3 error signal | | |
||
203 | |ahbrxd | input |1 |AHB uart Rx Signal | | |
||
204 | |ahbtxd | output |1 |AHB uart Tx Signal | | |
||
205 | |urxd1 | input |1 |APB uart Rx Signal | | |
||
206 | |utxd1 | output |1 |APB uart Tx Signal | | |
||
207 | |address | output |20 |SRam Address | | |
||
208 | |data | inout |32 |SRam Data | | |
||
209 | |nSRAM_BE0 | output |1 |SRam bankEnable 0 | | |
||
210 | |nSRAM_BE1 | output |1 |SRam bankEnable 1 | | |
||
211 | |nSRAM_BE2 | output |1 |SRam bankEnable 2 | | |
||
212 | |nSRAM_BE3 | output |1 |SRam bankEnable 3 | | |
||
213 | |nSRAM_WE | output |1 |SRam WriteEnable | | |
||
214 | |nSRAM_CE | output |1 |SRam ChipEnable | | |
||
215 | |nSRAM_OE | output |1 |SRam OutputEnable | | |
||
216 | |apbi_ext | output |apb_slv_in_type|APB Slave bus input signal | | |
||
217 | |apbo_ext | input |NB_APB_SLAVE of apb_slv_out_type|APB Slave bus output signal | | |
||
218 | |ahbi_s_ext | output |ahb_slv_in_type|AHB Slave bus input signal | | |
||
219 | |ahbo_s_ext | input |NB_AHB_SLAVE of ahb_slv_out_type |AHB Slave bus output signal | | |
||
220 | |ahbi_m_ext | output |ahb_mst_In_Type|AHB Master bus input signal | | |
||
221 | |ahbo_m_ext | input |NB_AHB_MASTER of ahb_mst_out_type|AHB Master bus output signal | | |
||
222 | }} |