Skip to content

Commit c686024

Browse files
authored
* Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Update efpga_subsystem.rst * Added Math block diagram * Update efpga_subsystem.rst
1 parent ffd36b3 commit c686024

File tree

2 files changed

+99
-17
lines changed

2 files changed

+99
-17
lines changed

docs/doc-src/efpga_subsystem.rst

Lines changed: 99 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,41 +40,96 @@ The eFPGA block
4040

4141
Math Units
4242
^^^^^^^^^^
43+
The EFPGA has 2 Math units attached. Each math unit has 3 block RAMS (4KBytes) and 2 Multipliers.
44+
Each Block RAM has one read port and one write port with independant clocks. Each Port can be independenly configured as 8-bit, 16-bit or 32-bit by the configuration on the appropriate rmode, or wmode inputs.
45+
The Write data can also be selected to be from the fabric or the output of the Associated Multiplier.
46+
47+
48+
.. figure:: ../images/A2_MATH_UNIT.png
49+
:name: MATH Unit Diagram
50+
:align: center
51+
:alt:
4352

4453
Block RAM
4554
^^^^^^^^^
4655

47-
FIFO Controller
48-
^^^^^^^^^^^^^^^
49-
5056
Clocking
5157
^^^^^^^^
58+
The eFPGA recieves 6 clocks from the SOC.
59+
60+
- Clk0 is sourced by the PLL and the eFPGA divisor Circuit.
61+
- CLK1 is sources by the PLL and the peripheral divisor Circuit.
62+
- CLK2 is sourced by the RefClock divisor Circut.
63+
- CLK3 is source by an IO pin.
64+
- CLK4 is sourced by an IO pin.
65+
- CLK5 is sourced by an IO pin.
5266

5367

5468
SoC Interfaces
5569
--------------
5670

5771
Configurable Input/Output Signals
5872
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73+
The example RTL file top.sv in the rtl/simulation folder is functional rtl design for verifying the eFPGA interfaces.
74+
It contain the mapping from the eFPGA to the SoC and IO. The example design instantiates all the interfaces and has simple logic that allows for exercising the interfaces, The various registers allow for control of all the resources and interfaces with simple state machines to demostrate the use of the resources.
5975

60-
APB Interface
76+
L2 Interface
6177
~~~~~~~~~~~~~
78+
The L2 interface to the eFPGA is a memory mapped interface that is allocated a 1Mbyte address space.
79+
It is asynchronous to the CPU and contains clock crossing registers to maintain data integrity.
80+
the following table contains the L2 Interface signals. Various control registers are accessible via the L2 interface to test other functions in the eFPGA.
81+
82+
+------------+-----------------+---------------------------+
83+
| direction | Name | Description. |
84+
+============+=================+===========================+
85+
| input | lint_REQ | Cycle request active high|
86+
+------------+-----------------+---------------------------+
87+
| input | lint_WEN | Write = 1, Read = 0. |
88+
+------------+-----------------+---------------------------+
89+
| input | lint_ADDR[19:0] | Address 20-bits |
90+
+------------+-----------------+---------------------------+
91+
| input | lint_WDATA[31:0]| Write Data 32-bits |
92+
+------------+-----------------+---------------------------+
93+
| input | lint_BE[3:0] | Byte enables 4-bits. |
94+
+------------+-----------------+---------------------------+
95+
| output | lint_VALID | Valid signal (ack) |
96+
+------------+-----------------+---------------------------+
97+
| output | lint_GNT | Grant signal |
98+
+------------+-----------------+---------------------------+
99+
| output | lint_RDATA[31:0]| Read Data 32-bits |
100+
+------------+-----------------+---------------------------+
101+
| output | lint_clk | Clock back to CDC logic |
102+
+------------+-----------------+---------------------------+
62103

