From 3a676d732669d2b03c8242e9e055292587692c79 Mon Sep 17 00:00:00 2001 From: Nils Wistoff Date: Fri, 9 Feb 2024 23:05:56 +0100 Subject: [PATCH] cheshire_pkg: Update CVA6 AXI IDs Signed-off-by: Nils Wistoff --- hw/cheshire_pkg.sv | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/cheshire_pkg.sv b/hw/cheshire_pkg.sv index 0f75d57b..6e794e6c 100644 --- a/hw/cheshire_pkg.sv +++ b/hw/cheshire_pkg.sv @@ -430,9 +430,9 @@ package cheshire_pkg; // CVA6 // //////////// - // CVA6 imposes an ID width of 4, but only 6 of 16 IDs are ever used + // CVA6 imposes an ID width of 4, but only 7 of 16 IDs are ever used localparam int unsigned Cva6IdWidth = 4; - localparam int unsigned Cva6IdsUsed = 6; + localparam int unsigned Cva6IdsUsed = 7; typedef logic [Cva6IdWidth-1:0] cva6_id_t; typedef int unsigned cva6_id_map_t [Cva6IdsUsed-1:0][0:1]; @@ -440,23 +440,24 @@ package cheshire_pkg; typedef enum cva6_id_t { Cva6IdBypMmu = 'b1000, Cva6IdBypLoad = 'b1001, - Cva6IdBypStore = 'b1010, - Cva6IdBypAmo = 'b1011, + Cva6IdBypAccel = 'b1010, + Cva6IdBypStore = 'b1011, + Cva6IdBypAmo = 'b1100, Cva6IdICache = 'b0000, - Cva6IdDCache = 'b1100 + Cva6IdDCache = 'b0111 } cva6_id_e; // Choose static colocation of IDs based on how heavily used and/or critical they are function automatic cva6_id_map_t gen_cva6_id_map(cheshire_cfg_t cfg); case (cfg.AxiMstIdWidth) // Provide exclusive ID to I-cache to prevent fetch blocking - 1: return '{'{Cva6IdBypMmu, 0}, '{Cva6IdBypLoad, 0}, '{Cva6IdBypStore, 0}, + 1: return '{'{Cva6IdBypMmu, 0}, '{Cva6IdBypLoad, 0}, '{Cva6IdBypAccel, 0}, '{Cva6IdBypStore, 0}, '{Cva6IdBypAmo, 0}, '{Cva6IdICache, 1}, '{Cva6IdDCache, 0}}; // Colocate Load/Store and MMU/AMO bypasses, respectively - 2: return '{'{Cva6IdBypMmu, 0}, '{Cva6IdBypLoad, 1}, '{Cva6IdBypStore, 1}, + 2: return '{'{Cva6IdBypMmu, 0}, '{Cva6IdBypLoad, 1}, '{Cva6IdBypAccel, 1}, '{Cva6IdBypStore, 1}, '{Cva6IdBypAmo, 0}, '{Cva6IdICache, 2}, '{Cva6IdDCache, 3}}; // Compress output ID space without any serialization - 3: return '{'{Cva6IdBypMmu, 0}, '{Cva6IdBypLoad, 1}, '{Cva6IdBypStore, 2}, + 3: return '{'{Cva6IdBypMmu, 0}, '{Cva6IdBypLoad, 1}, '{Cva6IdBypAccel, 1}, '{Cva6IdBypStore, 2}, '{Cva6IdBypAmo, 3}, '{Cva6IdICache, 4}, '{Cva6IdDCache, 5}}; // With 4b of ID or more, no remapping is necessary default: return '{default: '{0, 0}};