Skip to content

Commit 136f929

Browse files
committed
mock-array: fix Element timing closure
use bitwise or instead of 64 bit addition to close timing in Element Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 40b3bc1 commit 136f929

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

flow/designs/src/mock-array/Element.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ module Element(
5858
REG_5 <= io_ins_right;
5959
REG_6 <= io_ins_left;
6060
REG_7 <= io_ins_up;
61-
io_outs_left_REG <= REG + REG_1;
62-
io_outs_up_REG <= REG_2 + REG_3;
63-
io_outs_right_REG <= REG_4 + REG_5;
64-
io_outs_down_REG <= REG_6 + REG_7;
61+
io_outs_left_REG <= REG | REG_1;
62+
io_outs_up_REG <= REG_2 | REG_3;
63+
io_outs_right_REG <= REG_4 | REG_5;
64+
io_outs_down_REG <= REG_6 | REG_7;
6565
REG_8 <= io_lsbIns_4;
6666
end
6767
endmodule

flow/designs/src/mock-array/src/main/scala/MockArray.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class MockArray(width: Int, height: Int, singleElementWidth: Int)
6868
// up <-> right
6969
(io.outs.asSeq zip (io.ins.asSeq ++ Seq(io.ins.asSeq.head))
7070
.sliding(2).toSeq.reverse.map(_.map(RegNext(_)))).foreach {
71-
case (a, b) => a := RegNext(b(0) + b(1))
71+
case (a, b) => a := RegNext(b(0) | b(1))
7272
}
7373

7474
// Combinational logic, but a maximum flight path of 4 elements

0 commit comments

Comments
 (0)