diff --git a/Makefile b/Makefile index 3661f14..de56913 100644 --- a/Makefile +++ b/Makefile @@ -199,7 +199,7 @@ DFU_PRODUCT=5af0 ECP_FLASH_OFFSET=0x80000 toplevel=fpga/top-orangecrab0.2.vhdl litedram_target=orangecrab-85-0.2 -soc_extra_v += litesdcard/generated/lattice/litesdcard_core.v +soc_extra_v += litesdcard/generated/lattice.48e6/litesdcard_core.v dmi_dtm=dmi_dtm_ecp5.vhdl endif diff --git a/litesdcard/fusesoc-add-files.py b/litesdcard/fusesoc-add-files.py index 53449e8..3cc0b50 100644 --- a/litesdcard/fusesoc-add-files.py +++ b/litesdcard/fusesoc-add-files.py @@ -7,10 +7,12 @@ import pathlib class LiteSDCardGenerator(Generator): def run(self): vendor = self.config.get('vendor') + clk = self.config.get('frequency') + vf = vendor + "." + clk # Collect a bunch of directory path script_dir = os.path.dirname(sys.argv[0]) - gen_dir = os.path.join(script_dir, "generated", vendor) + gen_dir = os.path.join(script_dir, "generated", vf) print("Adding LiteSDCard for vendor... ", vendor) diff --git a/litesdcard/gen-src/generate.sh b/litesdcard/gen-src/generate.sh index 18c34bc..291845e 100755 --- a/litesdcard/gen-src/generate.sh +++ b/litesdcard/gen-src/generate.sh @@ -18,8 +18,8 @@ for i_clk in $VENDORS do i=$(echo $i_clk | cut -d : -f 1) clk=$(echo $i_clk | cut -d : -f 2) - TARGET_BUILD_PATH=$BUILD_PATH/$i - TARGET_GEN_PATH=$GEN_PATH/$i + TARGET_BUILD_PATH=$BUILD_PATH/$i.$clk + TARGET_GEN_PATH=$GEN_PATH/$i.$clk rm -rf $TARGET_BUILD_PATH rm -rf $TARGET_GEN_PATH mkdir -p $TARGET_BUILD_PATH diff --git a/litesdcard/generated/lattice/litesdcard_core.v b/litesdcard/generated/lattice.48e6/litesdcard_core.v similarity index 100% rename from litesdcard/generated/lattice/litesdcard_core.v rename to litesdcard/generated/lattice.48e6/litesdcard_core.v diff --git a/litesdcard/generated/xilinx/litesdcard_core.v b/litesdcard/generated/xilinx.100e6/litesdcard_core.v similarity index 100% rename from litesdcard/generated/xilinx/litesdcard_core.v rename to litesdcard/generated/xilinx.100e6/litesdcard_core.v diff --git a/microwatt.core b/microwatt.core index 3e65325..94a2623 100644 --- a/microwatt.core +++ b/microwatt.core @@ -461,11 +461,11 @@ generate: litesdcard_arty: generator: litesdcard_gen - parameters: {vendor : xilinx} + parameters: {vendor : xilinx, frequency : 100e6} litesdcard_nexys_video: generator: litesdcard_gen - parameters: {vendor : xilinx} + parameters: {vendor : xilinx, frequency : 100e6} litedram_nexys_video: generator: litedram_gen @@ -493,7 +493,7 @@ generate: litesdcard_wukong-v2: generator: litesdcard_gen - parameters: {vendor : xilinx} + parameters: {vendor : xilinx, frequency : 100e6} parameters: memory_size: