Skip to content

Commit a54dfd4

Browse files
lpawelczmkurc-ant
andcommitted
ql-qlf: k6n10f: QL_DSP2_MULT: pass down acc_fir
Co-authored-by: Maciej Kurc <[email protected]> Signed-off-by: Pawel Czarnecki <[email protected]>
1 parent e585521 commit a54dfd4

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

ql-qlf-plugin/ql-dsp-io-regs.cc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ PRIVATE_NAMESPACE_BEGIN
1111
// ============================================================================
1212

1313
const std::vector<std::string> ports2del_mult = {"load_acc", "subtract", "acc_fir", "dly_b"};
14-
const std::vector<std::string> ports2del_mult_add_acc = {"acc_fir", "dly_b"};
14+
const std::vector<std::string> ports2del_mult_acc = {"acc_fir", "dly_b"};
15+
const std::vector<std::string> ports2del_mult_add = {"dly_b"};
1516
const std::vector<std::string> ports2del_extension = {"saturate_enable", "shift_right", "round"};
1617

1718
void ql_dsp_io_regs_pass(RTLIL::Module *module)
@@ -95,10 +96,21 @@ void ql_dsp_io_regs_pass(RTLIL::Module *module)
9596
if (del_clk)
9697
ports2del.push_back("clk");
9798

98-
if (out_sel_i == 0 || out_sel_i == 4) {
99+
switch (out_sel_i) {
100+
case 0:
101+
case 4:
99102
ports2del.insert(ports2del.end(), ports2del_mult.begin(), ports2del_mult.end());
100-
} else {
101-
ports2del.insert(ports2del.end(), ports2del_mult_add_acc.begin(), ports2del_mult_add_acc.end());
103+
break;
104+
case 1:
105+
case 5:
106+
ports2del.insert(ports2del.end(), ports2del_mult_acc.begin(), ports2del_mult_acc.end());
107+
break;
108+
case 2:
109+
case 3:
110+
case 6:
111+
case 7:
112+
ports2del.insert(ports2del.end(), ports2del_mult_add.begin(), ports2del_mult_add.end());
113+
break;
102114
}
103115

104116
// Mark for deleton additional configuration ports

ql-qlf-plugin/qlf_k6n10f/dsp_sim.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ module QL_DSP2_MULTADD (
386386
input wire reset,
387387

388388
input wire [ 2:0] feedback,
389+
input wire [ 5:0] acc_fir,
389390
input wire load_acc,
390391
input wire unsigned_a,
391392
input wire unsigned_b,
@@ -413,6 +414,7 @@ module QL_DSP2_MULTADD (
413414
.f_mode(f_mode),
414415

415416
.feedback(feedback),
417+
.acc_fir(acc_fir),
416418
.load_acc(load_acc),
417419

418420
.unsigned_a(unsigned_a),
@@ -437,6 +439,7 @@ module QL_DSP2_MULTADD_REGIN (
437439
input wire reset,
438440

439441
input wire [ 2:0] feedback,
442+
input wire [ 5:0] acc_fir,
440443
input wire load_acc,
441444
input wire unsigned_a,
442445
input wire unsigned_b,
@@ -464,6 +467,7 @@ module QL_DSP2_MULTADD_REGIN (
464467
.f_mode(f_mode),
465468

466469
.feedback(feedback),
470+
.acc_fir(acc_fir),
467471
.load_acc(load_acc),
468472

469473
.unsigned_a(unsigned_a),
@@ -488,6 +492,7 @@ module QL_DSP2_MULTADD_REGOUT (
488492
input wire reset,
489493

490494
input wire [ 2:0] feedback,
495+
input wire [ 5:0] acc_fir,
491496
input wire load_acc,
492497
input wire unsigned_a,
493498
input wire unsigned_b,
@@ -515,6 +520,7 @@ module QL_DSP2_MULTADD_REGOUT (
515520
.f_mode(f_mode),
516521

517522
.feedback(feedback),
523+
.acc_fir(acc_fir),
518524
.load_acc(load_acc),
519525

520526
.unsigned_a(unsigned_a),
@@ -539,6 +545,7 @@ module QL_DSP2_MULTADD_REGIN_REGOUT (
539545
input wire reset,
540546

541547
input wire [ 2:0] feedback,
548+
input wire [ 5:0] acc_fir,
542549
input wire load_acc,
543550
input wire unsigned_a,
544551
input wire unsigned_b,
@@ -566,6 +573,7 @@ module QL_DSP2_MULTADD_REGIN_REGOUT (
566573
.f_mode(f_mode),
567574

568575
.feedback(feedback),
576+
.acc_fir(acc_fir),
569577
.load_acc(load_acc),
570578

571579
.unsigned_a(unsigned_a),

0 commit comments

Comments
 (0)