blob: 2c679effef612cd12e75cae92be8ed610f7b2e5e [file] [log] [blame]
Karl Zhang3de5ab12021-05-31 11:45:48 +08001/*
Nik Dewallybacae6c2024-07-30 16:58:14 +01002 * Copyright (c) 2024, Arm Limited. All rights reserved.
Karl Zhang3de5ab12021-05-31 11:45:48 +08003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include <string>
Nik Dewallybacae6c2024-07-30 16:58:14 +01009
10#include "find_or_create_asset.hpp"
Karl Zhang3de5ab12021-05-31 11:45:48 +080011
12/* This file defines information to track regarding variables in the generated test
13 code. */
14
15#ifndef VARIABLES_HPP
16#define VARIABLES_HPP
17
Karl Zhang3de5ab12021-05-31 11:45:48 +080018using namespace std;
19
20
21/**********************************************************************************
22 Class variable_info tracks everything we know about a given variable in the
23 generated C code.
24**********************************************************************************/
25
26class variable_info
27{
28public:
29 // Data members:
30 /* The existence of this variable tracker means that the data variable and
31 the length variable have been declared, but there are other variants on
32 this variable that may or may not have been declared already. Thus
33 the *_declared bool(s) below. */
34 bool hash_declared; // true if the hash of this variable has been declared
35 bool value_known; // true if the variable's value can be known in simulation
36 string name; // variable name
37 unsigned char value[2048]; // the current value of the variable
38 int length; // of the variable's value
39 psa_asset_type type; // type of info contained in the variable
40
41 // Methods:
42 variable_info (void); // (default constructor)
43 variable_info ( // (constructor with known name and type)
44 string var_name, psa_asset_type var_type
45 );
46 ~variable_info (void); // (destructor)
47
48protected:
49 // Data members:
50};
51
52
53#endif // VARIABLES_HPP