Skip to content

Commit db759dd

Browse files
committed
erge branch 'fix_axim_global_size' into develop
2 parents 381ac89 + 1fd37b7 commit db759dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

veriloggen/thread/axim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def _set_read_request(self, ram, port, ram_method, ram_datawidth,
793793
shamt = int(math.log(pack_size, 2))
794794
res = vtypes.Mux(
795795
vtypes.And(global_size, 2 ** shamt - 1) > 0, 1, 0)
796-
global_size = (global_size >> shamt) + res
796+
global_size = vtypes.Add((global_size >> shamt), res)
797797

798798
op_id = self._get_read_op_id(ram, port, ram_method)
799799

@@ -1188,7 +1188,7 @@ def _set_write_request(self, ram, port, ram_method, ram_datawidth,
11881188
shamt = int(math.log(pack_size, 2))
11891189
res = vtypes.Mux(
11901190
vtypes.And(global_size, 2 ** shamt - 1) > 0, 1, 0)
1191-
global_size = (global_size >> shamt) + res
1191+
global_size = vtypes.Add((global_size >> shamt), res)
11921192

11931193
op_id = self._get_write_op_id(ram, port, ram_method)
11941194

0 commit comments

Comments
 (0)