Skip to content

Commit 84a8cf2

Browse files
authored
Merge pull request #422 from os-fpga/EDA-3187-add_setup_lec_sim
EDA-3187 added setup_lec_sim and updated rtl of binary_to_bcd
2 parents bef68a8 + 00c35f7 commit 84a8cf2

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

RTL_testcases/RTL_Benchmarks_Gap_Analysis/binary_to_bcd/raptor_run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ parse_cga exit 1; }
266266
else
267267
echo ""
268268
fi
269+
echo "setup_lec_sim 10 2">>raptor_tcl.tcl
270+
[ "$tool_name" = "iverilog" ] && echo "simulate gate icarus">>raptor_tcl.tcl || echo "simulate gate verilator">>raptor_tcl.tcl
271+
[ "$tool_name" = "iverilog" ] && echo "simulate pnr icarus">>raptor_tcl.tcl || echo "simulate pnr verilator">>raptor_tcl.tcl
269272
echo "sta">>raptor_tcl.tcl
270273
echo "power">>raptor_tcl.tcl
271274
echo "bitstream $bitstream">>raptor_tcl.tcl

RTL_testcases/RTL_Benchmarks_Gap_Analysis/binary_to_bcd/rtl/auto_baud_with_tracking.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ begin
389389
else // must have been a clock edge
390390
begin
391391
if (~verify) target_bits <= `TEMPLATE_BITS;
392-
if (verify && mid_bit_count) target_bits <= {0,(target_bits>>1)};
392+
if (verify && mid_bit_count) target_bits <= {1'b0, target_bits>>1};
393393
end
394394
end
395395
// It is done when only the stop bit is left in the shift register.

RTL_testcases/RTL_Benchmarks_Gap_Analysis/binary_to_bcd/rtl/top.v

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
module top (
4141
clk_0,
4242
clk_1, // Unused
43+
reset,
4344
switch,
4445
led,
4546
extra, // extra pads
@@ -57,6 +58,7 @@ module top (
5758
// I/O declarations
5859
input clk_0; // 48 MHz
5960
input clk_1;
61+
input reset;
6062
input [3:0] switch;
6163
input rs232_0_i;
6264
input rs232_1_i;
@@ -120,7 +122,7 @@ wire [2:0] convert_mode; // [0] bypasses second converter.
120122
// [2] is "autorun" for second converter
121123

122124
// Other...
123-
wire reset = switch[0]; // Simply a renaming exercise
125+
// wire reset = switch[0]; // Simply a renaming exercise
124126

125127
wire [7:0] a_led; // For displaying data on LEDs
126128
wire [7:0] reg_led; // For displaying register on LEDs
@@ -146,10 +148,10 @@ assign slow_ce = (slow_ce_timer == `SLOW_CE_TIMEOUT);
146148

147149
// Assign values to ports
148150
assign rs232_1_o = rs232_1_i; // RS232 loopback on COM1
149-
assign extra = 13'hzzzz;
150-
assign C = 16'hzzzz;
151-
assign D = 48'hzzzzzzzzzzzz;
152-
assign E = {18'hzzzzz,debug}; // Lazily concatenate debug signals to lsbs
151+
assign extra = 13'h0;
152+
assign C = 16'h0;
153+
assign D = 48'h0;
154+
assign E = {18'h0,debug}; // Lazily concatenate debug signals to lsbs
153155
// of port E. Whatever the size of the debug
154156
// signals, they just "shove over" the extra
155157
// "z" signals, and the synthesizer drops
@@ -277,7 +279,7 @@ binary_to_bcd #(
277279
(
278280
.clk_i(clk_0),
279281
.ce_i(1'b1),
280-
.rst_i(rst),
282+
.rst_i(reset),
281283
.start_i(start_pulse_bcd || start_slow_bcd),
282284
.dat_binary_i(binary_source),
283285
.dat_bcd_o(bcd_data),
@@ -295,7 +297,7 @@ bcd_to_binary #(
295297
(
296298
.clk_i(clk_0),
297299
.ce_i(1'b1),
298-
.rst_i(rst),
300+
.rst_i(reset),
299301
.start_i(start_pulse_bin || start_slow_bin),
300302
.dat_bcd_i(bcd_data),
301303
.dat_binary_o(bin_data),

0 commit comments

Comments
 (0)