URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Subversion Repositories riscv_vhdl
[/] [riscv_vhdl/] [trunk/] [rtl/] [patches/] [memmap.info] - Rev 5
Compare with Previous | Blame | View Log
git submodule foreach git pull origin mastermake CONFIG=GnssConfig verilogModelSim: Global define for behav.srams.v +define+RANDOMIZE=1ModelSim: Global define for rocketchip.GnssConfig.v +define+RANDOMIZE_REG_INIT=1// VCD stimulus in ModelSim from SystemC.// ModelSim uses only 1-bit signals, so convert VCD -> WLF -> VCD.vcd2wlf E:/Projects/GitProjects/riscv_vhdl/debugger/win32build/Debug/intdiv.vcd -o e:/indiv.wlfwlf2vcd e:/indiv.wlf -o e:/intdiv.vcdvsim -t 1ps -vcdstim E:/intdiv.vcd riverlib.intdiv -do "add wave sim:/intdiv/*; run 10000000"vsim -view e:/indiv.wlf -- Add wlf-data to wave-viewer.add wave o_fetch:/SystemC/*// Comparisioncompare start o_mem simcompare add -wave sim:/memaccess/o_mem_addrcompare runcompare end//////////////////////////////// SCALA modificationsrocketchip/Configs.scals+class GnssConfig extends Config(new BaseConfig)/* @brief: Enable rwx permssions and make cachable < 0x80000000** This must enable rwx permissions for all memory regions*///Check that build output memory mapping contains Debug regions0x0 - 0x1000 Debug rwx//Let's fake all memories will be mapped to this region managerrocket/TLB.scalaval prot_r = fastCheck(_.supportsGet) !!! fastCheck need to changeval prot_w = fastCheck(_.supportsPutFull)val prot_x = fastCheck(_.executable)-+ val cacheable = ~mpu_physaddr(31)//fastCheck(_.supportsAcquire)uncore/tilelink2/parameters.scala- def find(address: BigInt) = managers.find(_.address.exists(_.contains(address)))+ def find(address: BigInt) = managers.find(_.address.exists(_.contains(BigInt(0x0))))// The safe version will check the entire address- def findSafe(address: UInt) = Vec(managers.map(_.address.map(_.contains(address)).reduce(_ || _)))+ def findSafe(address: UInt) = Vec(managers.map(_.address.map(_.contains(UInt(0x0))).reduce(_ || _)))// The fast version assumes the address is valid- def findFast(address: UInt) = Vec(managers.map(_.address.map(_.widen(~routingMask)).distinct.map(_.contains(address)).reduce(_ || _)))+ def findFast(address: UInt) = Vec(managers.map(_.address.map(_.widen(~routingMask)).distinct.map(_.contains(UInt(0x0))).reduce(_ || _)))////////////////////////////// Generated Verilog fixes// Use search [0:127] !!;module BTB add reset:if(reset) begin`ifndef SYNTHESISfor (initvar=0; initvar<128; initvar=initvar+1) begin_T_2578[initvar] <= 2'b00;end`endifend else if(T_2209_T_2234_en & T_2209_T_2234_mask) begin_T_2578[T_2209_T_2234_addr] <= T_2209_T_2234_data;endCSRFile:: reset "reg_mideleg" and "reg_medeleg" bif(reset) beginreg_mideleg <= 64'd0;end else beginif(wen) beginif(T_6079) beginreg_mideleg <= T_7516;endendendif(reset) beginreg_medeleg <= 64'd0;end else beginif(wen) beginif(T_6081) beginreg_medeleg <= T_7517;endendend/* @brief how to find registers info** Find the following code in module Rocket(..)*/`ifdef PRINTF_CONDif (`PRINTF_COND) begin`endifif (T_8604) begin$fwrite(32'h80000002,"C%d: %d [%d] pc=[%h] W[r%d=%h][%d] R[r%d=%h] R[r%d=%h] inst=[%h] DASM(%h)\n",\io_hartid, - coreT_8594, - csr_io_timewb_valid,wb_reg_pc, - pcT_8596, - register write idx r0..r31rf_wdata, - new valuerf_wen, -T_8597, - register read1 idxT_8599, - read1 valueT_8600, - register read2 idxT_8602, - read2 valuewb_reg_inst, - instwb_reg_inst);end`ifdef PRINTF_COND---------------------------------------------HOW TO build toolchain for soft-float?---------------------------------------------cd riscv-tools/riscv-gnu-toolchain./configure --prefix=/home/teeshina/riscv/gcc-softloat --disable-floatmkdir /home/teeshina/riscv/gcc-softloatexport PATH=/home/teeshina/riscv/gcc-softloat/bin:$PATHmake
