Skip to content

Commit

Permalink
theoretically remove async resets
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghani committed May 16, 2023
1 parent f86296f commit 5981739
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions designs/d15_jerryfen_prng/src/chip.sv
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ module control_path
endcase
end

always_ff @(posedge clock, posedge reset) begin
always_ff @(posedge clock) begin

if (reset) begin
curr_state <= reset_state;
Expand Down Expand Up @@ -175,7 +175,7 @@ module fibo_lsfr

logic feedback;

always_ff @(posedge clk, posedge reset) begin
always_ff @(posedge clk) begin

if(reset)
state_out <= 8'b0;
Expand Down Expand Up @@ -222,7 +222,7 @@ module galo_lsfr
// xor G2(state_out[5], state_out[4], nextbit);
// xor G3(state_out[4], state_out[3], nextbit);

always_ff @(posedge clk, posedge reset) begin
always_ff @(posedge clk) begin

if(reset)
state_out <= 8'b0000_0000;
Expand Down
4 changes: 2 additions & 2 deletions designs/d15_jerryfen_prng/src/library.sv
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module DFlipFlop
(input logic D, preset_L, reset_L, clock,
output logic Q);

always_ff @(posedge clock, negedge reset_L) begin
always_ff @(posedge clock) begin

if(~preset_L)
Q <= 1;
Expand Down Expand Up @@ -165,7 +165,7 @@ module width_FlipFlop
input logic [WIDTH-1:0] D,
output logic [WIDTH-1:0] Q);

always_ff @(posedge clock, negedge reset_L) begin
always_ff @(posedge clock) begin

