| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| | |
| | | |
Use default copy constructor for RTLIL::SigBit
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was a handwritten copy constructor, which I'm not sure was
actually legal C++ (it unconditionally read from the 'data' member of
a union, which wouldn't have been written if wire was true). It was
also a bit less efficient than the constructor you get from the
compiler by default (which is allowed to just copy the memory).
This gives a marginal (~0.25%) decrease in code size when compiled
with GCC 9.3.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These operators work by fetching the string from the global string
table and then comparing with the std::string that was passed in as
rhs.
Using str() means that we create a std::string (strlen; malloc;
memcpy), compare for equality (another memcmp if they have the same
length) and then finally free the string.
Using c_str() means that we pass the const char* straight to
std::string's equality operator. This ends up as a call to
std::string::compare (the const char* flavour), which is essentially
strcmp.
|
|
|
|
| |
Fixes #1819, #1820.
|
| |
|
|
|
|
| |
And make {get,set}_src_attribute use those functions.
|
|\
| |
| | |
kernel: include "kernel/constids.inc"
|
| | |
|
|/
|
|
|
|
|
|
|
| |
A few passes included the same list of FF cell types. Make it a global
const instead.
The zinit pass also seems to include a list like that, but given that
it seems to be completely broken at the time (see #1568 discussion),
I'm going to pretend I didn't see that.
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 7b2a85aedf24affc2e1202c78e70e6a317f5bf29.
|
| |
|
| |
|
| |
|
|\
| |
| | |
kernel: speedup by using more pass-by-const-ref
|
| | |
|
| |
| |
| |
| | |
Otherwise cell->setPort(ID::A, cell->getPort(ID::B)) could be invalid
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch should support things like
`define foo(a, b = 3, c) a+b+c
`foo(1, ,2)
which will evaluate to 1+3+2. It also spots mistakes like
`foo(1)
(the 3rd argument doesn't have a default value, so a call site is
required to set it).
Most of the patch is a simple parser for the format in preproc.cc, but
I've also taken the opportunity to wrap up the "name -> definition"
map in a type, rather than use multiple std::map's.
Since this type needs to be visible to code that touches defines, I've
pulled it (and the frontend_verilog_preproc declaration) out into a
new file at frontends/verilog/preproc.h and included that where
necessary.
Finally, the patch adds a few tests in tests/various to check that we
are parsing everything correctly.
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Clifford Wolf <clifford@clifford.at>
|
|
|
|
| |
Signed-off-by: Clifford Wolf <clifford@clifford.at>
|
|
|
|
|
|
|
|
|
| |
- better use of "inline" keyword
- deprecate "sticky" IDs feature
- improve handling of empty ID
- add move constructor
Signed-off-by: Clifford Wolf <clifford@clifford.at>
|
| |
|
|\ |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| |/
|/| |
|
| |
| |
| |
| | |
Signed-off-by: Clifford Wolf <clifford@clifford.at>
|
| | |
|
|/
|
|
| |
this makes it possible to use std algorithms on them
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parser changes are slightly awkward. Consider the following IL:
process $0
<point 1>
switch \foo
<point 2>
case 1'1
assign \bar \baz
<point 3>
...
case
end
end
Before this commit, attributes are valid in <point 1>, and <point 3>
iff it is immediately followed by a `switch`. (They are essentially
attached to the switch.) But, after this commit, and because switch
cases do not have an ending delimiter, <point 3> becomes ambiguous:
the attribute could attach to either the following `case`, or to
the following `switch`. This isn't expressible in LALR(1) and results
in a reduce/reduce conflict.
To address this, attributes inside processes are now valid anywhere
inside the process: in <point 1> and <point 3> a part of case body,
and in <point 2> as a separate rule. As a consequence, attributes
can now precede `assign`s, which is made illegal in the same way it
is illegal to attach attributes to `connect`.
Attributes are tracked separately from the parser state, so this
does not affect collection of attributes at all, other than allowing
them on `case`s. The grammar change serves purely to allow attributes
in more syntactic places.
|
|
|
|
| |
invalidate
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Clifford Wolf <clifford@clifford.at>
|
| |
| |
| |
| | |
Signed-off-by: Clifford Wolf <clifford@clifford.at>
|
| |\
| | |
| | | |
Fix all warnings that occurred when compiling with gcc9
|
| | | |
|
| |/
| |
| |
| | |
Signed-off-by: Clifford Wolf <clifford@clifford.at>
|