[HOT FIX] fix is_inside_execute (#2429)

fix #2385
This commit is contained in:
JeanRochCoulon 2024-08-02 08:42:11 +02:00 committed by GitHub
parent 14fd617455
commit ce4b25c51a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -391,7 +391,7 @@ package config_pkg;
function automatic logic is_inside_execute_regions(cva6_cfg_t Cfg, logic [63:0] address);
// if we don't specify any region we assume everything is accessible
logic [NrMaxRules-1:0] pass;
if (Cfg.NrExecuteRegionRules == 0) begin
if (Cfg.NrExecuteRegionRules != 0) begin
pass = '0;
for (int unsigned k = 0; k < Cfg.NrExecuteRegionRules; k++) begin
pass[k] = range_check(Cfg.ExecuteRegionAddrBase[k], Cfg.ExecuteRegionLength[k], address);