if(~preset_L)
Q <= 8'b1;
Expand Down
2 changes: 1 addition & 1 deletion designs/d18_nikhildj_mac/src/DFF.sv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module DFF (
input logic D,
output logic Q
);
always_ff @(posedge clk, negedge reset) begin
always_ff @(posedge clk) begin
if (!reset) begin
Q <= 0; // Clear the register
end else begin
Expand Down
2 changes: 1 addition & 1 deletion designs/d18_nikhildj_mac/src/mac_controller.sv
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module CONTROLLER_MAC (
logic [3:0] temp_count;
enum logic [2:0] {IDLE, INIT, LOAD, RUN, TEST, ADD} state;

always_ff @(posedge clk or negedge reset) begin
always_ff @(posedge clk) begin
if (!reset) begin
state <= IDLE;
temp_count <= 4'b1001;
Expand Down
2 changes: 1 addition & 1 deletion designs/d18_nikhildj_mac/src/multiplier.sv
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module MULTIPLIER_RESULT (
logic [16:0] temp_register;
logic temp_Add;

always_ff @(posedge clk or negedge reset) begin
always_ff @(posedge clk) begin
if (!reset) begin
temp_register <= '0;
temp_Add <= 1'b0;
Expand Down
2 changes: 1 addition & 1 deletion designs/d18_nikhildj_mac/src/multiplier_controller.sv
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module CONTROLLER (
logic [2:0] temp_count;
enum logic [3:0] {IDLE, INIT, TEST, ADD, SHIFT} state;

always_ff @(posedge clk or negedge reset) begin
always_ff @(posedge clk) begin
if (!reset) begin
state <= IDLE;
temp_count <= 3'b000;
Expand Down
4 changes: 2 additions & 2 deletions designs/d22_yushuanl_convolution/src/chip.sv
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ module my_chip
default: nextState = Start;
endcase
end
always_ff @(posedge clock, posedge reset)
always_ff @(posedge clock)
if (reset)
curState <= Start;
else
curState <= nextState;
endmodule
endmodule
4 changes: 2 additions & 2 deletions designs/d23_zhiyingm_turing/TuringMachine/TuringMachine.sv
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ module FSM (
end

// Asynchronous state reset
always_ff @(posedge clock, posedge reset)
always_ff @(posedge clock)
if (reset)
currState <= START;
else
currState <= nextState;

endmodule: FSM
endmodule: FSM
4 changes: 2 additions & 2 deletions designs/d23_zhiyingm_turing/TuringMachine/library.sv
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module DFlipFlop // stores 1 bit value
input logic clock, reset_L, preset_L,
output logic Q);

always_ff @(posedge clock, negedge reset_L, negedge preset_L) begin
always_ff @(posedge clock) begin
// asynchronous reset and preset, active low
if (~reset_L)
Q <= 1'b0;
Expand Down Expand Up @@ -152,4 +152,4 @@ module Memory_synth // stores a number of words, conbinational read, sequential
M[addr] <= data_in; // synchronized write
end

endmodule: Memory_synth
endmodule: Memory_synth
4 changes: 2 additions & 2 deletions designs/d23_zhiyingm_turing/src/TuringMachine.sv
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ module FSM (
end

// Asynchronous state reset
always_ff @(posedge clock, posedge reset)
always_ff @(posedge clock)
if (reset)
currState <= START;
else
currState <= nextState;

endmodule: FSM
endmodule: FSM
4 changes: 2 additions & 2 deletions designs/d23_zhiyingm_turing/src/library.sv
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module DFlipFlop // stores 1 bit value
input logic clock, reset_L, preset_L,
output logic Q);

always_ff @(posedge clock, negedge reset_L, negedge preset_L) begin
always_ff @(posedge clock) begin
// asynchronous reset and preset, active low
if (~reset_L)
Q <= 1'b0;
Expand Down Expand Up @@ -152,4 +152,4 @@ module Memory_synth // stores a number of words, conbinational read, sequential
M[addr] <= data_in; // synchronized write
end

endmodule: Memory_synth
endmodule: Memory_synth
6 changes: 3 additions & 3 deletions designs/d26_cjstange_perceptron/src/lib.sv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module counter
(input logic clk, reset_l, en, clr,
output logic [WIDTH-1:0] count);

always_ff @(posedge clk, negedge reset_l) begin
always_ff @(posedge clk) begin
if (!reset_l)
count <= 'b0;
else if (clr)
Expand All @@ -22,7 +22,7 @@ module register
input logic [WIDTH-1:0] D,
output logic [WIDTH-1:0] Q);

always_ff @(posedge clk, negedge reset_l) begin
always_ff @(posedge clk) begin
if (!reset_l)
Q <= 'b0;
else if (en)
Expand Down Expand Up @@ -63,4 +63,4 @@ module adder
output logic [WIDTH-1:0] sum);

assign {cout, sum} = A + B + cin;
endmodule: adder
endmodule: adder
6 changes: 3 additions & 3 deletions designs/d26_cjstange_perceptron/src/lib.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module counter (clk,
input wire clr;
output reg [WIDTH - 1:0] count;

always @(posedge clk or negedge reset_l)
always @(posedge clk)
if (!reset_l)
count <= 'b0;
else if (clr)
Expand All @@ -31,7 +31,7 @@ module register (clk,
input wire [WIDTH - 1:0] D;
output reg [WIDTH - 1:0] Q;

always @(posedge clk or negedge reset_l)
always @(posedge clk)
if (!reset_l)
Q <= 'b0;
else if (en)
Expand Down Expand Up @@ -75,4 +75,4 @@ module adder (cin,
output wire [WIDTH - 1:0] sum;

assign {cout, sum} = (A + B) + cin;
endmodule
endmodule
4 changes: 2 additions & 2 deletions designs/d26_cjstange_perceptron/src/perceptron.sv
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ module fsm
endcase
end

always_ff @(posedge clk, negedge reset_l) begin
always_ff @(posedge clk) begin
if (!reset_l)
state <= INIT;
else
state <= nextState;
end
endmodule
endmodule
4 changes: 2 additions & 2 deletions designs/d30_yuchingw_fpga/src/chip.sv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Register
input logic [W-1:0] D,
output logic [W-1:0] Q
);
always_ff @(posedge clock, posedge reset) begin
always_ff @(posedge clock) begin
if (reset) begin
Q <= 'd0;
end else if (en) begin
Expand All @@ -25,7 +25,7 @@ module Counter
input logic reset, clock, en,
output logic [W-1:0] Q
);
always_ff @(posedge clock, posedge reset) begin
always_ff @(posedge clock) begin
if (reset) begin
Q <= 'd0;
end else if (en) begin
Expand Down
4 changes: 2 additions & 2 deletions designs/d37_sophiali_calculator/src/math.sv
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module sophialiCMU_math (
enum logic {IDLE, GO} state, nextState;

// ALU
always_ff @(posedge clock, posedge reset) begin
always_ff @(posedge clock) begin
if (reset)
io_out <= 0;
else begin
Expand All @@ -46,7 +46,7 @@ module sophialiCMU_math (
end

// FF to ensure button for enable isn't continuously set
always_ff @(posedge clock, posedge reset) begin
always_ff @(posedge clock) begin
if (reset)
state <= IDLE;
else begin
Expand Down
2 changes: 1 addition & 1 deletion designs/d40_jrecta_asyncfifo/src/async-fifo.sv
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module reg_ar
(input logic clk, rst, en,
input logic[WIDTH-1:0] d,
output logic[WIDTH-1:0] q);
always_ff @(posedge clk, posedge rst)
always_ff @(posedge clk)
if(rst)
q <= '0;
else if(en)
Expand Down
2 changes: 1 addition & 1 deletion designs/d41_stroucki_corralgame/src/game.sv
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ module game
end

// state transition
always @(posedge clock, negedge reset_n) begin
always @(posedge clock) begin
if (~reset_n) begin
lostwon <= 1;
state <= SETUP;
Expand Down
2 changes: 1 addition & 1 deletion designs/d41_stroucki_corralgame/src/stroucki_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module stroucki_top
endcase
end

always @(posedge clock, negedge reset_n) begin
always @(posedge clock) begin
if (~reset_n) begin
state <= IDLE;
data <= 4'b0;
Expand Down

0 comments on commit 5981739

Please sign in to comment.