Karl Zhang | 3de5ab1 | 2021-05-31 11:45:48 +0800 | [diff] [blame] | 1 | /* |
Nik Dewally | bacae6c | 2024-07-30 16:58:14 +0100 | [diff] [blame] | 2 | * Copyright (c) 2019-2024, Arm Limited. All rights reserved. |
Karl Zhang | 3de5ab1 | 2021-05-31 11:45:48 +0800 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef SST_TEMPLATE_LINE_HPP |
| 9 | #define SST_TEMPLATE_LINE_HPP |
| 10 | |
| 11 | #include <cstdlib> // for rand() |
Nik Dewally | bacae6c | 2024-07-30 16:58:14 +0100 | [diff] [blame] | 12 | #include <string> |
Karl Zhang | 3de5ab1 | 2021-05-31 11:45:48 +0800 | [diff] [blame] | 13 | |
Nik Dewally | bacae6c | 2024-07-30 16:58:14 +0100 | [diff] [blame] | 14 | #include "data_blocks.hpp" |
| 15 | #include "sst_call.hpp" |
Karl Zhang | 3de5ab1 | 2021-05-31 11:45:48 +0800 | [diff] [blame] | 16 | #include "template_line.hpp" |
Nik Dewally | bacae6c | 2024-07-30 16:58:14 +0100 | [diff] [blame] | 17 | #include "tf_fuzz.hpp" |
Karl Zhang | 3de5ab1 | 2021-05-31 11:45:48 +0800 | [diff] [blame] | 18 | |
| 19 | using namespace std; |
| 20 | |
| 21 | class set_sst_template_line : public sst_template_line |
| 22 | { |
| 23 | public: |
| 24 | // Data members: |
| 25 | // Methods: |
| 26 | void setup_call (set_data_info set_info, bool random_data, |
| 27 | bool fill_in_template, bool create_call, |
| 28 | template_line *temLin, tf_fuzz_info *rsrc) { |
| 29 | define_call<sst_set_call> (set_info, random_data, fill_in_template, |
| 30 | create_call, temLin, rsrc, add_to_end, |
| 31 | dont_set_barrier); |
| 32 | } |
| 33 | set_sst_template_line (tf_fuzz_info *resources); // (constructor) |
| 34 | ~set_sst_template_line (void); |
| 35 | |
| 36 | protected: |
| 37 | // Data members: |
| 38 | // Methods: |
| 39 | string rand_creation_flags (void); // choose a random set of creation flags |
| 40 | |
| 41 | private: |
| 42 | // Data members: |
| 43 | // Methods: |
| 44 | }; |
| 45 | |
| 46 | class remove_sst_template_line : public sst_template_line |
| 47 | { |
| 48 | public: |
| 49 | // Data members: |
| 50 | // Methods: |
| 51 | void setup_call (set_data_info set_info, bool random_data, |
| 52 | bool fill_in_template, bool create_call, |
| 53 | template_line *temLin, tf_fuzz_info *rsrc) { |
| 54 | define_call<sst_remove_call> (set_info, random_data, fill_in_template, |
| 55 | create_call, temLin, rsrc, add_to_end, |
| 56 | dont_set_barrier); |
| 57 | } |
| 58 | remove_sst_template_line (tf_fuzz_info *resources); // (constructor) |
| 59 | ~remove_sst_template_line (void); |
| 60 | |
| 61 | protected: |
| 62 | // Data members: |
| 63 | // Methods: |
| 64 | |
| 65 | private: |
| 66 | // Data members: |
| 67 | // Methods: |
| 68 | }; |
| 69 | |
| 70 | class read_sst_template_line : public sst_template_line |
| 71 | { |
| 72 | public: |
| 73 | // Data members: |
| 74 | // Methods: |
| 75 | void setup_call (set_data_info set_info, bool random_data, |
| 76 | bool fill_in_template, bool create_call, |
| 77 | template_line *temLin, tf_fuzz_info *rsrc) { |
| 78 | define_call<sst_get_call> (set_info, random_data, fill_in_template, |
| 79 | create_call, temLin, rsrc, add_to_end, |
| 80 | dont_set_barrier); |
| 81 | } |
| 82 | read_sst_template_line (tf_fuzz_info *resources); // (constructor) |
| 83 | ~read_sst_template_line (void); |
| 84 | |
| 85 | protected: |
| 86 | // Data members: |
| 87 | // Methods: |
| 88 | |
| 89 | private: |
| 90 | // Data members: |
| 91 | // Methods: |
| 92 | }; |
| 93 | |
| 94 | #endif // #ifndef SST_TEMPLATE_LINE_HPP |