|
| 1 | +// Generated with PeakRD-halcpp : https://github.com/Risto97/PeakRDL-halcpp |
| 2 | +#ifndef __REGS_AND_MEM_HAL_H_ |
| 3 | +#define __REGS_AND_MEM_HAL_H_ |
| 4 | + |
| 5 | +#include <stdint.h> |
| 6 | +#include "include/halcpp_base.h" |
| 7 | + |
| 8 | +#if defined(__clang__) |
| 9 | +#pragma clang diagnostic ignored "-Wundefined-var-template" |
| 10 | +#endif |
| 11 | + |
| 12 | +namespace regs_and_mem_nm |
| 13 | +{ |
| 14 | + |
| 15 | + |
| 16 | + template <uint32_t BASE, uint32_t WIDTH, typename PARENT_TYPE> |
| 17 | + class CSR : public halcpp::RegRW<BASE, WIDTH, PARENT_TYPE> |
| 18 | + { |
| 19 | + public: |
| 20 | + using TYPE = CSR<BASE, WIDTH, PARENT_TYPE>; |
| 21 | + |
| 22 | + static halcpp::FieldRW<0, 7, TYPE> ctrl; |
| 23 | + |
| 24 | + using halcpp::RegRW<BASE, WIDTH, PARENT_TYPE>::operator=; |
| 25 | + }; |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + template <uint32_t BASE, uint32_t WIDTH, typename PARENT_TYPE> |
| 30 | + class CSR2 : public halcpp::RegRW<BASE, WIDTH, PARENT_TYPE> |
| 31 | + { |
| 32 | + public: |
| 33 | + using TYPE = CSR2<BASE, WIDTH, PARENT_TYPE>; |
| 34 | + |
| 35 | + static halcpp::FieldRW<0, 7, TYPE> ctrl; |
| 36 | + |
| 37 | + using halcpp::RegRW<BASE, WIDTH, PARENT_TYPE>::operator=; |
| 38 | + }; |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + template <uint32_t BASE, uint32_t SIZE, typename PARENT_TYPE> |
| 43 | + class MEM1 : public halcpp::MemNode<BASE, SIZE, PARENT_TYPE> |
| 44 | + { |
| 45 | + |
| 46 | + }; |
| 47 | + template <uint32_t BASE, uint32_t SIZE, typename PARENT_TYPE> |
| 48 | + class MEM2_T : public halcpp::MemNode<BASE, SIZE, PARENT_TYPE> |
| 49 | + { |
| 50 | + |
| 51 | + }; |
| 52 | +} |
| 53 | + |
| 54 | + |
| 55 | +template <uint32_t BASE, typename PARENT_TYPE=void> |
| 56 | +class REGS_AND_MEM_HAL : public AddrmapNode<BASE, PARENT_TYPE> |
| 57 | +{ |
| 58 | +public: |
| 59 | + using TYPE = REGS_AND_MEM_HAL<BASE, PARENT_TYPE>; |
| 60 | + |
| 61 | + static regs_and_mem_nm::CSR<0x0, 8, TYPE> csr; |
| 62 | + static regs_and_mem_nm::CSR2<0x4, 8, TYPE> csr2; |
| 63 | + static regs_and_mem_nm::MEM1<0x1000, 256, TYPE> mem1; |
| 64 | + static regs_and_mem_nm::MEM2_T<0x2000, 256, TYPE> mem2; |
| 65 | +}; |
| 66 | + |
| 67 | +#endif // !__REGS_AND_MEM_HAL_H_ |
0 commit comments