Skip to content

Commit 2f4c917

Browse files
authored
Merge pull request #4181 from povik/ci-cxxstd-fix
ci: Fix CXXSTD typo
2 parents d808258 + af1a5cf commit 2f4c917

10 files changed

+24
-15
lines changed

.github/workflows/test-linux.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,14 @@ jobs:
111111
shell: bash
112112
run: |
113113
make config-${CC%%-*}
114-
make -j${{ env.procs }} CCXXSTD=${{ matrix.cpp_std }} CC=$CC CXX=$CC LD=$CC
114+
make -j${{ env.procs }} CXXSTD=${{ matrix.cpp_std }} CC=$CC CXX=$CC LD=$CC
115115
116116
- name: Run tests
117117
if: (matrix.cpp_std == 'c++11') && (matrix.compiler == 'gcc-11')
118118
shell: bash
119119
run: |
120120
make -j${{ env.procs }} test CXXSTD=${{ matrix.cpp_std }} CC=$CC CXX=$CC LD=$CC
121+
122+
- name: Log yosys-config output
123+
run: |
124+
./yosys-config || true

passes/opt/opt_dff.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ struct OptDffWorker
353353
// Try a more complex conversion to plain async reset.
354354
State val_neutral = ff.pol_set ? State::S0 : State::S1;
355355
Const val_arst;
356-
SigSpec sig_arst;
356+
SigBit sig_arst;
357357
if (ff.sig_clr[0] == val_neutral)
358358
sig_arst = ff.sig_set[0];
359359
else

