aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-12-16 16:02:21 +0100
committerGitHub <noreply@github.com>2018-12-16 16:02:21 +0100
commit0d9c850a0713e3ff59a9ff2ab89e9fd47fd8aa08 (patch)
tree3fe4ad6e43f26aa05ff1ca1c02c96b322da6e535 /passes
parent1e1452c7ff22a8b7a2f948c080213e0a6bed7b82 (diff)
parent4c5944716834e42f5ff5ddaf9a4ef748f8cc2af7 (diff)
downloadyosys-0d9c850a0713e3ff59a9ff2ab89e9fd47fd8aa08.tar.gz
yosys-0d9c850a0713e3ff59a9ff2ab89e9fd47fd8aa08.tar.bz2
yosys-0d9c850a0713e3ff59a9ff2ab89e9fd47fd8aa08.zip
Merge pull request #735 from daveshah1/trifixes
deminout fixes
Diffstat (limited to 'passes')
-rw-r--r--passes/techmap/deminout.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/passes/techmap/deminout.cc b/passes/techmap/deminout.cc
index 9f0c7bf67..47d0ff416 100644
--- a/passes/techmap/deminout.cc
+++ b/passes/techmap/deminout.cc
@@ -83,9 +83,9 @@ struct DeminoutPass : public Pass {
for (auto bit : sigmap(conn.second))
bits_used.insert(bit);
- if (conn.first == "\\Y" && cell->type.in("$mux", "$pmux", "$_MUX_", "$_TBUF_"))
+ if (conn.first == "\\Y" && cell->type.in("$mux", "$pmux", "$_MUX_", "$_TBUF_", "$tribuf"))
{
- bool tribuf = (cell->type == "$_TBUF_");
+ bool tribuf = (cell->type == "$_TBUF_" || cell->type == "$tribuf");
if (!tribuf) {
for (auto &c : cell->connections()) {
@@ -113,7 +113,8 @@ struct DeminoutPass : public Pass {
{
if (bits_numports[bit] > 1 || bits_inout.count(bit))
new_input = true, new_output = true;
-
+ if (bit == State::S0 || bit == State::S1)
+ new_output = true;
if (bits_written.count(bit)) {
new_output = true;
if (bits_tribuf.count(bit))