Skip to content

Commit

Permalink
Merge pull request #447 from os-fpga/task/EDA-3187/add_setup_lec_sim
Browse files Browse the repository at this point in the history
Task/eda 3187/add setup lec sim
  • Loading branch information
NadeemYaseen authored Nov 8, 2024
2 parents 779c610 + c031c9d commit 2f23396
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ parse_cga exit 1; }
else
echo ""
fi
echo "setup_lec_sim">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate gate icarus">>raptor_tcl.tcl || echo "simulate gate verilator">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate pnr icarus">>raptor_tcl.tcl || echo "simulate pnr verilator">>raptor_tcl.tcl
echo "sta">>raptor_tcl.tcl
echo "power">>raptor_tcl.tcl
echo "bitstream $bitstream">>raptor_tcl.tcl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module qdiv(
reg [N-1:0] dividend_copy;
reg [2*(N-1)-1:0] divider_copy;

reg [5:0] bit;
reg [5:0] bt;
reg done;

initial done = 1;
Expand All @@ -49,7 +49,7 @@ module qdiv(
if( done && start ) begin

done <= 1'b0;
bit <= N+Q-2;
bt <= N+Q-2;
quotient <= 0;
dividend_copy <= {1'b0,dividend[N-2:0]};

Expand All @@ -69,18 +69,18 @@ module qdiv(
//subtract
dividend_copy <= dividend_copy - divider_copy;
//set quotient
quotient[bit] <= 1'b1;
quotient[bt] <= 1'b1;
end

//reduce divisor
divider_copy <= divider_copy >> 1;

//stop condition
if(bit == 0)
done <= 1'b1;

if(bt == 0)
done <= 1'b1;

//reduce bit counter
bit <= bit - 1;
bt <= bt - 1;
end
end
endmodule
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ parse_cga exit 1; }
# [ -z "$ip_name" ] && echo "add_library_ext .v .sv">>raptor_tcl.tcl || echo ""
[ -z "$ip_name" ] && echo "add_design_file ./rtl/common_network.v">>raptor_tcl.tcl
[ -z "$ip_name" ] && echo "add_design_file ./rtl/dff_3_pipe.v">>raptor_tcl.tcl
[ -z "$ip_name" ] && echo "add_design_file ./rtl/dual_port_ram.v">>raptor_tcl.tcl
# [ -z "$ip_name" ] && echo "add_design_file ./rtl/dual_port_ram.v">>raptor_tcl.tcl
[ -z "$ip_name" ] && echo "add_design_file ./rtl/median.v">>raptor_tcl.tcl
[ -z "$ip_name" ] && echo "add_design_file ./rtl/node.v">>raptor_tcl.tcl
[ -z "$ip_name" ] && echo "add_design_file ./rtl/pixel_network.v">>raptor_tcl.tcl
Expand Down Expand Up @@ -264,6 +264,9 @@ parse_cga exit 1; }
else
echo ""
fi
echo "setup_lec_sim">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate gate icarus">>raptor_tcl.tcl || echo "simulate gate verilator">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate pnr icarus">>raptor_tcl.tcl || echo "simulate pnr verilator">>raptor_tcl.tcl
echo "sta">>raptor_tcl.tcl
echo "power">>raptor_tcl.tcl
echo "bitstream $bitstream">>raptor_tcl.tcl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ parse_cga exit 1; }
else
echo ""
fi
echo "setup_lec_sim">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate gate icarus">>raptor_tcl.tcl || echo "simulate gate verilator">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate pnr icarus">>raptor_tcl.tcl || echo "simulate pnr verilator">>raptor_tcl.tcl
echo "sta">>raptor_tcl.tcl
echo "power">>raptor_tcl.tcl
echo "bitstream $bitstream">>raptor_tcl.tcl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ parse_cga exit 1; }
else
echo ""
fi
echo "setup_lec_sim">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate gate icarus">>raptor_tcl.tcl || echo "simulate gate verilator">>raptor_tcl.tcl
[ "$tool_name" = "iverilog" ] && echo "simulate pnr icarus">>raptor_tcl.tcl || echo "simulate pnr verilator">>raptor_tcl.tcl
echo "sta">>raptor_tcl.tcl
echo "power">>raptor_tcl.tcl
echo "bitstream $bitstream">>raptor_tcl.tcl
Expand Down

0 comments on commit 2f23396

Please sign in to comment.