summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-06-02 12:19:10 -0600
committerAlejandro Soto <alejandro@34project.org>2024-06-02 12:19:36 -0600
commit3ea47a9ddce3fb5aa6d4a3996461ba285e938dad (patch)
treebc3694f59db38d0fe677e8b5094de685eb22332a
parent3ca4cd68d70a32bd20380dc21ae9d9866f6c0866 (diff)
mk/cocotb: replace pydoc3 with pdoc3HEADmaster
Diffstat (limited to '')
-rw-r--r--mk/cocotb.mk22
-rw-r--r--mk/tools.mk2
-rw-r--r--nix/shells.nix1
-rw-r--r--tb/gfx_shader_bind/mod.mk2
-rw-r--r--tb/gfx_shader_bind/testbench/__init__.py8
5 files changed, 22 insertions, 13 deletions
diff --git a/mk/cocotb.mk b/mk/cocotb.mk
index 240d808..e1289f6 100644
--- a/mk/cocotb.mk
+++ b/mk/cocotb.mk
@@ -1,9 +1,9 @@
-targets += pydoc test
+targets += pdoc test
target/test/prepare = $(prepare_verilator_target)
cocotb_modules = $(call per_target,cocotb_modules)
-pydoc_modules = $(call per_target,pydoc_modules)
+pdoc_modules = $(call per_target,pdoc_modules)
cocotb_pythonpath_decl = PYTHONPATH="$(subst $(space),:,$(strip $(cocotb_pythonpath)) $$PYTHONPATH)"
@@ -20,13 +20,13 @@ define cocotb_setup_common
endif
endef
-define target/pydoc/setup
+define target/pdoc/setup
$(cocotb_setup_common)
- $$(call target_var,pydoc_modules) := $$(strip $$(core_info/$$(rule_top)/pydoc_modules))
+ $$(call target_var,pdoc_modules) := $$(strip $$(core_info/$$(rule_top)/pdoc_modules))
- ifeq (,$$(pydoc_modules))
- $$(error core '$$(rule_top)' has no modules for pydoc to cover)
+ ifeq (,$$(pdoc_modules))
+ $$(error core '$$(rule_top)' has no modules for pdoc to cover)
endif
endef
@@ -41,13 +41,13 @@ define target/test/setup
-lcocotbvpi_verilator -lgpi -lcocotb -lgpilog -lcocotbutils $$(cocotb_libpython)
endef
-define target/pydoc/rules
- .PHONY: $$(rule_top_path)/pydoc
+define target/pdoc/rules
+ .PHONY: $$(rule_top_path)/pdoc
- $$(rule_top_path)/pydoc: | $$(obj)
- $$(call run,PYDOC) cd $$(obj) && $$(cocotb_pythonpath_decl) $$(PYDOC3) -w $$(pydoc_modules)
+ $$(rule_top_path)/pdoc: | $$(obj)
+ $$(call run,PDOC) cd $$(obj) && $$(cocotb_pythonpath_decl) $$(PDOC3) --html $$(pdoc_modules)
- $(call target_entrypoint,$$(rule_top_path)/pydoc)
+ $(call target_entrypoint,$$(rule_top_path)/pdoc)
endef
define target/test/rules
diff --git a/mk/tools.mk b/mk/tools.mk
index 177b956..5e4b87e 100644
--- a/mk/tools.mk
+++ b/mk/tools.mk
@@ -5,7 +5,7 @@ define find_tools_lazy
$(call find_command_lazy,ninja,NINJA)
$(call find_command_lazy,peakrdl,PEAKRDL)
$(call find_command_lazy,pkg-config,PKG_CONFIG)
- $(call find_command_lazy,pydoc3,PYDOC3)
+ $(call find_command_lazy,pdoc3,PDOC3)
$(call find_command_lazy,python3,PYTHON3)
$(call find_command_lazy,qsys-generate,QSYS_GENERATE)
$(call find_command_lazy,quartus,QUARTUS)
diff --git a/nix/shells.nix b/nix/shells.nix
index 0ab1bba..836dee9 100644
--- a/nix/shells.nix
+++ b/nix/shells.nix
@@ -42,6 +42,7 @@
find-libpython # Para cocotb
matplotlib
numpy
+ pdoc3
pillow
pytest # Para cocotb
(py.callPackage ./cocotb-coverage.nix { })
diff --git a/tb/gfx_shader_bind/mod.mk b/tb/gfx_shader_bind/mod.mk
index af16a04..de9c26c 100644
--- a/tb/gfx_shader_bind/mod.mk
+++ b/tb/gfx_shader_bind/mod.mk
@@ -8,5 +8,5 @@ define core
$(this)/cocotb_paths := .
$(this)/cocotb_modules := testbench.main
- $(this)/pydoc_modules := testbench
+ $(this)/pdoc_modules := testbench
endef
diff --git a/tb/gfx_shader_bind/testbench/__init__.py b/tb/gfx_shader_bind/testbench/__init__.py
index e69de29..4aeb94c 100644
--- a/tb/gfx_shader_bind/testbench/__init__.py
+++ b/tb/gfx_shader_bind/testbench/__init__.py
@@ -0,0 +1,8 @@
+import testbench.axi
+import testbench.checkers
+import testbench.common
+import testbench.data
+import testbench.drivers
+import testbench.main
+import testbench.models
+import testbench.monitors