diff options
author | matt <matt@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-12-13 23:28:58 +0000 |
---|---|---|
committer | matt <matt@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-12-13 23:28:58 +0000 |
commit | 2c673090ace048d61732bf5094faa9f0deaa7e9e (patch) | |
tree | 6035254c17025bc1542966649c9701fe9a36fff3 | |
parent | f8812ec0dfee9321890c4743bc76b8d53c90301e (diff) | |
download | uhd-2c673090ace048d61732bf5094faa9f0deaa7e9e.tar.gz uhd-2c673090ace048d61732bf5094faa9f0deaa7e9e.tar.bz2 uhd-2c673090ace048d61732bf5094faa9f0deaa7e9e.zip |
reset the phase when we shut down. Aids in sync
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10115 221aa14e-8319-0410-a670-987f0aec2ac5
-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; |