3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-27 02:45:52 +00:00

io: refactor string and file work into new unit

This commit is contained in:
Emil J. Tywoniak 2024-12-11 15:35:43 +01:00
parent 0c689091e2
commit 4f3fdc8457
17 changed files with 595 additions and 523 deletions

View file

@ -2777,13 +2777,13 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
mux_input = new AstNode(AST_BIT_NOT, mux_input);
}
AstNode *node = new AstNode(AST_TERNARY, children_list.at(2));
if (str == "bufif0") {
node->children.push_back(AstNode::mkconst_bits(z_const, false));
node->children.push_back(mux_input);
} else {
node->children.push_back(mux_input);
node->children.push_back(AstNode::mkconst_bits(z_const, false));
}
// if (str == "bufif0") {
// node->children.push_back(AstNode::mkconst_bits(z_const, false));
// node->children.push_back(mux_input);
// } else {
// node->children.push_back(mux_input);
// node->children.push_back(AstNode::mkconst_bits(z_const, false));
// }
str.clear();
type = AST_ASSIGN;

View file

@ -21,6 +21,7 @@
#include "kernel/sigtools.h"
#include "kernel/celltypes.h"
#include "kernel/log.h"
#include "kernel/utils.h"
#include "libs/sha1/sha1.h"
#include <stdlib.h>
#include <stdio.h>