Skip to content

Commit

Permalink
Cleanup on monitor.py and double SRAM size to get errors while runnin…
Browse files Browse the repository at this point in the history
…g the test

Signed-off-by: Anderson Ignacio da Silva <anderson@aignacio.com>
  • Loading branch information
aignacio committed Jun 18, 2024
1 parent 361dfbe commit 18b9132
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 182 deletions.
6 changes: 3 additions & 3 deletions cocotbext/ahb/ahb_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# License : MIT license <Check LICENSE>
# Author : Anderson I. da Silva (aignacio) <anderson@aignacio.com>
# Date : 08.10.2023
# Last Modified Date: 15.06.2024
# Last Modified Date: 18.06.2024

import cocotb
import logging
import cocotb
import copy
import datetime

Expand Down Expand Up @@ -186,7 +186,7 @@ async def _send_txn(
f"AHB {op} txn:\n"
f"\tID = {index}\n"
f"\tADDR = 0x{txn_addr:x}\n"
f"\tDATA = 0x{value[index+1]:x}\n"
f"\tDATA = 0x{value[index + 1]:x}\n"
f"\tSIZE = {txn_size} bytes"
)
self.bus.hwdata.value = txn_data
Expand Down
2 changes: 1 addition & 1 deletion cocotbext/ahb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def hexdump_line(data, offset, row_size=16):
for ch in data[0:row_size]:
h += f"{ch:02x} "
c += chr(ch) if 32 < ch < 127 else "."
return f"{offset:08x}: {h:{row_size*3}} {c}"
return f"{offset:08x}: {h:{row_size * 3}} {c}"


def hexdump(data, start=0, length=None, row_size=16, prefix="", offset=0):
Expand Down
169 changes: 0 additions & 169 deletions monitor.py

This file was deleted.

12 changes: 6 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# License : MIT license <Check LICENSE>
# Author : Anderson I. da Silva (aignacio) <anderson@aignacio.com>
# Date : 08.10.2023
# Last Modified Date: 14.06.2024
# Last Modified Date: 18.06.2024

import nox


@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10"], reuse_venv=True)
@nox.session(python=["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"], reuse_venv=True)
def run(session):
session.env["DUT"] = "ahb_template"
session.env["SIM"] = "icarus"
Expand All @@ -23,9 +23,9 @@ def run(session):
"pytest-sugar",
"pytest-cov",
"pytest-split",
"cocotb-bus == 0.2.1",
"cocotb-test == 0.2.4",
"cocotb >= 1.8.0",
"cocotb-bus==0.2.1",
"cocotb-test==0.2.4",
"cocotb>=1.8.0"
)
session.install("-e", ".")
session.run(
Expand All @@ -41,7 +41,7 @@ def run(session):
)


@nox.session(python=["3.9", "3.10"])
@nox.session(python=["3.9", "3.10", "3.11", "3.12"], reuse_venv=True)
def lint(session):
session.install("flake8")
session.run("flake8")
2 changes: 1 addition & 1 deletion ship.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
docker run -it --rm -v $(pwd):/cocotbext-ahb/ -w /cocotbext-ahb/ aignacio/rtldev bash
docker run -it --rm -v $(pwd):/cocotbext-ahb/ -w /cocotbext-ahb/ aignacio/icarus bash
4 changes: 2 additions & 2 deletions tests/test_ahb_lite_sram.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License : MIT license <Check LICENSE>
# Author : Anderson I. da Silva (aignacio) <anderson@aignacio.com>
# Date : 08.10.2023
# Last Modified Date: 16.06.2024
# Last Modified Date: 18.06.2024

import cocotb
import os
Expand Down Expand Up @@ -94,7 +94,7 @@ async def run_test(dut, bp_fn=None, pip_mode=False):

# Generate a list of unique addresses with the double of memory size
# to create error responses
address = random.sample(range(0, 1 * mem_size_kib * 1024, 8), N)
address = random.sample(range(0, 2 * mem_size_kib * 1024, 8), N)
# Generate a list of random 32-bit values
value = [rnd_val(data_width) for _ in range(N)]
# Generate a list of random sizes
Expand Down

0 comments on commit 18b9132

Please sign in to comment.