ariane_pkg: Prevent overflow during range_check

Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
This commit is contained in:
Nils Wistoff 2021-11-09 19:11:57 +01:00 committed by Florian Zaruba
parent c72a9e5d56
commit 8dd06b5f9e

View file

@ -96,7 +96,7 @@ package ariane_pkg;
function automatic logic range_check(logic[63:0] base, logic[63:0] len, logic[63:0] address);
// if len is a power of two, and base is properly aligned, this check could be simplified
return (address >= base) && (address < (base+len));
return (address >= base) && (address < (65'(base)+len));
endfunction : range_check
function automatic logic is_inside_nonidempotent_regions (ariane_cfg_t Cfg, logic[63:0] address);