63104
TCDM Interface
64105
~~~~~~~~~~~~~~
65-
66-
Interrupts
67-
~~~~~~~~~~
68-
69-
70-
eFPGA Bitstream Loading
71-
-----------------------
72-
73-
eFPGA Configuration Control
74-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
75-
76-
eFPGA Template
77-
~~~~~~~~~~~~~~
106+
Core-v-mcu provides 4 TCDM (Tightly Coupled Distributed memory) Each of the these interfaces has full access to the 512KB of SoC memory allowing
107+
the eFPGA to perform reads and writes to memory. Each interface is connected through Clock Domain Crossing registers as the eFPGA is clocked by
108+
asynchronously from the SoC.
109+
110+
+-----------+----------------------+--------------------------------------------------+
111+
| Direction | Name | Description |
112+
+===========+======================+==================================================+
113+
| output | tcdm_addr_p0[19:0] | 20-bit address for TCDM |
114+
+-----------+----------------------+--------------------------------------------------+
115+
| input | tcdm_rdata_p0[31:0] | 32-bit Read data returned from TCDM |
116+
+-----------+----------------------+--------------------------------------------------+
117+
| input | tcdm_valid_p0 | TCDM read data Valid |
118+
+-----------+----------------------+--------------------------------------------------+
119+
| input | tcdm_gnt_p0 | TCDM Grant indicating the cycle is in progress |
120+
+-----------+----------------------+--------------------------------------------------+
121+
| input | tcdm_fmo_p0 | TCDM interface can accept only one more request |
122+
+-----------+----------------------+--------------------------------------------------+
123+
| output | tcdm_wdata_p0[31:0] | 32-bit Data to write to TCDM |
124+
+-----------+----------------------+--------------------------------------------------+
125+
| output | tcdm_be_p0[3:0] | 4 byte enables for byte writes |
126+
+-----------+----------------------+--------------------------------------------------+
127+
| output | tcdm_wen_p0 | Write enable active high |
128+
+-----------+----------------------+--------------------------------------------------+
129+
| output | tcdm_req_p0 | TCDM cycle request |
130+
+-----------+----------------------+--------------------------------------------------+
131+
| output | tcdm_clk_p0 | TCDM clock from eFPGA to CDC logic |
132+
+-----------+----------------------+--------------------------------------------------+
78133

79134

80135
eFPGA Subsystem Registers
@@ -144,6 +199,8 @@ TCDM_CTL_P3 offset = 0x0C
144199
| tcdm_addr_p3 | 19:0 | RW | 0x0 | Sets the address to be used on TCDM 3 |
145200
+--------------+-------+------+------------+-------------------------------------------------------------+
146201

202+
There are 4 control regsisters (1 for each of te multiplier units) the bits in these registers will configure the multipler operation.
203+
147204
M0_M0_CONTROL offset = 0x10
148205
~~~~~~~~~~~~~~~~~~~~~~~~~~~
149206

@@ -236,29 +293,41 @@ M1_M1_CONTROL offset = 0x1C
236293
| m1_m1_outsel | 5:0 | RW | 0x0 | Math Unit 1, Mutliplier 1 output select |
237294
+--------------+-------+------+------------+---------------------------------------------------------------------------------+
238295

296+
Two RAM control registers are provide to configure the RAMs (1 for each Math unit)
297+
298+
239299
M0_RAM_CONTROL offset = 0x20
240300
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
241301

