Set environmental variables in python
This commit is contained in:
parent
e3f6d8349b
commit
ac217d818f
|
@ -116,15 +116,22 @@ class BlackParrotRV64(CPU):
|
||||||
bp_litex = os.path.join(vdir, "bp_litex")
|
bp_litex = os.path.join(vdir, "bp_litex")
|
||||||
copyfile(os.path.join(bp_litex, "cce_ucode.mem"), "/tmp/cce_ucode.mem")
|
copyfile(os.path.join(bp_litex, "cce_ucode.mem"), "/tmp/cce_ucode.mem")
|
||||||
|
|
||||||
# Add Verilog sources
|
# Set environmental variables
|
||||||
try:
|
os.environ["BP"] = vdir
|
||||||
os.environ["BP"]
|
os.environ["BP_LITEX_DIR"] = bp_litex
|
||||||
os.environ["LITEX"]
|
|
||||||
self.add_sources(platform, variant)
|
os.environ["BP_COMMON_DIR"] = os.path.join(vdir, "bp_common")
|
||||||
except:
|
os.environ["BP_FE_DIR"] = os.path.join(vdir, "bp_fe")
|
||||||
RED = '\033[91m'
|
os.environ["BP_BE_DIR"] = os.path.join(vdir, "bp_be")
|
||||||
print(RED + "Please set environment variables first, refer to readme file under litex/soc/cores/cpu/blackparrot for details!")
|
os.environ["BP_ME_DIR"] = os.path.join(vdir, "bp_me")
|
||||||
sys.exit(1)
|
os.environ["BP_TOP_DIR"] = os.path.join(vdir, "bp_top")
|
||||||
|
external = os.path.join(vdir, "external")
|
||||||
|
os.environ["BP_EXTERNAL_DIR"] = external
|
||||||
|
os.environ["BASEJUMP_STL_DIR"] = os.path.join(external, "basejump_stl")
|
||||||
|
os.environ["LITEX_FPGA_DIR"] = os.path.join(bp_litex, "fpga")
|
||||||
|
os.environ["LITEX_SIMU_DIR"] = os.path.join(bp_litex, "simulation")
|
||||||
|
|
||||||
|
self.add_sources(platform, variant)
|
||||||
|
|
||||||
|
|
||||||
def set_reset_address(self, reset_address):
|
def set_reset_address(self, reset_address):
|
||||||
|
|
Loading…
Reference in New Issue