diff options
Diffstat (limited to 'sdr_lib')
-rw-r--r-- | sdr_lib/dsp_core_rx.v | 4 | ||||
-rw-r--r-- | sdr_lib/dsp_core_tx.v | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sdr_lib/dsp_core_rx.v b/sdr_lib/dsp_core_rx.v index 0e4af37fb..64c82bbda 100644 --- a/sdr_lib/dsp_core_rx.v +++ b/sdr_lib/dsp_core_rx.v @@ -84,7 +84,9 @@ module dsp_core_rx always @(posedge clk) if(rst) phase <= 0; - else if(run) + else if(~run) + phase <= 0; + else phase <= phase + phase_inc; MULT18X18S mult_i diff --git a/sdr_lib/dsp_core_tx.v b/sdr_lib/dsp_core_tx.v index 535f2003e..54889fa2a 100644 --- a/sdr_lib/dsp_core_tx.v +++ b/sdr_lib/dsp_core_tx.v @@ -58,11 +58,13 @@ module dsp_core_tx always @(posedge clk) strobe_hb2 <= strobe_hb2_pre; always @(posedge clk) strobe_cic <= strobe_cic_pre; - // DDC + // NCO always @(posedge clk) if(rst) phase <= 0; - else if(run) + else if(~run) + phase <= 0; + else phase <= phase + phase_inc; wire signed [17:0] da, db; |