Skip to content

Commit

Permalink
Merge pull request #105 from leonardt/fix_io_size
Browse files Browse the repository at this point in the history
fix input values due to the change for signed values
  • Loading branch information
leonardt committed May 21, 2019
2 parents af3d7f3 + 38adfde commit 434b944
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fault/verilator_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def make_poke(self, i, action):
else:
value = action.value
if isinstance(value, actions.FileRead):
value = f"*{value.file.name_without_ext}_in"
mask = "FF" * value.file.chunk_size
value = f"(*{value.file.name_without_ext}_in) & 0x{mask}"
value = self.process_signed_values(action.port, value)
result = [f"top->{name} = {value};"]
# Hack to support verilator's semantics, need to set the register
Expand Down

0 comments on commit 434b944

Please sign in to comment.