diff --git a/rtl/friscv_bus_perf.sv b/rtl/friscv_bus_perf.sv index 76b50a0..e0a04e6 100644 --- a/rtl/friscv_bus_perf.sv +++ b/rtl/friscv_bus_perf.sv @@ -26,7 +26,10 @@ module friscv_bus_perf output logic [NB_BUS*REG_W*3 -1:0] perfs ); - for (genvar i=0;i 0) begin: RD_OOO_INSTANCE friscv_cache_ooo_mgt @@ -487,6 +488,7 @@ module friscv_dcache ); end + endgenerate /////////////////////////////////////////////////////////////////////////// // Write block management diff --git a/rtl/friscv_io_subsystem.sv b/rtl/friscv_io_subsystem.sv index 622b796..4ff9102 100644 --- a/rtl/friscv_io_subsystem.sv +++ b/rtl/friscv_io_subsystem.sv @@ -78,10 +78,10 @@ module friscv_io_subsystem // Control fsm typedef enum logic[1:0] { - IDLE = 0, - WAIT_WDATA = 1, - WAIT_BRESP = 2, - WAIT_RRESP = 3 + IDLE = 2'h0, + WAIT_WDATA = 2'h1, + WAIT_BRESP = 2'h2, + WAIT_RRESP = 2'h3 } axi4l_fsm; diff --git a/rtl/friscv_m_ext.sv b/rtl/friscv_m_ext.sv index d1f7e4b..2784254 100644 --- a/rtl/friscv_m_ext.sv +++ b/rtl/friscv_m_ext.sv @@ -113,10 +113,16 @@ module friscv_m_ext end end - for (genvar i=0;i 0) begin : IO_MAP_DEC - for (genvar i=0;i=IO_MAP[i*2*XLEN+:XLEN] && addr<=IO_MAP[i*2*XLEN+XLEN+:XLEN]); end diff --git a/rtl/friscv_mpu.sv b/rtl/friscv_mpu.sv index 715957f..f345fd6 100644 --- a/rtl/friscv_mpu.sv +++ b/rtl/friscv_mpu.sv @@ -59,10 +59,10 @@ module friscv_mpu // Address matching A field encoding typedef enum logic[1:0] { - OFF = 0, - TOR = 1, - NA4 = 2, - NAPOT = 3 + OFF = 2'h0, + TOR = 2'h1, + NA4 = 2'h2, + NAPOT = 2'h3 } ADDR_MATCH; // The Sv32 page-based virtual-memory supports 34-bit physical addresses for RV32 @@ -90,7 +90,11 @@ module friscv_mpu // PMP / PMA circuits ///////////////////////////////////////////////////////////////////////////////////////// - generate if (MPU_SUPPORT==0) begin: MPU_OFF + generate + + genvar i; + + if (MPU_SUPPORT==0) begin: MPU_OFF assign imem_pmp_matchs = '0; assign imem_match = 1'b0; @@ -105,7 +109,7 @@ module friscv_mpu end else begin: MPU_ON // Region addres decoding from PMPCFG+PMPADDR CSRs - for (genvar i=0; i