Download OpenTimer_OpenTimer/ot/timer/clock.hpp from SAIFIINDUSTRIES/verilog_data-2: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/timer/clock.hpp
- Command line
-
hf download hf://datasets/SAIFIINDUSTRIES/verilog_data-2/OpenTimer_OpenTimer/ot/timer/clock.hpp
-
curl -L -o clock.hpp https://huggingface.co/datasets/SAIFIINDUSTRIES/verilog_data-2/resolve/main/OpenTimer_OpenTimer/ot/timer/clock.hpp
1.1 kB
| namespace ot { | |
| // Class: Clock | |
| class Clock { | |
| friend class Timer; | |
| public: | |
| Clock(const std::string&, float); | |
| Clock(const std::string&, Pin&, float); | |
| Clock(const std::string&, float, std::array<float, MAX_TRAN>); | |
| Clock(const std::string&, Pin&, float, std::array<float, MAX_TRAN>); | |
| inline const std::string& name() const; | |
| inline const std::string& comment() const; | |
| inline float period() const; | |
| inline float waveform(Tran) const; | |
| private: | |
| std::string _name; | |
| Pin* _source {nullptr}; | |
| float _period {.0f}; | |
| std::array<float, MAX_TRAN> _waveform; | |
| void _scale_time(float); | |
| }; | |
| // Function: name | |
| inline const std::string& Clock::name() const { | |
| return _name; | |
| } | |
| // Function: period | |
| inline float Clock::period() const { | |
| return _period; | |
| } | |
| // Function: waveform | |
| inline float Clock::waveform(Tran rf) const { | |
| return _waveform[rf]; | |
| } | |
| }; // end of namespace ot ------------------------------------------------------------------------ | |