MTL_Monitor/tests/washing_machine/properties/all_props_combined/Prop_combined_topEntity_typ...

318 lines
12 KiB
VHDL

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
package Prop_combined_topEntity_types is
type Tup5 is record
Tup5_sel0_boolean_0 : boolean;
Tup5_sel1_boolean_1 : boolean;
Tup5_sel2_boolean_2 : boolean;
Tup5_sel3_boolean_3 : boolean;
Tup5_sel4_boolean_4 : boolean;
end record;
subtype rst_System is std_logic;
type Tup6 is record
Tup6_sel0_boolean_0 : boolean;
Tup6_sel1_boolean_1 : boolean;
Tup6_sel2_boolean_2 : boolean;
Tup6_sel3_boolean_3 : boolean;
Tup6_sel4_boolean_4 : boolean;
Tup6_sel5_boolean_5 : boolean;
end record;
subtype en_System is boolean;
type Tup10 is record
Tup10_sel0_unsigned_0 : unsigned(4 downto 0);
Tup10_sel1_unsigned_1 : unsigned(4 downto 0);
Tup10_sel2_unsigned_2 : unsigned(4 downto 0);
Tup10_sel3_unsigned_3 : unsigned(4 downto 0);
Tup10_sel4_unsigned_4 : unsigned(4 downto 0);
Tup10_sel5_unsigned_5 : unsigned(4 downto 0);
Tup10_sel6_unsigned_6 : unsigned(4 downto 0);
Tup10_sel7_unsigned_7 : unsigned(4 downto 0);
Tup10_sel8_unsigned_8 : unsigned(4 downto 0);
Tup10_sel9_unsigned_9 : unsigned(4 downto 0);
end record;
type Tup3 is record
Tup3_sel0_unsigned : unsigned(0 downto 0);
Tup3_sel1_Tup10_0 : Tup10;
Tup3_sel2_Tup10_1 : Tup10;
end record;
subtype clk_System is std_logic;
type Tup2_0 is record
Tup2_0_sel0_Tup3 : Tup3;
Tup2_0_sel1_Tup10 : Tup10;
end record;
type array_of_signed_2 is array (integer range <>) of signed(1 downto 0);
type Tup2_1 is record
Tup2_1_sel0_array_of_signed_2 : array_of_signed_2(0 to 0);
Tup2_1_sel1_boolean : boolean;
end record;
type Tup2_3 is record
Tup2_3_sel0_array_of_signed_2 : array_of_signed_2(0 to 11);
Tup2_3_sel1_boolean : boolean;
end record;
type Tup2_4 is record
Tup2_4_sel0_array_of_signed_2_0 : array_of_signed_2(0 to 19);
Tup2_4_sel1_array_of_signed_2_1 : array_of_signed_2(0 to 0);
end record;
type Tup2_2 is record
Tup2_2_sel0_array_of_signed_2 : array_of_signed_2(0 to 6);
Tup2_2_sel1_boolean : boolean;
end record;
type Tup2 is record
Tup2_sel0_array_of_signed_2 : array_of_signed_2(0 to 19);
Tup2_sel1_boolean : boolean;
end record;
type Tup2_6 is record
Tup2_6_sel0_array_of_signed_2_0 : array_of_signed_2(0 to 6);
Tup2_6_sel1_array_of_signed_2_1 : array_of_signed_2(0 to 0);
end record;
type Tup2_7 is record
Tup2_7_sel0_array_of_signed_2_0 : array_of_signed_2(0 to 11);
Tup2_7_sel1_array_of_signed_2_1 : array_of_signed_2(0 to 0);
end record;
type Tup2_5 is record
Tup2_5_sel0_array_of_signed_2_0 : array_of_signed_2(0 to 0);
Tup2_5_sel1_array_of_signed_2_1 : array_of_signed_2(0 to 0);
end record;
function toSLV (b : in boolean) return std_logic_vector;
function fromSLV (sl : in std_logic_vector) return boolean;
function tagToEnum (s : in signed) return boolean;
function dataToTag (b : in boolean) return signed;
function toSLV (u : in unsigned) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return unsigned;
function toSLV (p : Tup5) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup5;
function toSLV (sl : in std_logic) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return std_logic;
function toSLV (p : Tup6) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup6;
function toSLV (p : Tup10) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup10;
function toSLV (p : Tup3) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup3;
function toSLV (s : in signed) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return signed;
function toSLV (p : Tup2_0) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_0;
function toSLV (value : array_of_signed_2) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return array_of_signed_2;
function toSLV (p : Tup2_1) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_1;
function toSLV (p : Tup2_3) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_3;
function toSLV (p : Tup2_4) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_4;
function toSLV (p : Tup2_2) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_2;
function toSLV (p : Tup2) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2;
function toSLV (p : Tup2_6) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_6;
function toSLV (p : Tup2_7) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_7;
function toSLV (p : Tup2_5) return std_logic_vector;
function fromSLV (slv : in std_logic_vector) return Tup2_5;
end;
package body Prop_combined_topEntity_types is
function toSLV (b : in boolean) return std_logic_vector is
begin
if b then
return "1";
else
return "0";
end if;
end;
function fromSLV (sl : in std_logic_vector) return boolean is
begin
if sl = "1" then
return true;
else
return false;
end if;
end;
function tagToEnum (s : in signed) return boolean is
begin
if s = to_signed(0,64) then
return false;
else
return true;
end if;
end;
function dataToTag (b : in boolean) return signed is
begin
if b then
return to_signed(1,64);
else
return to_signed(0,64);
end if;
end;
function toSLV (u : in unsigned) return std_logic_vector is
begin
return std_logic_vector(u);
end;
function fromSLV (slv : in std_logic_vector) return unsigned is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return unsigned(islv);
end;
function toSLV (p : Tup5) return std_logic_vector is
begin
return (toSLV(p.Tup5_sel0_boolean_0) & toSLV(p.Tup5_sel1_boolean_1) & toSLV(p.Tup5_sel2_boolean_2) & toSLV(p.Tup5_sel3_boolean_3) & toSLV(p.Tup5_sel4_boolean_4));
end;
function fromSLV (slv : in std_logic_vector) return Tup5 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 0)),fromSLV(islv(1 to 1)),fromSLV(islv(2 to 2)),fromSLV(islv(3 to 3)),fromSLV(islv(4 to 4)));
end;
function toSLV (sl : in std_logic) return std_logic_vector is
begin
return std_logic_vector'(0 => sl);
end;
function fromSLV (slv : in std_logic_vector) return std_logic is
alias islv : std_logic_vector (0 to slv'length - 1) is slv;
begin
return islv(0);
end;
function toSLV (p : Tup6) return std_logic_vector is
begin
return (toSLV(p.Tup6_sel0_boolean_0) & toSLV(p.Tup6_sel1_boolean_1) & toSLV(p.Tup6_sel2_boolean_2) & toSLV(p.Tup6_sel3_boolean_3) & toSLV(p.Tup6_sel4_boolean_4) & toSLV(p.Tup6_sel5_boolean_5));
end;
function fromSLV (slv : in std_logic_vector) return Tup6 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 0)),fromSLV(islv(1 to 1)),fromSLV(islv(2 to 2)),fromSLV(islv(3 to 3)),fromSLV(islv(4 to 4)),fromSLV(islv(5 to 5)));
end;
function toSLV (p : Tup10) return std_logic_vector is
begin
return (toSLV(p.Tup10_sel0_unsigned_0) & toSLV(p.Tup10_sel1_unsigned_1) & toSLV(p.Tup10_sel2_unsigned_2) & toSLV(p.Tup10_sel3_unsigned_3) & toSLV(p.Tup10_sel4_unsigned_4) & toSLV(p.Tup10_sel5_unsigned_5) & toSLV(p.Tup10_sel6_unsigned_6) & toSLV(p.Tup10_sel7_unsigned_7) & toSLV(p.Tup10_sel8_unsigned_8) & toSLV(p.Tup10_sel9_unsigned_9));
end;
function fromSLV (slv : in std_logic_vector) return Tup10 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 4)),fromSLV(islv(5 to 9)),fromSLV(islv(10 to 14)),fromSLV(islv(15 to 19)),fromSLV(islv(20 to 24)),fromSLV(islv(25 to 29)),fromSLV(islv(30 to 34)),fromSLV(islv(35 to 39)),fromSLV(islv(40 to 44)),fromSLV(islv(45 to 49)));
end;
function toSLV (p : Tup3) return std_logic_vector is
begin
return (toSLV(p.Tup3_sel0_unsigned) & toSLV(p.Tup3_sel1_Tup10_0) & toSLV(p.Tup3_sel2_Tup10_1));
end;
function fromSLV (slv : in std_logic_vector) return Tup3 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 0)),fromSLV(islv(1 to 50)),fromSLV(islv(51 to 100)));
end;
function toSLV (s : in signed) return std_logic_vector is
begin
return std_logic_vector(s);
end;
function fromSLV (slv : in std_logic_vector) return signed is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return signed(islv);
end;
function toSLV (p : Tup2_0) return std_logic_vector is
begin
return (toSLV(p.Tup2_0_sel0_Tup3) & toSLV(p.Tup2_0_sel1_Tup10));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_0 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 100)),fromSLV(islv(101 to 150)));
end;
function toSLV (value : array_of_signed_2) return std_logic_vector is
alias ivalue : array_of_signed_2(1 to value'length) is value;
variable result : std_logic_vector(1 to value'length * 2);
begin
for i in ivalue'range loop
result(((i - 1) * 2) + 1 to i*2) := toSLV(ivalue(i));
end loop;
return result;
end;
function fromSLV (slv : in std_logic_vector) return array_of_signed_2 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
variable result : array_of_signed_2(0 to slv'length / 2 - 1);
begin
for i in result'range loop
result(i) := fromSLV(islv(i * 2 to (i+1) * 2 - 1));
end loop;
return result;
end;
function toSLV (p : Tup2_1) return std_logic_vector is
begin
return (toSLV(p.Tup2_1_sel0_array_of_signed_2) & toSLV(p.Tup2_1_sel1_boolean));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_1 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 1)),fromSLV(islv(2 to 2)));
end;
function toSLV (p : Tup2_3) return std_logic_vector is
begin
return (toSLV(p.Tup2_3_sel0_array_of_signed_2) & toSLV(p.Tup2_3_sel1_boolean));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_3 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 23)),fromSLV(islv(24 to 24)));
end;
function toSLV (p : Tup2_4) return std_logic_vector is
begin
return (toSLV(p.Tup2_4_sel0_array_of_signed_2_0) & toSLV(p.Tup2_4_sel1_array_of_signed_2_1));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_4 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 39)),fromSLV(islv(40 to 41)));
end;
function toSLV (p : Tup2_2) return std_logic_vector is
begin
return (toSLV(p.Tup2_2_sel0_array_of_signed_2) & toSLV(p.Tup2_2_sel1_boolean));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_2 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 13)),fromSLV(islv(14 to 14)));
end;
function toSLV (p : Tup2) return std_logic_vector is
begin
return (toSLV(p.Tup2_sel0_array_of_signed_2) & toSLV(p.Tup2_sel1_boolean));
end;
function fromSLV (slv : in std_logic_vector) return Tup2 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 39)),fromSLV(islv(40 to 40)));
end;
function toSLV (p : Tup2_6) return std_logic_vector is
begin
return (toSLV(p.Tup2_6_sel0_array_of_signed_2_0) & toSLV(p.Tup2_6_sel1_array_of_signed_2_1));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_6 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 13)),fromSLV(islv(14 to 15)));
end;
function toSLV (p : Tup2_7) return std_logic_vector is
begin
return (toSLV(p.Tup2_7_sel0_array_of_signed_2_0) & toSLV(p.Tup2_7_sel1_array_of_signed_2_1));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_7 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 23)),fromSLV(islv(24 to 25)));
end;
function toSLV (p : Tup2_5) return std_logic_vector is
begin
return (toSLV(p.Tup2_5_sel0_array_of_signed_2_0) & toSLV(p.Tup2_5_sel1_array_of_signed_2_1));
end;
function fromSLV (slv : in std_logic_vector) return Tup2_5 is
alias islv : std_logic_vector(0 to slv'length - 1) is slv;
begin
return (fromSLV(islv(0 to 1)),fromSLV(islv(2 to 3)));
end;
end;