passes/opt/opt_ffinv.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct OptFfInvWorker
3838
// - ... which has no other users
3939
// - all users of FF are LUTs
4040
bool push_d_inv(FfData &ff) {
41+
log_assert(ff.width == 1);
4142
if (index.query_is_input(ff.sig_d))
4243
return false;
4344
if (index.query_is_output(ff.sig_d))
@@ -90,7 +91,7 @@ struct OptFfInvWorker
9091
int flip_mask = 0;
9192
SigSpec sig_a = lut->getPort(ID::A);
9293
for (int i = 0; i < GetSize(sig_a); i++) {
93-
if (index.sigmap(sig_a[i]) == index.sigmap(ff.sig_q)) {
94+
if (index.sigmap(sig_a[i]) == index.sigmap(ff.sig_q[0])) {
9495
flip_mask |= 1 << i;
9596
}
9697
}

passes/opt/opt_lut.cc

+6-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ struct OptLutWorker
167167
legal = false;
168168
break;
169169
}
170-
if (sigmap(lut_input[dlogic_conn.first]) != sigmap(lut_dlogic.second->getPort(dlogic_conn.second)))
170+
171+
if (lut_dlogic.second->getPort(dlogic_conn.second).size() != 1)
172+
continue;
173+
174+
if (sigmap(lut_input[dlogic_conn.first]) != sigmap(lut_dlogic.second->getPort(dlogic_conn.second)[0]))
171175
{
172176
log_debug(" LUT has illegal connection to %s cell %s.%s.\n", lut_dlogic.second->type.c_str(), log_id(module), log_id(lut_dlogic.second));
173177
log_debug(" LUT input A[%d] (wire %s) not connected to %s port %s (wire %s).\n", dlogic_conn.first, log_signal(lut_input[dlogic_conn.first]), lut_dlogic.second->type.c_str(), dlogic_conn.second.c_str(), log_signal(lut_dlogic.second->getPort(dlogic_conn.second)));
@@ -314,7 +318,7 @@ struct OptLutWorker
314318

315319
auto lutA = worklist.pop();
316320
SigSpec lutA_input = sigmap(lutA->getPort(ID::A));
317-
SigSpec lutA_output = sigmap(lutA->getPort(ID::Y)[0]);
321+
SigBit lutA_output = sigmap(lutA->getPort(ID::Y)[0]);
318322
int lutA_width = lutA->getParam(ID::WIDTH).as_int();
319323
int lutA_arity = luts_arity[lutA];
320324
pool<int> &lutA_dlogic_inputs = luts_dlogic_inputs[lutA];

passes/pmgen/ice40_dsp.pmg

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ endmatch
346346
code argQ argD
347347
{
348348
if (clock != SigBit()) {
349-
if (port(ff, \CLK) != clock)
349+
if (port(ff, \CLK)[0] != clock)
350350
reject;
351351
if (param(ff, \CLK_POLARITY).as_bool() != clock_pol)
352352
reject;
@@ -393,7 +393,7 @@ endmatch
393393
code argQ
394394
if (ff) {
395395
if (clock != SigBit()) {
396-
if (port(ff, \CLK) != clock)
396+
if (port(ff, \CLK)[0] != clock)
397397
reject;
398398
if (param(ff, \CLK_POLARITY).as_bool() != clock_pol)
399399
reject;

passes/pmgen/xilinx_dsp.pmg

+2-2
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ match ff
415415
filter GetSize(port(ff, \Q)) >= offset + GetSize(argQ)
416416
filter port(ff, \Q).extract(offset, GetSize(argQ)) == argQ
417417

418-
filter clock == SigBit() || port(ff, \CLK) == clock
418+
filter clock == SigBit() || port(ff, \CLK)[0] == clock
419419
endmatch
420420

421421
code argQ
@@ -465,7 +465,7 @@ match ff
465465
filter GetSize(port(ff, \D)) >= offset + GetSize(argD)
466466
filter port(ff, \D).extract(offset, GetSize(argD)) == argD
467467

468-
filter clock == SigBit() || port(ff, \CLK) == clock
468+
filter clock == SigBit() || port(ff, \CLK)[0] == clock
469469
endmatch
470470

471471
code argQ

passes/pmgen/xilinx_dsp48a.pmg

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ match ff
354354
filter GetSize(port(ff, \Q)) >= offset + GetSize(argQ)
355355
filter port(ff, \Q).extract(offset, GetSize(argQ)) == argQ
356356

357-
filter clock == SigBit() || port(ff, \CLK) == clock
357+
filter clock == SigBit() || port(ff, \CLK)[0] == clock
358358
endmatch
359359

360360
code argQ
@@ -404,7 +404,7 @@ match ff
404404
filter GetSize(port(ff, \D)) >= offset + GetSize(argD)
405405
filter port(ff, \D).extract(offset, GetSize(argD)) == argD
406406

407-
filter clock == SigBit() || port(ff, \CLK) == clock
407+
filter clock == SigBit() || port(ff, \CLK)[0] == clock
408408
endmatch
409409

410410
code argQ

passes/pmgen/xilinx_dsp_CREG.pmg

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ match ff
135135
filter GetSize(port(ff, \Q)) >= offset + GetSize(argQ)
136136
filter port(ff, \Q).extract(offset, GetSize(argQ)) == argQ
137137

138-
filter clock == SigBit() || port(ff, \CLK) == clock
138+
filter clock == SigBit() || port(ff, \CLK)[0] == clock
139139
endmatch
140140

141141
code argQ

passes/pmgen/xilinx_dsp_cascade.pmg

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pattern xilinx_dsp_cascade
4646
udata <std::function<SigSpec(const SigSpec&)>> unextend
4747
udata <vector<std::tuple<Cell*,int,int,int>>> chain longest_chain
4848
state <Cell*> next
49-
state <SigSpec> clock
49+
state <SigBit> clock
5050
state <int> AREG BREG
5151

5252
// Variables used for subpatterns
@@ -395,7 +395,7 @@ match ff
395395
filter GetSize(port(ff, \Q)) >= offset + GetSize(argQ)
396396
filter port(ff, \Q).extract(offset, GetSize(argQ)) == argQ
397397

398-
filter clock == SigBit() || port(ff, \CLK) == clock
398+
filter clock == SigBit() || port(ff, \CLK)[0] == clock
399399
endmatch
400400

401401
code argQ

passes/techmap/extract_fa.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ struct ExtractFaWorker
281281
void assign_new_driver(SigBit bit, SigBit new_driver)
282282
{
283283
Cell *cell = driver.at(bit);
284-
if (sigmap(cell->getPort(ID::Y)) == bit) {
284+
if (sigmap(cell->getPort(ID::Y)) == SigSpec(bit)) {
285285
cell->setPort(ID::Y, module->addWire(NEW_ID));
286286
module->connect(bit, new_driver);
287287
}

0 commit comments

Comments
 (0)