Copy config loader in python

This commit is contained in:
developandplay 2021-06-26 15:37:17 +02:00
parent 23afca3de8
commit 16b3e08c17
2 changed files with 6 additions and 3 deletions

View File

@ -30,6 +30,7 @@
import os import os
import sys import sys
from shutil import copyfile
from migen import * from migen import *
from litex import get_data_mod from litex import get_data_mod
@ -110,6 +111,11 @@ class BlackParrotRV64(CPU):
o_wbm_bte_o = idbus.bte, o_wbm_bte_o = idbus.bte,
) )
# Copy config loader to /tmp
vdir = get_data_mod("cpu", "blackparrot").data_location
bp_litex = os.path.join(vdir, "bp_litex")
copyfile(os.path.join(bp_litex, "cce_ucode.mem"), "/tmp/cce_ucode.mem")
# Add Verilog sources # Add Verilog sources
try: try:
os.environ["BP"] os.environ["BP"]

View File

@ -19,6 +19,3 @@ export LITEX_SIMU_DIR=$BP_LITEX_DIR/simulation
sed -i "s/localparam dram_base_addr_gp = 40'h00_8000_0000;/localparam dram_base_addr_gp = 40'h00_7000_0000;/" $BP_COMMON_DIR/src/include/bp_common_pkg.vh sed -i "s/localparam dram_base_addr_gp = 40'h00_8000_0000;/localparam dram_base_addr_gp = 40'h00_7000_0000;/" $BP_COMMON_DIR/src/include/bp_common_pkg.vh
sed -i "s/localparam bp_pc_entry_point_gp=39'h00_8000_0000/localparam bp_pc_entry_point_gp=39'h00_7000_0000/" $BP_ME_DIR/test/common/bp_cce_mmio_cfg_loader.v sed -i "s/localparam bp_pc_entry_point_gp=39'h00_8000_0000/localparam bp_pc_entry_point_gp=39'h00_7000_0000/" $BP_ME_DIR/test/common/bp_cce_mmio_cfg_loader.v
sed -i "s/wire local_cmd_li = (cmd_fifo_selected_lo.header.addr < dram_base_addr_gp);/wire local_cmd_li = (cmd_fifo_selected_lo.header.addr < 32'h5000_0000);/" $BP_TOP_DIR/src/v/bp_softcore.v sed -i "s/wire local_cmd_li = (cmd_fifo_selected_lo.header.addr < dram_base_addr_gp);/wire local_cmd_li = (cmd_fifo_selected_lo.header.addr < 32'h5000_0000);/" $BP_TOP_DIR/src/v/bp_softcore.v
## Copy config loader to /tmp
cp $BP_LITEX_DIR/cce_ucode.mem /tmp/.