Skip to content

Commit aef3684

Browse files
committed
Fixed comment typos
1 parent d5440f1 commit aef3684

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

fsmd/bit_diff.sv

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ module bit_diff_fsmd_2p_2
537537
next_state = RESTART;
538538

539539
// For us to be able to assert done in the next cycle, we need
540-
// to send it to the result register this cycle. Also, we need
541-
// to use the next version of diff since the register won't be
542-
// updated yet.
540+
// to send the new diff to the result register this cycle. Also,
541+
// we need to use the next version of diff since the register
542+
// won't be updated yet.
543543
next_result = next_diff;
544544
end
545545
end
@@ -648,7 +648,7 @@ module bit_diff_fsmd_2p_3
648648
end
649649
end
650650

651-
// Since we actually want register for all the code above, it is not
651+
// Since we actually want registers for all the code above, it is not
652652
// necessary to add next signals for any of them, including the state_r.
653653
// Instead, we'll just pull out the done_r signal and make it combinational
654654
// logic in this process.
@@ -674,6 +674,10 @@ module bit_diff_fsmd_2p_3
674674
endmodule
675675

676676

677+
// Module: fsmd_2p_4
678+
// Description: This extends the previous module by also separating
679+
// state_r and next_state, in addition to having done as combinational logic.
680+
677681
module bit_diff_fsmd_2p_4
678682
#(
679683
parameter WIDTH
@@ -697,8 +701,6 @@ module bit_diff_fsmd_2p_4
697701

698702
assign result = result_r;
699703

700-
// Note that this code is almost identical to a 1-process FSMD. We have
701-
// simply removed the done logic.
702704
always @(posedge clk or posedge rst) begin
703705
if (rst == 1'b1) begin
704706
result_r <= '0;
@@ -713,7 +715,7 @@ module bit_diff_fsmd_2p_4
713715
// the state register.
714716
state_r <= next_state;
715717

716-
// All other signals are still registered with a next version, since
718+
// All other signals are still registered without a next version, since
717719
// we don't have a need for the next version.
718720
case (state_r)
719721
START : begin
@@ -817,7 +819,7 @@ module bit_diff_fsmd_3p
817819
// The second process is another always_ff (usually assuming no blocking
818820
// assignments) that handles all the other registered logic. In other words,
819821
// we have simply taken the one always_ff block from the previous module and
820-
// separated it into two: one of the state register, and one for everything
822+
// separated it into two: one for the state register, and one for everything
821823
// else.
822824
always @(posedge clk or posedge rst) begin
823825
if (rst == 1'b1) begin

0 commit comments

Comments
 (0)