Skip to content

Commit bef68a8

Browse files
authored
Merge pull request #421 from os-fpga/task/EDA-3187/add_setup_lec_sim
added setup_lec command for axilite_timer_uptime_ip_litex
2 parents da27593 + 0d20c46 commit bef68a8

File tree

2 files changed

+10
-5
lines changed
  • RTL_testcases/RTL_Benchmarks_Gap_Analysis/axilite_timer_uptime_ip_litex

2 files changed

+10
-5
lines changed

RTL_testcases/RTL_Benchmarks_Gap_Analysis/axilite_timer_uptime_ip_litex/raptor_run.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ parse_cga exit 1; }
259259
else
260260
echo ""
261261
fi
262+
echo "setup_lec_sim 10 2">>raptor_tcl.tcl
263+
[ "$tool_name" = "iverilog" ] && echo "simulate gate icarus">>raptor_tcl.tcl || echo "simulate gate verilator">>raptor_tcl.tcl
264+
[ "$tool_name" = "iverilog" ] && echo "simulate pnr icarus">>raptor_tcl.tcl || echo "simulate pnr verilator">>raptor_tcl.tcl
262265
echo "sta">>raptor_tcl.tcl
263266
echo "power">>raptor_tcl.tcl
264267
echo "bitstream $bitstream">>raptor_tcl.tcl
@@ -272,6 +275,8 @@ parse_cga exit 1; }
272275
fi
273276
fi
274277

278+
[ -f rtl/sim.v ] && sed -i -e "s|MEM_FILE_PATH|$PWD/rtl|g" rtl/sim.v
279+
275280
cd results_dir
276281
echo "Device: $device">>results.log
277282
echo "Strategy: $strategy">>results.log

RTL_testcases/RTL_Benchmarks_Gap_Analysis/axilite_timer_uptime_ip_litex/rtl/sim.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,7 +2899,7 @@ end
28992899
// Port 0 | Read: Sync | Write: ---- |
29002900
reg [31:0] mem[0:5430];
29012901
initial begin
2902-
$readmemh("mem.init", mem);
2902+
$readmemh("MEM_FILE_PATH/mem.init", mem);
29032903
end
29042904
reg [31:0] mem_dat0;
29052905
always @(posedge sys_clk_1) begin
@@ -2914,7 +2914,7 @@ assign main_simsoc_dat_r = mem_dat0;
29142914
// Port 0 | Read: Sync | Write: Sync | Mode: Write-First | Write-Granularity: 8
29152915
reg [31:0] mem_1[0:874];
29162916
initial begin
2917-
$readmemh("mem_1.init", mem_1);
2917+
$readmemh("MEM_FILE_PATH/mem_1.init", mem_1);
29182918
end
29192919
reg [9:0] mem_1_adr0;
29202920
always @(posedge sys_clk_1) begin
@@ -2937,7 +2937,7 @@ assign main_ram_dat_r = mem_1[mem_1_adr0];
29372937
// Port 0 | Read: Sync | Write: ---- |
29382938
reg [7:0] mem_2[0:36];
29392939
initial begin
2940-
$readmemh("mem_2.init", mem_2);
2940+
$readmemh("MEM_FILE_PATH/mem_2.init", mem_2);
29412941
end
29422942
reg [5:0] mem_2_adr0;
29432943
always @(posedge sys_clk_1) begin
@@ -2952,8 +2952,8 @@ assign builder_csr_bankarray_dat_r = mem_2[mem_2_adr0];
29522952
// Port 0 | Read: Sync | Write: Sync | Mode: Read-First | Write-Granularity: 10
29532953
// Port 1 | Read: Sync | Write: ---- |
29542954
reg [9:0] storage[0:15];
2955-
reg [9:0] storage_dat0;
2956-
reg [9:0] storage_dat1;
2955+
reg [9:0] storage_dat0=10'b0;
2956+
reg [9:0] storage_dat1=10'b0;
29572957
always @(posedge sys_clk_1) begin
29582958
if (main_uart_tx_fifo_wrport_we)
29592959
storage[main_uart_tx_fifo_wrport_adr] <= main_uart_tx_fifo_wrport_dat_w;

0 commit comments

Comments
 (0)