242302
+----------------+-------+------+------------+-----------------------------------------------+
243303
| Field | Bits | Type | Default | Description |
244304
+================+=======+======+============+===============================================+
245305
| m0_coef_wdsel | 14:14 | RW | 0x0 | Math Unit 0 coefficient RAM write data select |
306+
| | | | | 0 = Fabric, 1 = Multipler output |
246307
+----------------+-------+------+------------+-----------------------------------------------+
247308
| m0_oper1_wdsel | 13:13 | RW | 0x0 | Math Unit 0 Operand 0 RAM write data select |
309+
| | | | | 0 = Fabric, 1 = Multipler output |
248310
+----------------+-------+------+------------+-----------------------------------------------+
249311
| m0_oper0_wdsel | 12:12 | RW | 0x0 | Math Unit 0 Operand 1 RAM write data select |
312+
| | | | | 0 = Fabric, 1 = Multipler output |
250313
+----------------+-------+------+------------+-----------------------------------------------+
251314
| m0_coef_wmode | 11:10 | RW | 0x0 | Math Unit 0 coefficient RAM write mode |
315+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
252316
+----------------+-------+------+------------+-----------------------------------------------+
253317
| m0_coef_rmode | 9:8 | RW | 0x0 | Math Unit 0 coefficient RAM read mode |
318+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
254319
+----------------+-------+------+------------+-----------------------------------------------+
255320
| m0_oper1_wmode | 7:6 | RW | 0x0 | Math Unit 0 operand 0 RAM write mode |
321+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
256322
+----------------+-------+------+------------+-----------------------------------------------+
257323
| m0_oper1_rmode | 5:4 | RW | 0x0 | Math Unit 0 operand 0 RAM read mode |
324+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
258325
+----------------+-------+------+------------+-----------------------------------------------+
259326
| m0_oper0_wmode | 3:2 | RW | 0x0 | Math Unit 0 operand 1 RAM write mode |
327+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
260328
+----------------+-------+------+------------+-----------------------------------------------+
261329
| m0_oper0_rmode | 1:0 | RW | 0x0 | Math Unit 0 operand 1 RAM read mode |
330+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
262331
+----------------+-------+------+------------+-----------------------------------------------+
263332

264333
M1_RAM_CONTROL offset = 0x24
@@ -268,24 +337,37 @@ M1_RAM_CONTROL offset = 0x24
268337
| Field | Bits | Type | Default | Description |
269338
+================+=======+======+============+===============================================+
270339
| m1_coef_wdsel | 14:14 | RW | 0x0 | Math Unit 1 coefficient RAM write data select |
340+
| | | | | 0 = Fabric, 1 = Multipler output |
271341
+----------------+-------+------+------------+-----------------------------------------------+
272342
| m1_oper1_wdsel | 13:13 | RW | 0x0 | Math Unit 1 Operand 0 RAM write data select |
343+
| | | | | 0 = Fabric, 1 = Multipler output |
273344
+----------------+-------+------+------------+-----------------------------------------------+
274345
| m1_oper0_wdsel | 12:12 | RW | 0x0 | Math Unit 1 Operand 1 RAM write data select |
346+
| | | | | 0 = Fabric, 1 = Multipler output |
275347
+----------------+-------+------+------------+-----------------------------------------------+
276348
| m1_coef_wmode | 11:10 | RW | 0x0 | Math Unit 1 coefficient RAM write mode |
349+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
277350
+----------------+-------+------+------------+-----------------------------------------------+
278351
| m1_coef_rmode | 9:8 | RW | 0x0 | Math Unit 1 coefficient RAM read mode |
352+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
279353
+----------------+-------+------+------------+-----------------------------------------------+
280354
| m1_oper1_wmode | 7:6 | RW | 0x0 | Math Unit 1 operand 0 RAM write mode |
355+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
281356
+----------------+-------+------+------------+-----------------------------------------------+
282357
| m1_oper1_rmode | 5:4 | RW | 0x0 | Math Unit 1 operand 0 RAM read mode |
358+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
283359
+----------------+-------+------+------------+-----------------------------------------------+
284360
| m1_oper0_wmode | 3:2 | RW | 0x0 | Math Unit 1 operand 1 RAM write mode |
361+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
285362
+----------------+-------+------+------------+-----------------------------------------------+
286363
| m1_oper0_rmode | 1:0 | RW | 0x0 | Math Unit 1 operand 1 RAM read mode |
364+
| | | | | 00 = 32-bit, 01 = 16=bit 10 = 8=bit |
287365
+----------------+-------+------+------------+-----------------------------------------------+
288366

367+
368+
Four clock enable registers that are write only and clear to zero, when written to a '1' and single
369+
clock enable will be generated to the specified multiplier.
370+
289371
M0_M0_CLKEN offset = 0x30
290372
~~~~~~~~~~~~~~~~~~~~~~~~~
291373

docs/images/A2_MATH_UNIT.png

29.3 KB
Loading

0 commit comments

Comments
 (0)