mirror of
https://github.com/supleed2/EIE4-FYP.git
synced 2024-12-22 14:15:50 +00:00
Flip MSB of square wave, avoid DAC automute
This commit is contained in:
parent
79ab8cd538
commit
c4469cd6f6
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue