-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Anderson Ignacio da Silva <[email protected]>
- Loading branch information
Showing
4 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# License : MIT license <Check LICENSE> | ||
# Author : Anderson I. da Silva (aignacio) <[email protected]> | ||
# Date : 25.10.2024 | ||
# Last Modified Date: 29.10.2024 | ||
# Last Modified Date: 31.10.2024 | ||
import cocotb | ||
import wavedrom | ||
import json | ||
|
@@ -320,7 +320,15 @@ def _close(self): | |
self.waves["head"] = self.head | ||
self.waves["foot"] = self.foot | ||
|
||
def save(self): | ||
def __str__(self): | ||
return str(json.dumps(self.waves)) | ||
|
||
def stop(self): | ||
self._close() | ||
if self.debug: | ||
print("[Waves - Debug] Stopping sims") | ||
|
||
def save_svg(self): | ||
self._close() | ||
if self.debug: | ||
print("[Waves - Debug] Printing JSON Wavedrom") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# License : MIT license <Check LICENSE> | ||
# Author : Anderson I. da Silva (aignacio) <[email protected]> | ||
# Date : 25.10.2024 | ||
# Last Modified Date: 25.10.2024 | ||
# Last Modified Date: 31.10.2024 | ||
import cocotb | ||
import os | ||
import random | ||
|
@@ -93,7 +93,7 @@ async def run_test(dut, bp_fn=None, pip_mode=False): | |
|
||
resp = await ahb_master.write(address, value, size, pip=pip_mode, verbose=True) | ||
resp = await ahb_master.read(address, size, pip=pip_mode, verbose=True) | ||
waves.save() | ||
waves.save_svg() | ||
type(resp) | ||
del waves | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# License : MIT license <Check LICENSE> | ||
# Author : Anderson I. da Silva (aignacio) <[email protected]> | ||
# Date : 25.10.2024 | ||
# Last Modified Date: 26.10.2024 | ||
# Last Modified Date: 31.10.2024 | ||
import cocotb | ||
import os | ||
import random | ||
|
@@ -88,7 +88,8 @@ async def run_test(dut): | |
resp = await ahb_master.write(address, value, size, pip=pip_mode) | ||
resp = await ahb_master.read(address, size, pip=pip_mode) | ||
|
||
waves.save() | ||
print(waves) | ||
waves.save_svg() | ||
waves.save_txt() | ||
type(resp) | ||
del waves | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# License : MIT license <Check LICENSE> | ||
# Author : Anderson I. da Silva (aignacio) <[email protected]> | ||
# Date : 25.10.2024 | ||
# Last Modified Date: 26.10.2024 | ||
# Last Modified Date: 31.10.2024 | ||
import cocotb | ||
import os | ||
import random | ||
|
@@ -79,7 +79,7 @@ async def run_test(dut): | |
resp = await ahb_master.write(address, value, size, verbose=True) | ||
resp = await ahb_master.read(address, size, verbose=True) | ||
waves.save() | ||
waves.save_txt() | ||
waves.save_svg() | ||
type(resp) | ||
del waves | ||
|
||
|