Skip to content

Commit

Permalink
reformat to pass flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
M0stafaRady committed Dec 8, 2024
1 parent b313eba commit c339baa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
8 changes: 2 additions & 6 deletions cocotb/caravel_cocotb/caravel_interfaces.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
from caravel_cocotb.interfaces.caravel import Caravel_env # noqa: F401
from caravel_cocotb.interfaces.SPI import SPI # noqa: F401
from caravel_cocotb.interfaces.UART import UART # noqa: F401
from caravel_cocotb.interfaces.common_functions.test_functions import (
test_configure,
) # noqa: F401
from caravel_cocotb.interfaces.common_functions.test_functions import (
report_test,
) # noqa: F401
from caravel_cocotb.interfaces.common_functions.test_functions import (test_configure) # noqa: F401
from caravel_cocotb.interfaces.common_functions.test_functions import (report_test) # noqa: F401
from caravel_cocotb.interfaces.common import GPIO_MODE # noqa: F401
8 changes: 0 additions & 8 deletions cocotb/caravel_cocotb/scripts/verify_cocotb/RunRegression.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import smtplib
import socket
import yaml
import time
from caravel_cocotb.scripts.merge_coverage import merge_fun_cov
from caravel_cocotb.scripts.test_defaults.test_defaults import TestDefaults
from rich.live import Live
Expand Down Expand Up @@ -490,12 +489,6 @@ def unzip_sdf_files(self):
return
elif self.args.sim != "GL_SDF":
return
# make corners list in case in is n't
if not isinstance(self.args.corner, list):
corners = [self.args.corner]
else:
corners = self.args.corner

# keep caravel sdf dir
sdf_dir = f"{self.paths.CARAVEL_ROOT}/signoff/{'caravan' if self.args.caravan else 'caravel'}/primetime/sdf"
if self.args.sdfs_dir is None:
Expand All @@ -512,4 +505,3 @@ def unzip_sdf_files(self):
for gz_file in gz_files:
subprocess.run(f"gzip {gz_file} -d".split())
self.args.macros.append(f'SDF_PATH=\\"{sdf_dir}\\"')

6 changes: 3 additions & 3 deletions cocotb/caravel_cocotb/scripts/verify_cocotb/RunTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

class RunTest:
COMPILE_LOCK = set()

def __init__(self, args, paths, test, logger) -> None:
self.args = args
self.paths = paths
Expand Down Expand Up @@ -157,7 +158,7 @@ def runTest_iverilog(self):
else:
if f"{self.test.compilation_dir}/sim.vvp" not in RunTest.COMPILE_LOCK:
print(f"{bcolors.OKCYAN}Skipping compilation as netlist has not changed{bcolors.ENDC}")
RunTest.COMPILE_LOCK.add(f"{self.test.compilation_dir}/sim.vvp") # locked means if it is copiled for the first time then it will not be compiled again even if netlist changes
RunTest.COMPILE_LOCK.add(f"{self.test.compilation_dir}/sim.vvp") # locked means if it is copiled for the first time then it will not be compiled again even if netlist changes
if not self.args.compile_only:
self.iverilog_run()

Expand Down Expand Up @@ -238,7 +239,7 @@ def runTest_vcs(self):
else:
if f"{self.test.compilation_dir}/simv" not in RunTest.COMPILE_LOCK:
print(f"{bcolors.OKCYAN}Skipping compilation as netlist has not changed{bcolors.ENDC}")
RunTest.COMPILE_LOCK.add(f"{self.test.compilation_dir}/simv") # locked means if it is copiled for the first time then it will not be compiled again even if netlist changes
RunTest.COMPILE_LOCK.add(f"{self.test.compilation_dir}/simv") # locked means if it is copiled for the first time then it will not be compiled again even if netlist changes
if not self.args.compile_only:
self.vcs_run()

Expand Down Expand Up @@ -359,7 +360,6 @@ def is_same_hash(self, netlist):
f.write(new_hash)
return new_hash == old_hash



class bcolors:
HEADER = "\033[95m"
Expand Down

0 comments on commit c339baa

Please sign in to comment.