uint32_t chan() const {return m_chan;}
void set_chan(uint32_t chan);
+ virtual void set_pin_to_channel() { assert(0 && "Only GPRs can be pinned to a channel ");}
void print(std::ostream& os, const PrintFlags& flags) const;
void print(std::ostream& os) const;
v.set_pin_to_channel();
}
+void GPRVector::pin_all_to_channel()
+{
+ for (auto& v: m_elms) {
+ auto& c = static_cast<GPRValue&>(*v);
+ c.set_pin_to_channel();
+ }
+}
+
void GPRVector::do_print(std::ostream& os) const
{
os << "R" << sel() << ".";
void set_as_input(){ m_input = true; }
bool is_input() const {return m_input; }
- void set_pin_to_channel() { m_pin_to_channel = true;}
+ void set_pin_to_channel() override { m_pin_to_channel = true;}
bool pin_to_channel() const { return m_pin_to_channel;}
private:
PValue& operator [] (int i) {return m_elms[i];}
void pin_to_channel(int i);
+ void pin_all_to_channel();
PValue x() const {return m_elms[0];}
PValue y() const {return m_elms[1];}