diff --git a/rtl/genSaw.sv b/rtl/genSaw.sv index 2f3eef0..f4e6e14 100644 --- a/rtl/genSaw.sv +++ b/rtl/genSaw.sv @@ -39,7 +39,7 @@ always_ff @(posedge clk_48k) // Generate new saw sample on rising edge of 48kHz else if (!i_pause) saw <= saw + saw_step; // Add saw_step if not paused (48kHz) logic [15:0] square; -always_comb square = {16{saw[15]}}; // Square wave is MSB of saw +always_comb square = {~saw[15], {15{saw[15]}}}; // Square wave is MSB of saw logic [15:0] triangle; always_comb triangle = saw[15] ? {~saw[14:0], 1'b1} : {saw[14:0], 1'b0}; // Triangle wave calc