Skip to content

Commit

Permalink
revert renaming 'value' to 'val'
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jun 11, 2019
1 parent 86b1367 commit 98393fd
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
34 changes: 17 additions & 17 deletions vunit/vhdl/data_types/src/string_ptr_pkg-body-200x.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package body string_ptr_pkg is
impure function new_vector (
length : natural := 0;
id : integer := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) return natural;

impure function is_external (
Expand Down Expand Up @@ -44,7 +44,7 @@ package body string_ptr_pkg is
ref : natural;
length : natural;
drop : natural := 0;
val : val_t := val_t'low
value : val_t := val_t'low
);

impure function to_string (
Expand Down Expand Up @@ -122,14 +122,14 @@ package body string_ptr_pkg is
impure function new_vector (
length : natural := 0;
id : integer := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) return natural is begin
reallocate_ids(st.ids, st.id);
if id = 0 then
st.ids(st.id) := (id => st.ptr, length => 0);

reallocate_ptrs(st.ptrs, st.ptr);
st.ptrs(st.ptr) := new vec_t'(1 to length => val);
st.ptrs(st.ptr) := new vec_t'(1 to length => value);
st.ptr := st.ptr + 1;
else
assert length>0 report "Length of external memory cannot be 0" severity error;
Expand Down Expand Up @@ -246,7 +246,7 @@ package body string_ptr_pkg is
ref : natural;
length : natural;
drop : natural := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) is
variable oldp, newp : string_access_t;
variable min_len : natural := length;
Expand All @@ -256,7 +256,7 @@ package body string_ptr_pkg is
-- @TODO Implement resize for external models
check_external(ref, "resize");
else
newp := new vec_t'(1 to length => val);
newp := new vec_t'(1 to length => value);
oldp := st.ptrs(s.id);
if min_len > oldp'length - drop then
min_len := oldp'length - drop;
Expand Down Expand Up @@ -302,24 +302,24 @@ package body string_ptr_pkg is
impure function new_string_ptr (
length : natural := 0;
id : integer := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) return ptr_t is begin
return (ref => vec_ptr_storage.new_vector(
length => length,
val => val,
value => value,
id => id
));
end;

impure function new_string_ptr (
length : natural := 0;
id : integer := 0;
val : natural
value : natural
) return ptr_t is begin
return (ref => vec_ptr_storage.new_vector(
length => length,
val => character'val(val),
id => id
value => character'val(value),
id => id
));
end;

Expand Down Expand Up @@ -394,9 +394,9 @@ package body string_ptr_pkg is
procedure reallocate (
ptr : ptr_t;
length : natural;
val : val_t := val_t'low
value : val_t := val_t'low
) is
variable n_value : string(1 to length) := (1 to length => val);
variable n_value : string(1 to length) := (1 to length => value);
begin
vec_ptr_storage.reallocate(ptr.ref, n_value);
end;
Expand All @@ -413,18 +413,18 @@ package body string_ptr_pkg is
ptr : ptr_t;
length : natural;
drop : natural := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) is begin
vec_ptr_storage.resize(ptr.ref, length, drop, val);
vec_ptr_storage.resize(ptr.ref, length, drop, value);
end;

procedure resize (
ptr : ptr_t;
length : natural;
drop : natural := 0;
val : natural
value : natural
) is begin
vec_ptr_storage.resize(ptr.ref, length, drop, character'val(val));
vec_ptr_storage.resize(ptr.ref, length, drop, character'val(value));
end;

impure function to_string (
Expand Down
20 changes: 10 additions & 10 deletions vunit/vhdl/data_types/src/string_ptr_pkg-body-93.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ package body string_ptr_pkg is
impure function new_string_ptr (
length : natural := 0;
id : integer := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) return ptr_t is begin
reallocate_ids(st.ids, st.id);
if id = 0 then
st.ids(st.id) := (id => st.ptr, length => 0);

reallocate_ptrs(st.ptrs, st.ptr);
st.ptrs(st.ptr) := new vec_t'(1 to length => val);
st.ptrs(st.ptr) := new vec_t'(1 to length => value);
st.ptr := st.ptr + 1;
else
assert length>0 report "Length of external memory cannot be 0" severity error;
Expand All @@ -102,11 +102,11 @@ package body string_ptr_pkg is
impure function new_string_ptr (
length : natural := 0;
id : integer := 0;
val : natural
value : natural
) return ptr_t is begin
return new_string_ptr(
length => length,
val => character'val(val),
value => character'val(value),
id => id
);
end;
Expand Down Expand Up @@ -237,9 +237,9 @@ package body string_ptr_pkg is
procedure reallocate (
ptr : ptr_t;
length : natural;
val : val_t := val_t'low
value : val_t := val_t'low
) is
variable n_value : string(1 to length) := (1 to length => val);
variable n_value : string(1 to length) := (1 to length => value);
begin
reallocate(ptr, n_value);
end;
Expand All @@ -256,7 +256,7 @@ package body string_ptr_pkg is
ptr : ptr_t;
length : natural;
drop : natural := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) is
variable oldp, newp : string_access_t;
variable min_len : natural := length;
Expand All @@ -266,7 +266,7 @@ package body string_ptr_pkg is
-- @TODO Implement resize for external models
check_external(ptr, "resize");
else
newp := new vec_t'(1 to length => val);
newp := new vec_t'(1 to length => value);
oldp := st.ptrs(s.id);
if min_len > oldp'length - drop then
min_len := oldp'length - drop;
Expand All @@ -283,9 +283,9 @@ package body string_ptr_pkg is
ptr : ptr_t;
length : natural;
drop : natural := 0;
val : natural
value : natural
) is begin
resize(ptr, length, drop, character'val(val));
resize(ptr, length, drop, character'val(value));
end;

impure function to_string (
Expand Down
10 changes: 5 additions & 5 deletions vunit/vhdl/data_types/src/string_ptr_pkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ package string_ptr_pkg is
impure function new_string_ptr (
length : natural := 0;
id : integer := 0;
val : val_t := val_t'low
value : val_t := val_t'low
) return ptr_t;

impure function new_string_ptr (
length : natural := 0;
id : integer := 0;
val : natural
value : natural
) return ptr_t;

impure function new_string_ptr (
Expand Down Expand Up @@ -100,7 +100,7 @@ package string_ptr_pkg is
procedure reallocate (
ptr : ptr_t;
length : natural;
val : val_t := val_t'low
value : val_t := val_t'low
);

procedure reallocate (
Expand All @@ -113,14 +113,14 @@ package string_ptr_pkg is
ptr : ptr_t;
length : natural;
drop : natural := 0;
val : val_t := val_t'low
value : val_t := val_t'low
);

procedure resize (
ptr : ptr_t;
length : natural;
drop : natural := 0;
val : natural
value : natural
);

impure function to_string (
Expand Down

0 comments on commit 98393fd

Please sign in to comment.