Open jiuchang07 opened 2 years ago
Hi Jiu
That is just a design choice. I made the reference signals from 2520 data points. This number was chosen just to have a very good harmonic shape with low anharmonic effects. So, the max frequency is internal clock / mem_length : 125 MHz / 2520
I've made some other versions with shorter mem length for higher modulation : https://github.com/marceluda/rp_lock-in_pid_h_hf
But I'm not doing maintenance on that...
El lun, 4 abr 2022 a las 21:42, jiuchang07 @.***>) escribió:
Hi Luda,
I was wondering why the harmonic lock-in working frequency is limited to only up to 50 kHz. I read your paper and your source code and guess that it is because the gen_mod2.v module can only generate sinusoidal waves up to 50 kHz. Is this true? If there is another reason, I would love to learn about it. If the above is true, why don't you use the built-in signal generator that can reach up to 50 MHz?
Best, Jiu
— Reply to this email directly, view it on GitHub https://github.com/marceluda/rp_lock-in_pid/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACALCQFBOS466ZOAW2763ITVDOEA5ANCNFSM5SRESE2Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hmm that makes sense. I tried running the hf version on my RP and it doesn't work. For our purposes, we are willing to sacrifice the good shape of sine waves for a higher frequency.
Sorry ... today I noticed I've never uploaded the changes made on de HF version. I've never pushed the git repo. My mistake. Now it's up today. The important file you are looking for is gen_mod_h.v
Great, it works! Thank you. I have a few more design choice questions:
I tried changing the number of data points used to generate signal in gen_mod_h.v to:
// [PERIOD_LEN_PARAM DOCK]
localparam mem_large = 12'd48 ; // complete signal large
localparam mem_f1 = 12'd24 ; // memory large for cos_f1
localparam mem_f2 = 9'd12; // memory large for cos_f2
localparam mem_f3 = 8'd8; // memory large for cos_f3
But it doesn't change the generated signal frequency. When the period parameter is 107, I would expect 24 kHz with 48 data points because it was 9.6 kHz with 120 data points, but it's still showing 9.6kHz. What else should I change?
That makes sense, thank you for your clarification!
I was also studying the file mult_dsp_14.v
but couldn't find the implementation of mult_dsp_14_mult_gen_v12_0_viv
. Is the implementation included in the encrypted code below (line 134 - 334)?
Hi Luda,
I was wondering why the harmonic lock-in working frequency is limited to only up to 50 kHz. I read your paper and your source code and guess that it is because the
gen_mod2.v
module can only generate sinusoidal waves up to 50 kHz. Is this true? If there is another reason, I would love to learn about it. If the above is true, why don't you use the built-in signal generator that can reach up to 50 MHz?Best, Jiu