Skip to content

Commit

Permalink
Added buffer wait operations and some refactoring
Browse files Browse the repository at this point in the history
Added methods to use buffer wait operations.
Created classes for each kind of bus operation: ReadOperation,
WriteOperation, TimeoutOperation, DelayOperation, BufferWaitOperation.
  • Loading branch information
kingofpayne committed Feb 1, 2024
1 parent d6f20dd commit 1d1c91b
Show file tree
Hide file tree
Showing 2 changed files with 345 additions and 286 deletions.
5 changes: 4 additions & 1 deletion api/scaffold/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1999,14 +1999,17 @@ def timeout_section(self, timeout):
"""
return self.bus.timeout_section(timeout)

def buffer_wait_section(self):
return self.bus.buffer_wait_section()

def delay(self, duration: float):
"""
Performs a delay operation.
:param cycles: Delay duration in seconds.
"""
cycles = round(duration * self.sys_freq)
self.bus.operation_delay(cycles)
self.bus.delay(cycles)


class Scaffold(ArchBase):
Expand Down

0 comments on commit 1d1c91b

Please sign in to comment.