diff options
| author | Alberto Gonzalez <boqwxp@airmail.cc> | 2020-05-22 04:48:33 +0000 | 
|---|---|---|
| committer | Alberto Gonzalez <boqwxp@airmail.cc> | 2020-06-21 02:16:11 +0000 | 
| commit | a3d1f8637a8a9a97e3152fea1ceae23f798f54d8 (patch) | |
| tree | 5bce985396f806c6ea4815091bb87c9aeda235de /kernel/rtlil.h | |
| parent | 992d694d39db859bd7b554126881be69f3cfcd2e (diff) | |
| download | yosys-a3d1f8637a8a9a97e3152fea1ceae23f798f54d8.tar.gz yosys-a3d1f8637a8a9a97e3152fea1ceae23f798f54d8.tar.bz2 yosys-a3d1f8637a8a9a97e3152fea1ceae23f798f54d8.zip  | |
qbfsat: Use bit precise mapping for hole value wires and a more robust hole spec for writing to and specializing from a solution file.
Diffstat (limited to 'kernel/rtlil.h')
| -rw-r--r-- | kernel/rtlil.h | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 511df29fe..b8aaa1895 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -754,6 +754,7 @@ struct RTLIL::SigBit  	SigBit(const RTLIL::SigBit &sigbit) = default;  	RTLIL::SigBit &operator =(const RTLIL::SigBit &other) = default; +	std::string str() const;  	bool operator <(const RTLIL::SigBit &other) const;  	bool operator ==(const RTLIL::SigBit &other) const;  	bool operator !=(const RTLIL::SigBit &other) const; @@ -1547,6 +1548,13 @@ inline RTLIL::SigBit::SigBit(RTLIL::Wire *wire, int offset) : wire(wire), offset  inline RTLIL::SigBit::SigBit(const RTLIL::SigChunk &chunk) : wire(chunk.wire) { log_assert(chunk.width == 1); if (wire) offset = chunk.offset; else data = chunk.data[0]; }  inline RTLIL::SigBit::SigBit(const RTLIL::SigChunk &chunk, int index) : wire(chunk.wire) { if (wire) offset = chunk.offset + index; else data = chunk.data[index]; } +inline std::string RTLIL::SigBit::str() const { +	if (wire != nullptr) +		return stringf("%s[%d]", wire->name.c_str(), offset); +	else +		return stringf("%u", data); +} +  inline bool RTLIL::SigBit::operator<(const RTLIL::SigBit &other) const {  	if (wire == other.wire)  		return wire ? (offset < other.offset) : (data < other.data);  | 
