Skip to content

Commit e63f1f5

Browse files
Docs: merge CI fix
2 parents 9ec1536 + 2f9fcc2 commit e63f1f5

File tree

5 files changed

+40
-4
lines changed

5 files changed

+40
-4
lines changed

.github/workflows/test-linux.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,16 @@ jobs:
8585
shell: bash
8686
run: |
8787
git clone https://github.com/steveicarus/iverilog.git
88+
cd iverilog
89+
git checkout ${{ vars.IVERILOG_VERSION }}
90+
echo "IVERILOG_GIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
8891
8992
- name: Cache iverilog
9093
id: cache-iverilog
9194
uses: actions/cache@v3
9295
with:
9396
path: .local/
94-
key: ${{ matrix.os.id }}-${{ hashFiles('iverilog/.git/refs/heads/master') }}
97+
key: ${{ matrix.os.id }}-${{ env.IVERILOG_GIT }}
9598

9699
- name: Build iverilog
97100
if: steps.cache-iverilog.outputs.cache-hit != 'true'

.github/workflows/test-macos.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ jobs:
4141
shell: bash
4242
run: |
4343
git clone https://github.com/steveicarus/iverilog.git
44+
cd iverilog
45+
git checkout ${{ vars.IVERILOG_VERSION }}
46+
echo "IVERILOG_GIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
4447
4548
- name: Cache iverilog
4649
id: cache-iverilog
4750
uses: actions/cache@v3
4851
with:
4952
path: .local/
50-
key: ${{ matrix.os.id }}-${{ hashFiles('iverilog/.git/refs/heads/master') }}
53+
key: ${{ matrix.os.id }}-${{ env.IVERILOG_GIT }}
5154

5255
- name: Build iverilog
5356
if: steps.cache-iverilog.outputs.cache-hit != 'true'

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ LDLIBS += -lrt
141141
endif
142142
endif
143143

144-
YOSYS_VER := 0.37+21
144+
YOSYS_VER := 0.37+27
145145

146146
# Note: We arrange for .gitcommit to contain the (short) commit hash in
147147
# tarballs generated with git-archive(1) using .gitattributes. The git repo

passes/cmds/stat.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ struct StatPass : public Pass {
366366
log(" use cell area information from the provided liberty file\n");
367367
log("\n");
368368
log(" -tech <technology>\n");
369-
log(" print area estemate for the specified technology. Currently supported\n");
369+
log(" print area estimate for the specified technology. Currently supported\n");
370370
log(" values for <technology>: xilinx, cmos\n");
371371
log("\n");
372372
log(" -width\n");

passes/hierarchy/hierarchy.cc

+30
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,17 @@ void hierarchy_clean(RTLIL::Design *design, RTLIL::Module *top, bool purge_lib)
655655
log("Removed %d unused modules.\n", del_counter);
656656
}
657657

658+
bool set_keep_print(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod)
659+
{
660+
if (cache.count(mod) == 0)
661+
for (auto c : mod->cells()) {
662+
RTLIL::Module *m = mod->design->module(c->type);
663+
if ((m != nullptr && set_keep_print(cache, m)) || c->type == ID($print))
664+
return cache[mod] = true;
665+
}
666+
return cache[mod];
667+
}
668+
658669
bool set_keep_assert(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod)
659670
{
660671
if (cache.count(mod) == 0)
@@ -762,6 +773,11 @@ struct HierarchyPass : public Pass {
762773
log(" -nodefaults\n");
763774
log(" do not resolve input port default values\n");
764775
log("\n");
776+
log(" -nokeep_prints\n");
777+
log(" per default this pass sets the \"keep\" attribute on all modules\n");
778+
log(" that directly or indirectly display text on the terminal.\n");
779+
log(" This option disables this behavior.\n");
780+
log("\n");
765781
log(" -nokeep_asserts\n");
766782
log(" per default this pass sets the \"keep\" attribute on all modules\n");
767783
log(" that directly or indirectly contain one or more formal properties.\n");
@@ -818,6 +834,7 @@ struct HierarchyPass : public Pass {
818834
bool keep_positionals = false;
819835
bool keep_portwidths = false;
820836
bool nodefaults = false;
837+
bool nokeep_prints = false;
821838
bool nokeep_asserts = false;
822839
std::vector<std::string> generate_cells;
823840
std::vector<generate_port_decl_t> generate_ports;
@@ -893,6 +910,10 @@ struct HierarchyPass : public Pass {
893910
nodefaults = true;
894911
continue;
895912
}
913+
if (args[argidx] == "-nokeep_prints") {
914+
nokeep_prints = true;
915+
continue;
916+
}
896917
if (args[argidx] == "-nokeep_asserts") {
897918
nokeep_asserts = true;
898919
continue;
@@ -1091,6 +1112,15 @@ struct HierarchyPass : public Pass {
10911112
}
10921113
}
10931114

1115+
if (!nokeep_prints) {
1116+
std::map<RTLIL::Module*, bool> cache;
1117+
for (auto mod : design->modules())
1118+
if (set_keep_print(cache, mod)) {
1119+
log("Module %s directly or indirectly displays text -> setting \"keep\" attribute.\n", log_id(mod));
1120+
mod->set_bool_attribute(ID::keep);
1121+
}
1122+
}
1123+
10941124
if (!nokeep_asserts) {
10951125
std::map<RTLIL::Module*, bool> cache;
10961126
for (auto mod : design->modules())

0 commit comments

Comments
 (0)