diff --git a/Makefile b/Makefile index d5a6632d..3988f97f 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,8 @@ PY_PARAMS:=$(shell echo $(PY_PARAMS) | cut -c2-) endif # ifndef PY_PARAMS BUILD_DIR ?= $(shell nix-shell --run "py2hwsw $(CORE) print_build_dir --py_params '$(PY_PARAMS)'") -NAME ?= $(shell nix-shell --run "py2hwsw $(CORE) print_core_name --py_params '$(PY_PARAMS)'") +GENERATED_NAME=$(shell nix-shell --run "py2hwsw $(CORE) print_core --py_params '$(PY_PARAMS)'") VERSION ?= $(shell nix-shell --run "py2hwsw $(CORE) print_core_version --py_params '$(PY_PARAMS)'") -CORE_NAME=$(shell nix-shell --run "py2hwsw $(CORE) print_core_name --py_params '$(PY_PARAMS)'") DOC ?= ug @@ -69,7 +68,7 @@ lint-test: make lint BE_IF=AXI4 fpga-build: clean setup - nix-shell --run "make -C $(BUILD_DIR) fpga-build FPGA_TOP=$(NAME) BOARD=$(BOARD)" + nix-shell --run "make -C $(BUILD_DIR) fpga-build FPGA_TOP=$(GENERATED_NAME) BOARD=$(BOARD)" fpga-test: make fpga-build BE_IF=IOb @@ -169,19 +168,19 @@ fusesoc-update-fs-repo: fusesoc-export # Generate standalone FuseSoC .core file that references pre-built sources from a remote source using 'provider' section. fusesoc-core-file: fusesoc-update-fs-repo # fusesoc-export - cp fusesoc_exports/$(CORE_NAME).core . + cp fusesoc_exports/$(GENERATED_NAME).core . # Append provider remote url to .core file - printf "\n%s\n" "$$MULTILINE_TEXT" >> $(CORE_NAME).core - echo "Generated independent $(CORE_NAME).core file (with 'provider' section)." + printf "\n%s\n" "$$MULTILINE_TEXT" >> $(GENERATED_NAME).core + echo "Generated independent $(GENERATED_NAME).core file (with 'provider' section)." .PHONY: fusesoc-core-file fusesoc-sign: fusesoc-core-file mkdir -p fusesoc_sign/lib - cp $(CORE_NAME).core fusesoc_sign/lib + cp $(GENERATED_NAME).core fusesoc_sign/lib nix-shell --run "cd fusesoc_sign;\ fusesoc library add lib;\ - fusesoc core sign $(CORE_NAME) ~/.ssh/iob-fusesoc-sign-key\ + fusesoc core sign $(GENERATED_NAME) ~/.ssh/iob-fusesoc-sign-key\ " .PHONY: fusesoc-sign @@ -189,8 +188,8 @@ fusesoc-sign: fusesoc-core-file # Cores published must have a 'description' with less than 256 characters, otherwise it fails to publish to cores.fusesoc.net fusesoc-publish: fusesoc-sign nix-shell --run "cd fusesoc_sign;\ - fusesoc core show $(CORE_NAME);\ - fusesoc-publish $(CORE_NAME) https://cores.fusesoc.net/\ + fusesoc core show $(GENERATED_NAME);\ + fusesoc-publish $(GENERATED_NAME) https://cores.fusesoc.net/\ " .PHONY: fusesoc-publish diff --git a/default.nix b/default.nix index 8b4014c1..64bba996 100644 --- a/default.nix +++ b/default.nix @@ -5,8 +5,8 @@ { pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/25.05.tar.gz") {} }: let - py2hwsw_commit = "6f89493ce14029c1b5a35a14037e1e9780b7a75b"; # Replace with the desired commit. - py2hwsw_sha256 = "o/tU0Vogv7bwSST4crhqm9rxEXuHXvASnhChG7NZoSk="; # Replace with the actual SHA256 hash. + py2hwsw_commit = "7fdbc6d8ee83e8d43470f7d39df21de824dadd94"; # Replace with the desired commit. + py2hwsw_sha256 = "vQBJF1ZqvD3SguF1RNBYgKbPSQZ1xDKjOk0mP9Hg8yU="; # Replace with the actual SHA256 hash. # Get local py2hwsw root from `PY2HWSW_ROOT` env variable py2hwswRoot = builtins.getEnv "PY2HWSW_ROOT"; diff --git a/hardware/modules/iob_cache_back_end_iob/iob_cache_back_end_iob.py b/hardware/modules/iob_cache_back_end_iob/iob_cache_back_end_iob.py index 7485cdbb..8f0287b1 100644 --- a/hardware/modules/iob_cache_back_end_iob/iob_cache_back_end_iob.py +++ b/hardware/modules/iob_cache_back_end_iob/iob_cache_back_end_iob.py @@ -159,7 +159,7 @@ def setup(py_params: dict): # attributes_dict["subblocks"] = [ { - "core_name": "iob_reg", + "core": "iob_reg", "instance_name": "iob_reg_care_inst", "port_params": { "clk_en_rst_s": "c_a_r_e", diff --git a/hardware/modules/iob_cache_memory/iob_cache_memory.py b/hardware/modules/iob_cache_memory/iob_cache_memory.py index 462af8b6..9415086e 100644 --- a/hardware/modules/iob_cache_memory/iob_cache_memory.py +++ b/hardware/modules/iob_cache_memory/iob_cache_memory.py @@ -237,20 +237,20 @@ def setup(py_params: dict): # attributes_dict["subblocks"] = [ { - "core_name": "iob_ram_t2p", + "core": "iob_ram_t2p", "instance_name": "iob_ram_t2p_inst", }, { - "core_name": "iob_fifo_sync", + "core": "iob_fifo_sync", "instance_name": "iob_fifo_sync_inst", }, { - "core_name": "iob_ram_sp", + "core": "iob_ram_sp", "instance_name": "iob_ram_sp_inst", }, # For iob_cache_replacement_policy.v { - "core_name": "iob_regarray_sp", + "core": "iob_regarray_sp", "instance_name": "iob_regarray_sp_inst", }, ] diff --git a/hardware/simulation/iob_cache_sim_wrapper/iob_cache_sim_wrapper.py b/hardware/simulation/iob_cache_sim_wrapper/iob_cache_sim_wrapper.py index 5021235d..043c6805 100644 --- a/hardware/simulation/iob_cache_sim_wrapper/iob_cache_sim_wrapper.py +++ b/hardware/simulation/iob_cache_sim_wrapper/iob_cache_sim_wrapper.py @@ -158,7 +158,7 @@ def setup(py_params_dict): converter_connect["clk_en_rst_s"] = "clk_en_rst_s" attributes_dict["subblocks"] = [ { - "core_name": "iob_cache", + "core": "iob_cache", "instance_name": "cache", "instance_description": f"Unit Under Test (UUT) Cache instance with '{params['be_if']}' back end interface.", "parameters": { @@ -173,7 +173,7 @@ def setup(py_params_dict): }, }, { - "core_name": "iob_universal_converter", + "core": "iob_universal_converter", "instance_name": "iob_universal_converter", "instance_description": "Convert IOb port from testbench into correct interface for Cache front-end bus", "subordinate_if": "iob", @@ -188,7 +188,7 @@ def setup(py_params_dict): if params["be_if"] == "axi": attributes_dict["subblocks"] += [ { - "core_name": "iob_axi_ram", + "core": "iob_axi_ram", "instance_name": "ddr_model_mem", "instance_description": "External memory", "parameters": { @@ -211,7 +211,7 @@ def setup(py_params_dict): }, }, { - "core_name": "iob_ram_t2p_be", + "core": "iob_ram_t2p_be", "instance_name": "iob_ram_t2p_be_inst", "parameters": { "ADDR_W": "AXI_ADDR_W - 2", @@ -225,7 +225,7 @@ def setup(py_params_dict): elif params["be_if"] == "iob": attributes_dict["subblocks"] += [ { - "core_name": "iob_ram_sp_be", + "core": "iob_ram_sp_be", "instance_name": "native_ram", "parameters": { "ADDR_W": "BE_ADDR_W", diff --git a/iob_cache.py b/iob_cache.py index 63ff3d3f..fdc4abf4 100644 --- a/iob_cache.py +++ b/iob_cache.py @@ -564,7 +564,7 @@ def setup(py_params: dict): converter_connect["clk_en_rst_s"] = "clk_en_rst_s" attributes_dict["subblocks"] = [ { - "core_name": "iob_universal_converter", + "core": "iob_universal_converter", "instance_name": "iob_universal_converter", "instance_description": "Convert front-end interface into internal IOb port", "subordinate_if": FE_IF.lower(), @@ -580,7 +580,7 @@ def setup(py_params: dict): attributes_dict["subblocks"][-1]["parameters"]["AXI_ID_W"] = "AXI_ID_W" attributes_dict["subblocks"] += [ { - "core_name": "iob_cache_front_end", + "core": "iob_cache_front_end", "instance_name": "front_end", "instance_description": "This IOb interface is connected to a processor or any other processing element that needs a cache buffer to improve the performance of accessing a slower but larger memory", "parameters": { @@ -597,7 +597,7 @@ def setup(py_params: dict): }, }, { - "core_name": "iob_cache_memory", + "core": "iob_cache_memory", "instance_name": "cache_memory", "instance_description": "This block contains the tag, data storage memories and the Write Through Buffer if the correspeonding write policy is selected; these memories are implemented either with RAM if large enough, or with registers if small enough", "config_macros": config_macros, @@ -626,7 +626,7 @@ def setup(py_params: dict): if BE_IF == "AXI4": attributes_dict["subblocks"] += [ { - "core_name": "iob_cache_back_end_axi", + "core": "iob_cache_back_end_axi", "instance_name": "back_end_axi", "instance_description": "Memory-side interface: if the cache is at the last level before the target memory module, the back-end interface connects to the target memory (e.g. DDR) controller; if the cache is not at the last level, the back-end interface connects to the next-level cache. This module implements an AXI4 interface", "parameters": { @@ -653,7 +653,7 @@ def setup(py_params: dict): elif BE_IF == "IOb": attributes_dict["subblocks"] += [ { - "core_name": "iob_cache_back_end_iob", + "core": "iob_cache_back_end_iob", "instance_name": "back_end_iob", "instance_description": "Memory-side interface: if the cache is at the last level before the target memory module, the back-end interface connects to the target memory (e.g. DDR) controller; if the cache is not at the last level, the back-end interface connects to the next-level cache. This module implements an IOb interface", "parameters": { @@ -674,14 +674,14 @@ def setup(py_params: dict): ] attributes_dict["subblocks"] += [ { - "core_name": "iob_cache_control", + "core": "iob_cache_control", "instance_name": "cache_control", "be_if": be_if, "instantiate": False, # Instantiated manually in the verilog snippet }, # Generate CSRs but don't instantiate it (generated hardware unused; only for software and docs) { - "core_name": "iob_csrs", + "core": "iob_csrs", "instance_name": "csrs", "name": f"iob_cache_{be_if}_csrs", "instantiate": False, @@ -799,7 +799,7 @@ def setup(py_params: dict): }, # For simulation { - "core_name": "iob_tasks", + "core": "iob_tasks", "instance_name": "iob_tasks_inst", "dest_dir": "hardware/simulation/src", "instantiate": False, @@ -811,7 +811,7 @@ def setup(py_params: dict): attributes_dict["superblocks"] = [ # Simulation wrapper { - "core_name": "iob_cache_sim_wrapper", + "core": "iob_cache_sim_wrapper", "dest_dir": "hardware/simulation/src", "cache_confs": [ conf for conf in attributes_dict["confs"] if conf["type"] in ["P", "D"] @@ -825,11 +825,11 @@ def setup(py_params: dict): # attributes_dict["sw_modules"] = [ { - "core_name": "iob_coverage_analyze", + "core": "iob_coverage_analyze", "instance_name": "iob_coverage_analyze_inst", }, { - "core_name": "iob_linux_device_drivers", + "core": "iob_linux_device_drivers", }, ] #