Zane Shelley | 871adec | 2019-07-30 11:01:39 -0500 | [diff] [blame] | 1 | #pragma once |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 2 | |
| 3 | #include <algorithm> |
| 4 | |
Zane Shelley | 52cb1a9 | 2019-08-21 14:38:31 -0500 | [diff] [blame] | 5 | #include <register/hei_register.hpp> |
| 6 | |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 7 | #include <prdrCommon.H> |
| 8 | |
Zane Shelley | 871adec | 2019-07-30 11:01:39 -0500 | [diff] [blame] | 9 | namespace libhei |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 10 | { |
| 11 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 12 | class NotRegister : public Register |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 13 | { |
| 14 | public: |
| 15 | NotRegister() : |
Zane Shelley | 05bac98 | 2019-09-02 20:57:42 -0500 | [diff] [blame] | 16 | Register( ), iv_child(nullptr), iv_iBS(0) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 17 | { |
| 18 | iv_bs = &iv_iBS; |
| 19 | } |
| 20 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 21 | NotRegister(Register & i_arg) : |
| 22 | Register( ), iv_child(&i_arg), |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 23 | iv_iBS(i_arg.GetBitLength()) |
| 24 | { |
| 25 | iv_bs = &iv_iBS; |
| 26 | } |
| 27 | |
| 28 | NotRegister & operator=(const NotRegister & r) |
| 29 | { |
| 30 | iv_child = r.iv_child; |
| 31 | iv_iBS = r.iv_iBS; |
| 32 | //iv_bs = r.iv_bs; <-- don't do this! |
| 33 | return *this; |
| 34 | } |
| 35 | |
| 36 | virtual uint32_t Read() const { return iv_child->Read(); } |
| 37 | virtual uint32_t Write() { return iv_child->Write(); } |
| 38 | |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 39 | const BitString * getBitString( const Chip & i_chip ) const |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 40 | { |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 41 | (*iv_bs) = ~(*iv_child->getBitString(i_chip)); |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 42 | return iv_bs; |
| 43 | } |
| 44 | |
| 45 | virtual uint16_t GetId() const { return iv_child->GetId(); } |
| 46 | virtual void SetId(uint16_t i_id) {} |
| 47 | |
| 48 | bool operator==(const NotRegister & r) const |
| 49 | { return r.iv_child == iv_child; } |
| 50 | |
| 51 | bool operator<(const NotRegister & r) const |
| 52 | { return iv_child < r.iv_child; } |
| 53 | |
| 54 | bool operator>=(const NotRegister & r) const |
| 55 | { return iv_child >= r.iv_child; } |
| 56 | |
| 57 | protected: |
| 58 | BitString & AccessBitString(void) { return iv_iBS; } |
| 59 | void SetBitString(const BitString *) {} |
| 60 | |
| 61 | private: |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 62 | Register * iv_child; |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 63 | |
| 64 | BitStringBuffer * iv_bs; |
| 65 | BitStringBuffer iv_iBS; |
| 66 | }; |
| 67 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 68 | class LeftShiftRegister : public Register |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 69 | { |
| 70 | public: |
| 71 | LeftShiftRegister() : |
Zane Shelley | 05bac98 | 2019-09-02 20:57:42 -0500 | [diff] [blame] | 72 | Register( ), iv_child(nullptr), iv_amount(0), iv_iBS(0) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 73 | { |
| 74 | iv_bs = &iv_iBS; |
| 75 | } |
| 76 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 77 | LeftShiftRegister(Register & i_arg, uint16_t i_amount) : |
| 78 | Register( ), iv_child(&i_arg), iv_amount(i_amount), |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 79 | iv_iBS(i_arg.GetBitLength()) |
| 80 | { |
| 81 | iv_bs = &iv_iBS; |
| 82 | } |
| 83 | |
| 84 | LeftShiftRegister & operator=(const LeftShiftRegister & r) |
| 85 | { |
| 86 | iv_child = r.iv_child; |
| 87 | iv_amount = r.iv_amount; |
| 88 | iv_iBS = r.iv_iBS; |
| 89 | //iv_bs = r.iv_bs; <-- don't do this! |
| 90 | return *this; |
| 91 | } |
| 92 | |
| 93 | virtual uint32_t Read() const { return iv_child->Read(); } |
| 94 | virtual uint32_t Write() { return iv_child->Write(); } |
| 95 | |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 96 | const BitString * getBitString( const Chip & i_chip ) const |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 97 | { |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 98 | (*iv_bs) = (*iv_child->getBitString(i_chip)) << iv_amount; |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 99 | return iv_bs; |
| 100 | } |
| 101 | |
| 102 | virtual uint16_t GetId() const { return iv_child->GetId(); } |
| 103 | virtual void SetId(uint16_t i_id) {} |
| 104 | |
| 105 | bool operator==(const LeftShiftRegister & r) const |
| 106 | { return (r.iv_child == iv_child) && (r.iv_amount == iv_amount); } |
| 107 | |
| 108 | bool operator<(const LeftShiftRegister & r) const |
| 109 | { |
| 110 | if (iv_child == r.iv_child) |
| 111 | return iv_amount < r.iv_amount; |
| 112 | return iv_child < r.iv_child; |
| 113 | } |
| 114 | |
| 115 | bool operator>=(const LeftShiftRegister & r) const |
| 116 | { |
| 117 | if (iv_child == r.iv_child) |
| 118 | return iv_amount >= r.iv_amount; |
| 119 | return iv_child >= r.iv_child; |
| 120 | } |
| 121 | |
| 122 | protected: |
| 123 | BitString & AccessBitString(void) { return iv_iBS; } |
| 124 | void SetBitString(const BitString *) {} |
| 125 | |
| 126 | private: |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 127 | Register * iv_child; |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 128 | uint16_t iv_amount; |
| 129 | |
| 130 | BitStringBuffer * iv_bs; |
| 131 | BitStringBuffer iv_iBS; |
| 132 | }; |
| 133 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 134 | class RightShiftRegister : public Register |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 135 | { |
| 136 | public: |
| 137 | RightShiftRegister() : |
Zane Shelley | 05bac98 | 2019-09-02 20:57:42 -0500 | [diff] [blame] | 138 | Register( ), iv_child(nullptr), iv_amount(0), iv_iBS(0) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 139 | { |
| 140 | iv_bs = &iv_iBS; |
| 141 | } |
| 142 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 143 | RightShiftRegister(Register & i_arg, uint16_t i_amount) : |
| 144 | Register( ), iv_child(&i_arg), iv_amount(i_amount), |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 145 | iv_iBS(i_arg.GetBitLength()) |
| 146 | { |
| 147 | iv_bs = &iv_iBS; |
| 148 | } |
| 149 | |
| 150 | RightShiftRegister & operator=(const RightShiftRegister & r) |
| 151 | { |
| 152 | iv_child = r.iv_child; |
| 153 | iv_amount = r.iv_amount; |
| 154 | iv_iBS = r.iv_iBS; |
| 155 | //iv_bs = r.iv_bs; <-- don't do this! |
| 156 | return *this; |
| 157 | } |
| 158 | |
| 159 | virtual uint32_t Read() const { return iv_child->Read(); } |
| 160 | virtual uint32_t Write() { return iv_child->Write(); } |
| 161 | |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 162 | const BitString * getBitString( const Chip & i_chip ) const |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 163 | { |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 164 | (*iv_bs) = (*iv_child->getBitString(i_chip)) >> iv_amount; |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 165 | return iv_bs; |
| 166 | } |
| 167 | |
| 168 | virtual uint16_t GetId() const { return iv_child->GetId(); } |
| 169 | virtual void SetId(uint16_t i_id) {} |
| 170 | |
| 171 | bool operator==(const RightShiftRegister & r) const |
| 172 | { return (r.iv_child == iv_child) && (r.iv_amount == iv_amount); } |
| 173 | |
| 174 | bool operator<(const RightShiftRegister & r) const |
| 175 | { |
| 176 | if (iv_child == r.iv_child) |
| 177 | return iv_amount < r.iv_amount; |
| 178 | return iv_child < r.iv_child; |
| 179 | } |
| 180 | |
| 181 | bool operator>=(const RightShiftRegister & r) const |
| 182 | { |
| 183 | if (iv_child == r.iv_child) |
| 184 | return iv_amount >= r.iv_amount; |
| 185 | return iv_child >= r.iv_child; |
| 186 | } |
| 187 | |
| 188 | protected: |
| 189 | BitString & AccessBitString(void) { return iv_iBS; } |
| 190 | void SetBitString(const BitString *) {} |
| 191 | |
| 192 | private: |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 193 | Register * iv_child; |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 194 | uint16_t iv_amount; |
| 195 | |
| 196 | BitStringBuffer * iv_bs; |
| 197 | BitStringBuffer iv_iBS; |
| 198 | }; |
| 199 | |
| 200 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 201 | class AndRegister : public Register |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 202 | { |
| 203 | public: |
| 204 | AndRegister() : |
Zane Shelley | 05bac98 | 2019-09-02 20:57:42 -0500 | [diff] [blame] | 205 | Register( ), iv_left(nullptr), iv_right(nullptr), iv_iBS(0) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 206 | { |
| 207 | iv_bs = &iv_iBS; |
| 208 | } |
| 209 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 210 | AndRegister( Register & i_left, |
| 211 | Register & i_right ) : |
| 212 | Register( ), iv_left(&i_left), iv_right(&i_right), |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 213 | iv_iBS(std::min(i_left.GetBitLength(), |
| 214 | i_right.GetBitLength())) |
| 215 | { |
| 216 | iv_bs = &iv_iBS; |
| 217 | } |
| 218 | |
| 219 | AndRegister & operator=(const AndRegister & r) |
| 220 | { |
| 221 | iv_left = r.iv_left; |
| 222 | iv_right = r.iv_right; |
| 223 | iv_iBS = r.iv_iBS; |
| 224 | //iv_bs = r.iv_bs; <-- don't do this! |
| 225 | return *this; |
| 226 | } |
| 227 | |
| 228 | virtual uint32_t Read() const |
| 229 | { |
| 230 | return iv_left->Read() | iv_right->Read(); |
| 231 | } |
| 232 | virtual uint32_t Write() |
| 233 | { |
| 234 | return iv_left->Write() | iv_right->Write(); |
| 235 | } |
| 236 | |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 237 | const BitString * getBitString( const Chip & i_chip ) const |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 238 | { |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 239 | (*iv_bs) = *iv_left->getBitString(i_chip); |
| 240 | (*iv_bs) = (*iv_bs) & (*iv_right->getBitString(i_chip)); |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 241 | return iv_bs; |
| 242 | } |
| 243 | |
| 244 | virtual uint16_t GetId() const |
| 245 | { |
| 246 | return Prdr::SignatureOp::combineSig(iv_left->GetId(), |
| 247 | iv_right->GetId()); |
| 248 | } |
| 249 | |
| 250 | virtual void SetId(uint16_t i_id) {} |
| 251 | |
| 252 | bool operator==(const AndRegister & r) const |
| 253 | { return (r.iv_left == iv_left) && (r.iv_right == iv_right); } |
| 254 | |
| 255 | bool operator<(const AndRegister & r) const |
| 256 | { |
| 257 | if (iv_left == r.iv_left) |
| 258 | return iv_right < r.iv_right; |
| 259 | return iv_left < r.iv_left; |
| 260 | } |
| 261 | |
| 262 | bool operator>=(const AndRegister & r) const |
| 263 | { |
| 264 | if (iv_left == r.iv_left) |
| 265 | return iv_right >= r.iv_right; |
| 266 | return iv_left >= r.iv_left; |
| 267 | } |
| 268 | |
| 269 | protected: |
| 270 | BitString & AccessBitString(void) { return iv_iBS; } |
| 271 | void SetBitString(const BitString *) {} |
| 272 | |
| 273 | private: |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 274 | Register * iv_left; |
| 275 | Register * iv_right; |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 276 | |
| 277 | BitStringBuffer * iv_bs; |
| 278 | BitStringBuffer iv_iBS; |
| 279 | }; |
| 280 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 281 | class OrRegister : public Register |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 282 | { |
| 283 | public: |
| 284 | |
| 285 | OrRegister() : |
Zane Shelley | 05bac98 | 2019-09-02 20:57:42 -0500 | [diff] [blame] | 286 | Register( ), iv_left(nullptr), iv_right(nullptr), iv_iBS(0) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 287 | { |
| 288 | iv_bs = &iv_iBS; |
| 289 | } |
| 290 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 291 | OrRegister( Register & i_left, |
| 292 | Register & i_right ) : |
| 293 | Register( ), iv_left(&i_left), iv_right(&i_right), |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 294 | iv_iBS(std::min(i_left.GetBitLength(), |
| 295 | i_right.GetBitLength())) |
| 296 | { |
| 297 | iv_bs = &iv_iBS; |
| 298 | } |
| 299 | |
| 300 | OrRegister & operator=(const OrRegister & r) |
| 301 | { |
| 302 | iv_left = r.iv_left; |
| 303 | iv_right = r.iv_right; |
| 304 | iv_iBS = r.iv_iBS; |
| 305 | //iv_bs = r.iv_bs; <-- don't do this! |
| 306 | return *this; |
| 307 | } |
| 308 | |
| 309 | virtual uint32_t Read() const |
| 310 | { |
| 311 | return iv_left->Read() | iv_right->Read(); |
| 312 | } |
| 313 | |
| 314 | virtual uint32_t Write() |
| 315 | { |
| 316 | return iv_left->Write() | iv_right->Write(); |
| 317 | } |
| 318 | |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 319 | const BitString * getBitString( const Chip & i_chip ) const |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 320 | { |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 321 | (*iv_bs) = *iv_left->getBitString(i_chip); |
| 322 | (*iv_bs) = (*iv_bs) | (*iv_right->getBitString(i_chip)); |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 323 | return iv_bs; |
| 324 | } |
| 325 | |
| 326 | virtual uint16_t GetId() const |
| 327 | { |
| 328 | return Prdr::SignatureOp::combineSig( iv_left->GetId(), |
| 329 | iv_right->GetId() ); |
| 330 | } |
| 331 | |
| 332 | virtual void SetId(uint16_t i_id) {} |
| 333 | |
| 334 | bool operator==(const OrRegister & r) const |
| 335 | { return (r.iv_left == iv_left) && (r.iv_right == iv_right); } |
| 336 | |
| 337 | bool operator<(const OrRegister & r) const |
| 338 | { |
| 339 | if (iv_left == r.iv_left) |
| 340 | return iv_right < r.iv_right; |
| 341 | return iv_left < r.iv_left; |
| 342 | } |
| 343 | |
| 344 | bool operator>=(const OrRegister & r) const |
| 345 | { |
| 346 | if (iv_left == r.iv_left) |
| 347 | return iv_right >= r.iv_right; |
| 348 | return iv_left >= r.iv_left; |
| 349 | } |
| 350 | |
| 351 | protected: |
| 352 | BitString & AccessBitString(void) { return iv_iBS; } |
| 353 | void SetBitString(const BitString *) {} |
| 354 | |
| 355 | private: |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 356 | Register * iv_left; |
| 357 | Register * iv_right; |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 358 | |
| 359 | BitStringBuffer * iv_bs; |
| 360 | BitStringBuffer iv_iBS; |
| 361 | }; |
| 362 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 363 | class NullRegister : public Register |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 364 | { |
| 365 | public: |
| 366 | NullRegister(int size) : |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 367 | Register( ), iv_iBS(size) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 368 | {} |
| 369 | |
| 370 | NullRegister & operator=(const NullRegister & r) |
| 371 | { |
| 372 | iv_iBS = r.iv_iBS; |
| 373 | return *this; |
| 374 | } |
| 375 | |
| 376 | virtual uint32_t Read() const { return 0; } |
| 377 | virtual uint32_t Write() { return 0; } |
| 378 | |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 379 | const BitString * getBitString( const Chip & i_chip ) const |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 380 | { |
| 381 | return &iv_iBS; |
| 382 | } |
| 383 | |
| 384 | protected: |
| 385 | BitString & AccessBitString(void) { return iv_iBS; } |
| 386 | void SetBitString(const BitString *) {} |
| 387 | |
| 388 | private: |
| 389 | BitStringBuffer iv_iBS; |
| 390 | |
| 391 | virtual uint16_t GetId() const |
| 392 | { return Prdr::SignatureOp::DEFAULT_SIGNATURE; } |
| 393 | |
| 394 | virtual void SetId(uint16_t i_id) {} |
| 395 | |
| 396 | }; |
| 397 | |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 398 | class ConstantRegister : public Register |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 399 | { |
| 400 | public: |
| 401 | ConstantRegister() : |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 402 | Register( ), iv_iBS(0) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 403 | {} |
| 404 | |
| 405 | ConstantRegister( const BitStringBuffer & i_arg ) : |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 406 | Register( ), iv_iBS(i_arg) |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 407 | {} |
| 408 | |
| 409 | ConstantRegister & operator=(const ConstantRegister & r) |
| 410 | { |
| 411 | iv_iBS = r.iv_iBS; |
| 412 | return *this; |
| 413 | } |
| 414 | |
| 415 | virtual uint32_t Read() const { return SUCCESS; } |
| 416 | virtual uint32_t Write() { return SUCCESS; } |
| 417 | |
Zane Shelley | 53efc35 | 2019-10-03 21:46:39 -0500 | [diff] [blame] | 418 | const BitString * getBitString( const Chip & i_chip ) const |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 419 | { |
| 420 | return &iv_iBS; |
| 421 | } |
| 422 | |
| 423 | virtual uint16_t GetId() const |
| 424 | { return Prdr::SignatureOp::DEFAULT_SIGNATURE; } |
| 425 | |
| 426 | virtual void SetId(uint16_t i_id) {} |
| 427 | |
| 428 | bool operator==(const ConstantRegister & r) const |
| 429 | { return r.iv_iBS == iv_iBS; } |
| 430 | |
| 431 | protected: |
| 432 | BitString & AccessBitString(void) { return iv_iBS; } |
| 433 | void SetBitString(const BitString *) {} |
| 434 | |
| 435 | private: |
| 436 | BitStringBuffer iv_iBS; |
| 437 | }; |
| 438 | |
Zane Shelley | 871adec | 2019-07-30 11:01:39 -0500 | [diff] [blame] | 439 | } // end namespace libhei |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 440 | |