Skip to content
Snippets Groups Projects
Commit e5b63d6e authored by dam1n19's avatar dam1n19
Browse files

SOC1-223: Update enviroment variable names

parent 93edf21c
No related branches found
No related tags found
No related merge requests found
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
TOP_MODULE ?= nanosoc_chip TOP_MODULE ?= nanosoc_chip
# Filelist to give to v2html # Filelist to give to v2html
FILELIST ?= $(PROJECT_DIR)/flist/project/system.flist FILELIST ?= $(SOCLABS_PROJECT_DIR)/flist/project/system.flist
# Directory to store generated HTML # Directory to store generated HTML
OUT_DIR ?= $(PROJECT_DIR) OUT_DIR ?= $(SOCLABS_PROJECT_DIR)
# Name of generated filelist by python script # Name of generated filelist by python script
OUTPUT_FILELIST := $(OUT_DIR)/filelist.flist OUTPUT_FILELIST := $(OUT_DIR)/filelist.flist
...@@ -26,5 +26,5 @@ gen_html: ...@@ -26,5 +26,5 @@ gen_html:
@mkdir -p $(OUT_DIR)/build @mkdir -p $(OUT_DIR)/build
@(cd $(OUT_DIR)/build; \ @(cd $(OUT_DIR)/build; \
rm *.html; rm *.gif; \ rm *.html; rm *.gif; \
$(SOCTOOLS_FLOW_DIR)/bin/filelist_compile.py -e -f $(FILELIST) -o $(OUTPUT_FILELIST) ; \ $(SOCLABS_SOCTOOLS_FLOW_DIR)/bin/filelist_compile.py -e -f $(FILELIST) -o $(OUTPUT_FILELIST) ; \
$(SOCTOOLS_FLOW_DIR)/bin/htmlgen/v2html/v2html -f $(OUTPUT_FILELIST) -ht $(TOP_MODULE) ; ) $(SOCLABS_SOCTOOLS_FLOW_DIR)/bin/htmlgen/v2html/v2html -f $(OUTPUT_FILELIST) -ht $(TOP_MODULE) ; )
#!/usr/bin/env python3 #!/usr/bin/env python3
#------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------
# HTML Project Generation Script # HTML Project Generation Script
# - Generates HTML based on all filelist in PROJECT_DIR/flist/project # - Generates HTML based on all filelist in SOCLABS_PROJECT_DIR/flist/project
# A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license. # A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
# #
# Contributors # Contributors
...@@ -28,7 +28,7 @@ def top_mod_find(filelist): ...@@ -28,7 +28,7 @@ def top_mod_find(filelist):
def bootrom_gen(): def bootrom_gen():
# Runs Bootrom generation script in NanoSoC Directory # Runs Bootrom generation script in NanoSoC Directory
bootrom_scipt_dir = os.getenv("NANOSOC_TECH_DIR")+"/system" bootrom_scipt_dir = os.getenv("SOCLABS_NANOSOC_TECH_DIR")+"/system"
subprocess.run(["make","-C",bootrom_scipt_dir,"bootrom"]) subprocess.run(["make","-C",bootrom_scipt_dir,"bootrom"])
def html_gen(filelist_path): def html_gen(filelist_path):
...@@ -38,9 +38,9 @@ def html_gen(filelist_path): ...@@ -38,9 +38,9 @@ def html_gen(filelist_path):
# Find Top-level module name # Find Top-level module name
top_mod = top_mod_find(filelist_path) top_mod = top_mod_find(filelist_path)
# Work out output Directory # Work out output Directory
outdir = os.getenv("PROJECT_DIR")+"/"+filelist_name+"/html" outdir = os.getenv("SOCLABS_PROJECT_DIR")+"/"+filelist_name+"/html"
print(outdir) print(outdir)
html_scipt_dir = os.getenv("SOCTOOLS_FLOW_DIR")+"/bin/htmlgen" html_scipt_dir = os.getenv("SOCLABS_SOCTOOLS_FLOW_DIR")+"/bin/htmlgen"
subprocess.run(["make","-C",html_scipt_dir,"gen_html","TOP_MODULE="+top_mod,"OUT_DIR="+outdir]) subprocess.run(["make","-C",html_scipt_dir,"gen_html","TOP_MODULE="+top_mod,"OUT_DIR="+outdir])
def project_gen(args): def project_gen(args):
...@@ -49,8 +49,8 @@ def project_gen(args): ...@@ -49,8 +49,8 @@ def project_gen(args):
# Generate bootrom # Generate bootrom
bootrom_gen() bootrom_gen()
# Find all filelist in project filelist directory # Find all filelist in project filelist directory
for filelist in os.listdir(os.getenv("PROJECT_DIR")+"/flist/project"): for filelist in os.listdir(os.getenv("SOCLABS_PROJECT_DIR")+"/flist/project"):
filelist_path = os.getenv("PROJECT_DIR")+"/flist/project/"+filelist filelist_path = os.getenv("SOCLABS_PROJECT_DIR")+"/flist/project/"+filelist
html_gen(filelist_path) html_gen(filelist_path)
else: else:
if args.bootrom is True: if args.bootrom is True:
...@@ -61,7 +61,7 @@ def project_gen(args): ...@@ -61,7 +61,7 @@ def project_gen(args):
if __name__ == "__main__": if __name__ == "__main__":
# Capture Arguments from Command Line # Capture Arguments from Command Line
parser = argparse.ArgumentParser(description='Generates HTML based on all filelist in PROJECT_DIR/flist/project') parser = argparse.ArgumentParser(description='Generates HTML based on all filelist in SOCLABS_PROJECT_DIR/flist/project')
parser.add_argument("-f", "--filelist", type=str, help="Generate only from this List", required=False) parser.add_argument("-f", "--filelist", type=str, help="Generate only from this List", required=False)
parser.add_argument("-b", "--bootrom", action='store_true', help="Generate Bootrom first", required=False) parser.add_argument("-b", "--bootrom", action='store_true', help="Generate Bootrom first", required=False)
parser.add_argument("-o", "--output", type=str, help="Output Filelist location", required=False) parser.add_argument("-o", "--output", type=str, help="Output Filelist location", required=False)
......
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Call Python script and pass options across # Call Python script and pass options across
python3 $SOCTOOLS_FLOW_DIR/bin/htmlgen/project_html_gen.py $@ python3 $SOCLABS_SOCTOOLS_FLOW_DIR/bin/htmlgen/project_html_gen.py $@
\ No newline at end of file \ No newline at end of file
#!/bin/bash #!/bin/bash
# Update all Submodules to latest commit # Update all Submodules to latest commit
cd $DESIGN_ROOT; git submodule foreach --recursive git pull cd $SOCLABS_DESIGN_ROOT; git submodule foreach --recursive git pull
# for d in $DESIGN_ROOT/* ; do # for d in $SOCLABS_DESIGN_ROOT/* ; do
# if [ -f "$d/.git" ]; then # if [ -f "$d/.git" ]; then
# echo "Git Pulling $d" # echo "Git Pulling $d"
# cd $d; git pull; cd .. # cd $d; git pull; cd ..
......
...@@ -25,11 +25,11 @@ else ...@@ -25,11 +25,11 @@ else
if [ ${2} == "all" ]; then if [ ${2} == "all" ]; then
# Clean all simualation directories # Clean all simualation directories
echo "Cleaning all Project Simulation Directories" echo "Cleaning all Project Simulation Directories"
rm -rf $PROJECT_DIR/simulate/sim rm -rf $SOCLABS_PROJECT_DIR/simulate/sim
mkdir -p $PROJECT_DIR/simulate/sim mkdir -p $SOCLABS_PROJECT_DIR/simulate/sim
else else
# Remove specific simulaiton directory # Remove specific simulaiton directory
SIM_DIR=$PROJECT_DIR/simulate/sim/${2} SIM_DIR=$SOCLABS_PROJECT_DIR/simulate/sim/${2}
if [ -d "$SIM_DIR" ]; then if [ -d "$SIM_DIR" ]; then
rm -rf $SIM_DIR rm -rf $SIM_DIR
else else
...@@ -40,7 +40,7 @@ else ...@@ -40,7 +40,7 @@ else
fi fi
# Find a simulation script in the SoCSim environments of all subrepos # Find a simulation script in the SoCSim environments of all subrepos
simscript=$(find ${SOCSIM_PATH//:/\ } -name "${1}.sh") simscript=$(find ${SOCLABS_SOCSIM_PATH//:/\ } -name "${1}.sh")
# Run Script if Found # Run Script if Found
$simscript $@ $simscript $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment