1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-04-04 20:28:30 +00:00

litesdcard: Name targets by vendor.frequency, not just vendor

In future we will want to support targets using the same vendor but
running at different clock frequencies.  Since the clock frequency is
a parameter to the gateware generation process, we now name the target
directories as "vendor.frequency", i.e., "xilinx.100e6" and
"lattice.48e6" rather than "xilinx" and "lattice".

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This commit is contained in:
Paul Mackerras
2024-04-03 19:48:40 +11:00
parent e5d64f075d
commit 264e609fd4
6 changed files with 9 additions and 7 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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: