You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: EF_AES.yaml
+8-9
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,12 @@
1
1
---
2
2
info:
3
-
name: SW_AES
4
-
description: Verilog implementation of the symmetric block cipher AES (Advanced
5
-
Encryption Standard) as specified in NIST FIPS 197. This implementation supports
6
-
128 and 256 bit keys.
7
-
repo: github.com/efabless/SW_AES
8
-
owner: secworks
9
-
license: MIT
10
-
author: Joachim Strombergson
11
-
email: ''
3
+
name: EF_AES
4
+
description: APB, AHBL and wishbone wrappers for the symmetric block cipher AES (Advanced Encryption Standard) which is implemented in Verilog in the [secworks/aes](https://github.com/secworks/aes/tree/master) repository.
Verilog implementation of the symmetric block cipher AES (Advanced Encryption Standard) as specified in NIST FIPS 197. This implementation supports 128 and 256 bit keys. The AES rtl is based on [this repo](https://github.com/secworks/aes/tree/master)
1
+
# EF_AES
4
2
3
+
APB, AHBL and wishbone wrappers for the symmetric block cipher AES (Advanced Encryption Standard) which is implemented in Verilog in the [secworks/aes](https://github.com/secworks/aes/tree/master) repository.
5
4
## The wrapped IP
6
5
7
6
8
-
APB, AHBL, and Wishbone wrappers, generated by the [BusWrap](https://github.com/efabless/BusWrap/tree/main)`bus_wrap.py` utility, are provided. All wrappers provide the same programmer's interface as outlined in the following sections.
7
+
APB, AHBL, and Wishbone wrappers are provided. All wrappers provide the same programmer's interface as outlined in the following sections.
9
8
10
-
### Wrapped IP System Integration
9
+
####Wrapped IP System Integration
11
10
12
-
Based on your use case, use one of the provided wrappers or create a wrapper for your system bus type. For an example of how to integrate the APB wrapper:
11
+
Based on your use case, use one of the provided wrappers or create a wrapper for your system bus type. For an example of how to integrate the wishbone wrapper:
13
12
```verilog
14
-
SW_AES_APB INST (
15
-
`TB_APB_SLAVE_CONN
13
+
EF_AES_WB INST (
14
+
.clk_i(clk_i),
15
+
.rst_i(rst_i),
16
+
.adr_i(adr_i),
17
+
.dat_i(dat_i),
18
+
.dat_o(dat_o),
19
+
.sel_i(sel_i),
20
+
.cyc_i(cyc_i),
21
+
.stb_i(stb_i),
22
+
.ack_o(ack_o),
23
+
.we_i(we_i),
24
+
.IRQ(irq),
16
25
);
17
26
```
18
-
> **_NOTE:_** `TB_APB_SLAVE_CONN is a convenient macro provided by [BusWrap](https://github.com/efabless/BusWrap/tree/main).
27
+
#### Wrappers with DFT support
28
+
Wrappers in the directory ``/hdl/rtl/bus_wrappers/DFT`` have an extra input port ``sc_testmode`` to disable the clock gate whenever the scan chain testmode is enabled.
19
29
20
30
## Implementation example
21
31
22
-
The following table is the result for implementing the SW_AES IP with different wrappers using Sky130 PDK and [OpenLane2](https://github.com/efabless/openlane2) flow.
32
+
The following table is the result for implementing the EF_AES IP with different wrappers using Sky130 PDK and [OpenLane2](https://github.com/efabless/openlane2) flow.
23
33
|Module | Number of cells | Max. freq |
24
34
|---|---|---|
25
-
|SW_AES|TBD| TBD |
26
-
|SW_AES_APB|TBD|TBD|
27
-
|SW_AES_AHBL|TBD|TBD|
28
-
|SW_AES_WB|TBD|TBD|
35
+
|EF_AES|TBD| TBD |
36
+
|EF_AES_APB|TBD|TBD|
37
+
|EF_AES_AHBL|TBD|TBD|
38
+
|EF_AES_WB|TBD|TBD|
29
39
## The Programmer's Interface
30
40
31
41
@@ -55,6 +65,7 @@ The following table is the result for implementing the SW_AES IP with different
55
65
|RIS|ff08|0x00000000|w|Raw Interrupt Status; reflects the current interrupts status;check the interrupt flags table for more details|
56
66
|MIS|ff04|0x00000000|w|Masked Interrupt Status; On a read, this register gives the current masked status value of the corresponding interrupt. A write has no effect; check the interrupt flags table for more details|
57
67
|IC|ff0c|0x00000000|w|Interrupt Clear Register; On a write of 1, the corresponding interrupt (both raw interrupt and masked interrupt, if enabled) is cleared; check the interrupt flags table for more details|
The wrapped IP provides four registers to deal with interrupts: IM, RIS, MIS and IC. These registers exist for all wrapper types generated by the [BusWrap](https://github.com/efabless/BusWrap/tree/main)`bus_wrap.py` utility.
184
+
The wrapped IP provides four registers to deal with interrupts: IM, RIS, MIS and IC. These registers exist for all wrapper types.
182
185
183
186
Each register has a group of bits for the interrupt sources/flags.
184
-
-`IM`: is used to enable/disable interrupt sources.
187
+
-`IM`[offset: 0xff00]: is used to enable/disable interrupt sources.
185
188
186
-
-`RIS`: has the current interrupt status (interrupt flags) whether they are enabled or disabled.
189
+
-`RIS`[offset: 0xff08]: has the current interrupt status (interrupt flags) whether they are enabled or disabled.
187
190
188
-
-`MIS`: is the result of masking (ANDing) RIS by IM.
191
+
-`MIS`[offset: 0xff04]: is the result of masking (ANDing) RIS by IM.
189
192
190
-
-`IC`: is used to clear an interrupt flag.
193
+
-`IC`[offset: 0xff0c]: is used to clear an interrupt flag.
191
194
192
195
193
196
The following are the bit definitions for the interrupt registers:
@@ -196,11 +199,18 @@ The following are the bit definitions for the interrupt registers:
196
199
|---|---|---|---|
197
200
|0|VALID|1|Result is valid|
198
201
|1|READY|1|Ready to start|
202
+
### Clock Gating
203
+
The IP includes a clock gating feature that allows selective activation and deactivation of the clock using the ``GCLK`` register. This capability is implemented through the ``ef_util_gating_cell`` module, which is part of the common modules library, [ef_util_lib.v](https://github.com/efabless/EF_IP_UTIL/blob/main/hdl/ef_util_lib.v). By default, the clock gating is disabled. To enable behavioral implmentation clock gating, only for simulation purposes, you should define the ``CLKG_GENERIC`` macro. Alternatively, define the ``CLKG_SKY130_HD`` macro if you wish to use the SKY130 HD library clock gating cell, ``sky130_fd_sc_hd__dlclkp_4``.
199
204
200
-
### The Interface
205
+
**Note:** If you choose the [OpenLane2](https://github.com/efabless/openlane2) flow for implementation and would like to enable the clock gating feature, you need to add ``CLKG_SKY130_HD`` macro to the ``VERILOG_DEFINES`` configuration variable. Update OpenLane2 YAML configuration file as follows:
206
+
```
207
+
VERILOG_DEFINES:
208
+
- CLKG_SKY130_HD
209
+
```
201
210
202
-
<imgsrc="docs/aes_core.svg"width="600"/>
211
+
### The Interface
203
212
213
+
<imgsrc="docs/_static/EF_AES.svg"width="600"/>
204
214
205
215
#### Ports
206
216
@@ -215,13 +225,17 @@ The following are the bit definitions for the interrupt registers:
215
225
|block|input|128|block value|
216
226
|result|output|128|result value|
217
227
|result_valid|output|1|result is valid|
218
-
## F/W Usage Guidelines:
219
-
TBD
228
+
## Firmware Drivers:
229
+
Firmware drivers for EF_AES can be found in the [fw](https://github.com/efabless/EF_AES/tree/main/fw) directory. EF_AES driver documentation is available [here](https://github.com/efabless/EF_AES/blob/main/fw/README.md).
230
+
You can also find an example C application using the EF_AES drivers [here]().
220
231
## Installation:
221
-
You can either clone repo or use [IPM](https://github.com/efabless/IPM) which is an open-source IPs Package Manager
* To download via IPM , follow installation guides [here](https://github.com/efabless/IPM/blob/main/README.md) then run
225
-
```ipm install SW_AES```
226
-
### Run cocotb UVM Testbench:
227
-
TBD
232
+
You can install the IP either by cloning this repository or by using [IPM](https://github.com/efabless/IPM).
233
+
##### 1. Using [IPM](https://github.com/efabless/IPM):
234
+
-[Optional] If you do not have IPM installed, follow the installation guide [here](https://github.com/efabless/IPM/blob/main/README.md)
235
+
- After installing IPM, execute the following command ```ipm install EF_AES```.
236
+
> **Note:** This method is recommended as it automatically installs [EF_IP_UTIL](https://github.com/efabless/EF_IP_UTIL.git) as a dependency.
237
+
##### 2. Cloning this repo:
238
+
- Clone [EF_IP_UTIL](https://github.com/efabless/EF_IP_UTIL.git) repository, which includes the required modules from the common modules library, [ef_util_lib.v](https://github.com/efabless/EF_IP_UTIL/blob/main/hdl/ef_util_lib.v).
0 commit comments