Hello Lijian,
Sure! I've gone ahead and attached the lower_freq.m file to this email. When you open up and look through the lower_freq.m file you'll find that it goes into XPS_ROACH_base/pcores/adc_interface_v1_01_a/hdl/vhdl/adc_interface.vhd and changes all of the instances of 'HIGH' to 'LOW' (there are four, I think).

Run the bee_xps compilation up to the 'Copy Base Package' step, use lower_freq.m to change the proper parameters or change them manually, and then go back and finish the rest of the compilation steps using bee_xps.

Hope this helped!

-Louis P. Dartez

Arecibo Remote Command Center Scholar
Center for Advanced Radio Astronomy Researcher
Department of Physics and Astronomy
University of Texas at Brownsville

On 08/16/2012 04:35 AM, 李健(lijian) wrote:
Hi,louis
 I had meet the same question as you!
 can you give me "lower_freq.m" file. and show me how to use it!
thanks!
Li Jian
------------------------------------------------------------------------
------------------------------------------------------------
lijian
李健
Xinjiang Astronomical Observatory, CAS
中国科学院新疆天文台
150, Science 1-Street
Urumqi, Xinjiang, 830011
China
新疆乌鲁木齐市科学一街 150号 (邮编: 830011)
电 话: 09913689065
------------------------------------------------------------
*From:* Louis Dartez <mailto:[email protected]>
*Date:* 2012-01-24 23:30
*To:* Marco Bartolini <mailto:[email protected]>
*CC:* casper <mailto:[email protected]>
*Subject:* Re: [casper] roach & adc sampling rate

Hello Glenn, Marco,

Thank you for your quick replies. I'll be stopping by the lab this afternoon to give your suggestions and try.

Glenn: I'll look around for the DCM/MMCM configurations and I'll let you know where I find them if I do.

Marco: thank you for the m file. I haven't looked at it just yet but I'll give it a try when I get to the lab.

I appreciate your help.

--Louis P. Dartez

On Jan 24, 2012 8:53 AM, "Marco Bartolini" <[email protected] <mailto:[email protected]>> wrote:

    Hi Louis,
    I had your same problem some time ago. I had written a matlab
    function "lower_freq.m" that you can find attached, the code
    should be self explanatory ... and i don't remember the details
    basically you should compile your design with bee_xps up to "Copy
    base package", invoke lower_freq on the target directory, and
    terminate the bof file generation with bee_xps.

    hope it helps
    Marco




    Il giorno 23/gen/2012, alle ore 23.57, G Jones ha scritto:

    Hi Louis,
    The problem is probably that the DCM/MMCM has various
    configuration parameters which have default values for the clock
    speeds most commonly used for CASPER designs. To run at lower
    speeds, you'll need to tweak these values. I thought they can be
    found in the XPS_ROACH_base/data/system.ucf file that is
    generated for your design, but I'm not seeing it there right now.
    Perhaps someone else can guide you to the location of the
    parameters if you don't find them first.
    Glenn

    On Mon, Jan 23, 2012 at 2:46 PM, Louis Dartez
    <[email protected] <mailto:[email protected]>> wrote:

        Hello fellow CASPERites,


                  I've been trying to modify the wideband
        spectrometer tutorial to have the MSSGE block clock rate set
        to 50 MHz and, following the 4 to 1 rule, the ADC running at
        200 MHz. Simulink complains about timing errors when I try to
        do this. Is there another parameter that I'm forgetting about
        and need to change? Or is there some lower limit for the
        ROACH clock rate? I figured that as long as the adc is
        clocked at 4x the roach rate then I should be able to lower
        both of them as long as I keep them at the same ratio.

        Any thoughts?

-- -- Louis Dartez
        (956) 372-5812 <tel:%28956%29%20372-5812>
        Arecibo Remote Command Center Scholar
        Center for Advanced Radio Astronomy
        University of Texas at Brownsville




-- Dr. Marco Bartolini
    I.N.A.F. - I.R.A.
    National Institute for AstroPhysics - Institute of RadioAstronomy
    Medicina Radiotelescopes
    Via Fiorentina, 3508/B 40059 - Medicina (BO) - Italy
    Phone: +39 051 696 5834 <tel:%2B39%20051%20696%205834> Email:
    [email protected] <mailto:[email protected]>
    Fax: +39 051 696 5810 <tel:%2B39%20051%20696%205810>         Web:
    http://www.med.ira.inaf.it



function [ return_value ] = lower_freq( basedir_name )
%LOWER_FREQ Change params to compile at lower clock freq
%   Change params in vhdl base system in order to get the design compiled
%   at low clock freuencies
%
% USAGE: lower_freq( basedir_name ) 
if ~isdir(basedir_name)
    disp(['Cannot find directory: ' basedir_name]);
    return_value = 0;
    return;
end

vhdl_path = [basedir_name '/XPS_ROACH_base/pcores/adc_interface_v1_01_a/hdl/vhdl/'];
if ~isdir(vhdl_path)
    disp(['Cannot find directory: ' vhdl_path]);
    disp('Compile desigin up to \"Copy base package\" in bee_xps');
    return_value = 0;
    return;
end

adc_interface_path = [vhdl_path 'adc_interface.vhd'];
orig_file = fopen(adc_interface_path, 'rt');
if orig_file <= 0
    disp(['Cannot open file: ' adc_interface_path]);
    return_value = 0;
    return;
end

temp_path = [pwd() '/vhdtmp.vhd'];
tmp_file = fopen(temp_path, 'w+t');
if tmp_file <= 0
    disp(['Cannot open file: ' temp_path  ' for writing']);
    return_value = 0;
    return;
end

tline = fgetl(orig_file);
while ischar(tline)
    for o = strfind(tline, 'HIGH')
        disp([tline ' -> ' num2str(o)]);
        tline = strrep(tline, 'HIGH', 'LOW');
        disp(tline);
    end
    fwrite(tmp_file, tline);
    fprintf(tmp_file, '\n');
    tline = fgetl(orig_file);
end
fclose('all');

movefile(temp_path, adc_interface_path);
return_value = 1;
return;

Reply via email to