Skip to content

Commit

Permalink
[top_earlgrey] Add AES unit to top-level
Browse files Browse the repository at this point in the history
  • Loading branch information
vogelpi committed Oct 25, 2019
1 parent fde954f commit d453438
Show file tree
Hide file tree
Showing 9 changed files with 370 additions and 251 deletions.
33 changes: 33 additions & 0 deletions hw/top_earlgrey/doc/autogen/top_earlgrey.gen.hjson
Expand Up @@ -308,6 +308,27 @@
]
scan: "false"
}
{
name: aes
type: aes
clock_connections:
{
clk_i: main
}
reset_connections:
{
rst_ni: sys
}
base_addr: 0x40110000
size: 0x1000
bus_device: tlul
bus_host: none
available_input_list: []
available_output_list: []
available_inout_list: []
interrupt_list: []
scan: "false"
}
{
name: hmac
type: hmac
Expand Down Expand Up @@ -451,6 +472,7 @@
spi_device
flash_ctrl
rv_timer
aes
hmac
rv_plic
]
Expand All @@ -464,6 +486,7 @@
spi_device
flash_ctrl
rv_timer
aes
hmac
rv_plic
]
Expand Down Expand Up @@ -594,6 +617,16 @@
size_byte: 0x1000
pipeline: "true"
}
{
name: aes
type: device
clock: main
pipeline_byp: "false"
inst_type: aes
base_addr: 0x40110000
size_byte: 0x1000
pipeline: "true"
}
{
name: rv_plic
type: device
Expand Down
6 changes: 6 additions & 0 deletions hw/top_earlgrey/doc/top_earlgrey.hjson
Expand Up @@ -71,6 +71,12 @@
reset_connections: {rst_ni: "sys"},
base_addr: "0x40080000",
},
{ name: "aes",
type: "aes",
clock_connections: {clk_i: "main"},
reset_connections: {rst_ni: "sys"},
base_addr: "0x40110000",
},
{ name: "hmac",
type: "hmac",
clock_connections: {clk_i: "main"},
Expand Down
9 changes: 7 additions & 2 deletions hw/top_earlgrey/doc/xbar_main.hjson
Expand Up @@ -76,6 +76,11 @@
clock: "main"
pipeline_byp: "false"
},
{ name: "aes",
type: "device",
clock: "main"
pipeline_byp: "false"
},
{ name: "rv_plic",
type: "device",
clock: "main",
Expand All @@ -87,7 +92,7 @@
],
connections: {
corei: ["rom", "debug_mem", "ram_main", "eflash"],
cored: ["rom", "debug_mem", "ram_main", "eflash", "uart", "gpio", "spi_device", "flash_ctrl", "rv_timer", "hmac", "rv_plic"],
dm_sba: ["rom", "ram_main", "eflash", "uart", "gpio", "spi_device", "flash_ctrl", "rv_timer", "hmac", "rv_plic"],
cored: ["rom", "debug_mem", "ram_main", "eflash", "uart", "gpio", "spi_device", "flash_ctrl", "rv_timer", "aes", "hmac", "rv_plic"],
dm_sba: ["rom", "ram_main", "eflash", "uart", "gpio", "spi_device", "flash_ctrl", "rv_timer", "aes", "hmac", "rv_plic"],
},
}
12 changes: 12 additions & 0 deletions hw/top_earlgrey/ip/xbar/doc/autogen/xbar_main.gen.hjson
Expand Up @@ -37,6 +37,7 @@
spi_device
flash_ctrl
rv_timer
aes
hmac
rv_plic
]
Expand All @@ -50,6 +51,7 @@
spi_device
flash_ctrl
rv_timer
aes
hmac
rv_plic
]
Expand Down Expand Up @@ -180,6 +182,16 @@
size_byte: 0x1000
pipeline: "true"
}
{
name: aes
type: device
clock: main
pipeline_byp: "false"
inst_type: aes
base_addr: 0x40110000
size_byte: 0x1000
pipeline: "true"
}
{
name: rv_plic
type: device
Expand Down
6 changes: 6 additions & 0 deletions hw/top_earlgrey/ip/xbar/dv/autogen/xbar_main_bind.sv
Expand Up @@ -86,6 +86,12 @@ module xbar_main_bind;
.h2d (tl_hmac_o),
.d2h (tl_hmac_i)
);
bind xbar_main tlul_assert tlul_assert_device_aes (
.clk_i (clk_main_i),
.rst_ni (rst_main_ni),
.h2d (tl_aes_o),
.d2h (tl_aes_i)
);
bind xbar_main tlul_assert tlul_assert_device_rv_plic (
.clk_i (clk_main_i),
.rst_ni (rst_main_ni),
Expand Down
7 changes: 5 additions & 2 deletions hw/top_earlgrey/ip/xbar/rtl/autogen/tl_main_pkg.sv
Expand Up @@ -16,6 +16,7 @@ package tl_main_pkg;
localparam logic [31:0] ADDR_SPACE_FLASH_CTRL = 32'h 40030000;
localparam logic [31:0] ADDR_SPACE_RV_TIMER = 32'h 40080000;
localparam logic [31:0] ADDR_SPACE_HMAC = 32'h 40120000;
localparam logic [31:0] ADDR_SPACE_AES = 32'h 40110000;
localparam logic [31:0] ADDR_SPACE_RV_PLIC = 32'h 40090000;

localparam logic [31:0] ADDR_MASK_ROM = 32'h 00001fff;
Expand All @@ -28,10 +29,11 @@ package tl_main_pkg;
localparam logic [31:0] ADDR_MASK_FLASH_CTRL = 32'h 00000fff;
localparam logic [31:0] ADDR_MASK_RV_TIMER = 32'h 00000fff;
localparam logic [31:0] ADDR_MASK_HMAC = 32'h 00000fff;
localparam logic [31:0] ADDR_MASK_AES = 32'h 00000fff;
localparam logic [31:0] ADDR_MASK_RV_PLIC = 32'h 00000fff;

localparam int N_HOST = 3;
localparam int N_DEVICE = 11;
localparam int N_DEVICE = 12;

typedef enum int {
TlRom = 0,
Expand All @@ -44,7 +46,8 @@ package tl_main_pkg;
TlFlashCtrl = 7,
TlRvTimer = 8,
TlHmac = 9,
TlRvPlic = 10
TlAes = 10,
TlRvPlic = 11
} tl_device_e;

typedef enum int {
Expand Down

0 comments on commit d453438

Please sign in to comment.