mirror of https://github.com/YosysHQ/yosys.git
Some cleanups in RTLIL::SigChunk::SigChunk(const RTLIL::Const&)
This commit is contained in:
parent
115dd959d9
commit
c61467a32c
|
@ -1316,10 +1316,10 @@ RTLIL::SigChunk::SigChunk()
|
||||||
offset = 0;
|
offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RTLIL::SigChunk::SigChunk(const RTLIL::Const &data)
|
RTLIL::SigChunk::SigChunk(const RTLIL::Const &value)
|
||||||
{
|
{
|
||||||
wire = NULL;
|
wire = NULL;
|
||||||
this->data = data;
|
data = value;
|
||||||
width = data.bits.size();
|
width = data.bits.size();
|
||||||
offset = 0;
|
offset = 0;
|
||||||
}
|
}
|
||||||
|
@ -1418,9 +1418,9 @@ RTLIL::SigSpec::SigSpec()
|
||||||
width_ = 0;
|
width_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RTLIL::SigSpec::SigSpec(const RTLIL::Const &data)
|
RTLIL::SigSpec::SigSpec(const RTLIL::Const &value)
|
||||||
{
|
{
|
||||||
chunks_.push_back(RTLIL::SigChunk(data));
|
chunks_.push_back(RTLIL::SigChunk(value));
|
||||||
width_ = chunks_.back().width;
|
width_ = chunks_.back().width;
|
||||||
check();
|
check();
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,7 +461,7 @@ struct RTLIL::SigChunk {
|
||||||
RTLIL::Const data; // only used if wire == NULL, LSB at index 0
|
RTLIL::Const data; // only used if wire == NULL, LSB at index 0
|
||||||
int width, offset;
|
int width, offset;
|
||||||
SigChunk();
|
SigChunk();
|
||||||
SigChunk(const RTLIL::Const &data);
|
SigChunk(const RTLIL::Const &value);
|
||||||
SigChunk(RTLIL::Wire *wire, int width, int offset);
|
SigChunk(RTLIL::Wire *wire, int width, int offset);
|
||||||
SigChunk(const std::string &str);
|
SigChunk(const std::string &str);
|
||||||
SigChunk(int val, int width = 32);
|
SigChunk(int val, int width = 32);
|
||||||
|
@ -520,7 +520,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SigSpec();
|
SigSpec();
|
||||||
SigSpec(const RTLIL::Const &data);
|
SigSpec(const RTLIL::Const &value);
|
||||||
SigSpec(const RTLIL::SigChunk &chunk);
|
SigSpec(const RTLIL::SigChunk &chunk);
|
||||||
SigSpec(RTLIL::Wire *wire, int width = -1, int offset = 0);
|
SigSpec(RTLIL::Wire *wire, int width = -1, int offset = 0);
|
||||||
SigSpec(const std::string &str);
|
SigSpec(const std::string &str);
|
||||||
|
|
Loading…
Reference in New Issue