Hi Tian

I guess the SNAP 2's will support more different ADC's via daughter cards. That will probably be useful if someone needs a special ADC.

Gerry


On 9/21/2017 9:07 PM, ian wrote:
Hi Gerry:

Yes. Just like Jack said, those updates are for SNAP 1.2.

I have not seen the schematic of SNAP 2. My guess is that if you want to have HMCAD1520 ADCs on SNAP 2, some modifications on pin map, reference clock and the software interface are required.

Best,

Tian Huang

On Thu, Sep 21, 2017 at 3:49 AM, Jack Hickish <[email protected] <mailto:[email protected]>> wrote:

    Hi Gerry,

    This is SNAP1 (aka SNAP1 rev2, SNAP1v2, SNAP1.2). Cambridge had a
    board made with the 12-bit HMCAD1520 ADC populated in place of the
    "normal" 8-bit HMCAD1511 ADCs. Tian has done a huge amount of work
    to get this working, and improve/fix the original 8-bit code.
    There were even pull requests raised against the casper-astro
    repository -- take note, other developers!
    This will make it's way into the main repository, probably in a
    couple of weeks when I'm in Cambridge.

    Cheers
    Jack

    On Wed, 20 Sep 2017 at 11:14 Gerald Harp <[email protected]
    <mailto:[email protected]>> wrote:

        Dear Tian

        Thanks very much for this summary and your efforts. I assume
        you're talking about SNAP revision 1.2?  Or could it be SNAP 2?

        Gerry


        On 9/5/2017 11:23 AM, ian wrote:
        Hi All:

        I've done the hardware and software design for 12-bit ADCs,
        which is HMCAD1520 (alternative to HMCAD1511), on SNAP board.

        My fork of the hardware repo is here
        
<https://github.com/ianmalcolm/mlib_devel/commit/bf039e82b7f90081dcb515ebedb4e877274f53ac>.
        My fork of the software repo is here
        
<https://github.com/ianmalcolm/casperfpga/commit/dd77442ce715c62f547b382a76860c4c2c02a58f>.

        Tests for it's 8-bit mode have been carried out by organisers
        and attendants of the tutorial of the CASPER 2017 workshop.
        Thank you very much!
        I have done the test for it's 12-bit mode with a Simulink SLX
        model that does not include an F engine or an FX engine.
        HMCAD1520 supports 14-bit mode as well. I am still working on it.

        This yellow block mainly involves snap_adc.py
        <http://snap_adc.py>, adc16_interface
        
<https://github.com/ianmalcolm/mlib_devel/tree/high_resolution_adc/jasper_library/hdl_sources/adc16_interface>,
        wb_adc16_controller
        
<https://github.com/ianmalcolm/mlib_devel/tree/high_resolution_adc/jasper_library/hdl_sources/wb_adc16_controller>,
        wb_bram
        
<https://github.com/ianmalcolm/mlib_devel/tree/high_resolution_adc/jasper_library/hdl_sources/wb_bram>,
        and some peripherals.

        The image below shows the Simulink dialog for the snap_adc
        yellow block parameter setting. For simplification purpose,
        the output bitwidth of the snap_adc
        
<https://github.com/ianmalcolm/mlib_devel/blob/high_resolution_adc/jasper_library/yellow_blocks/snap_adc.py>
        yellow block is always an integral multiples of 8 bits. For
        example, when you choose resolution=8-bit, the output
        bitwidth is 8 bits. When you choose resolution=12-bit, the
        output bitwidth is 16 bits.



        The number of inputs per SNAP is subjected to the the setting
        of Sample rate. For guideline on setting the Sample rate,
        click the help button and you will have:


        ​
        The software control consists of wishbonedevice.py
        
<https://github.com/ianmalcolm/casperfpga/blob/ian_adc16_devel/src/wishbonedevice.py>,
        synth.py
        
<https://github.com/ianmalcolm/casperfpga/blob/ian_adc16_devel/src/synth.py>,
        clockswitch.py
        
<https://github.com/ianmalcolm/casperfpga/blob/ian_adc16_devel/src/clockswitch.py>,
        adc.py
        
<https://github.com/ianmalcolm/casperfpga/blob/ian_adc16_devel/src/adc.py>,
        snapadc.py
        
<https://github.com/ianmalcolm/casperfpga/blob/ian_adc16_devel/src/snapadc.py>.
        Here is a brief demonstration of the use of the software.

            class SNAPADC(object):


                def __init__(self, interface, ADC='HMCAD1511',
            defaultDelayTap=0)

                  """ SNAPADC initialises/controls ADC related
            staffs, synchronises the

                    data lanes of all ADCs on a SNAP board.
                    interface is an instance of casperfpga.CasperFpga
            (or an instance
                    of corr.katcp_wrapper.FpgaClient given a change
            on "word_offset"

                    to "offset" in wishbonedevice.py)
                    The default reference frequency in this lib is
            10MHz. If you are using
                    a different one, say 50MHz, you may pass the
            SNAPADC instance with a
                    customized instance of frequency synthesizer,
            like this:

                    mysnapadc = snapadc.SNAPADC(casperfpga)

                    mysnapadc.lmx =
            synth.LMX2581(casperfpga,'lmx_ctrl',50)

                    Example of using this class:
                    ...
                    mysnapadc = SNAPADC(casperfpga) # Make an instance
            mysnapadc.init(800,2,8)                       # Sampling
            frequency 400MHz,

                  # two channel mode,

                 # 8-bit mode

                    mysnapadc.adc.selectInput([2,2,3,3])    # Select
            the 2nd and the 3rd
                          # input for each ADC

                    # Till now the ADCs are ready for spectrometer or
            other applications.
                    # If you want to see the raw data (128 continuous
            samples) out of the
                    # ADCs, do this:

                    mysnapadc.snapshot()                   # Take a
            snapshot

                    data = mysnapadc.readRAM(0)           # Read the
            snapshot of the
                            # 1st ADC

                    data = mysnapadc.interleave(data,2)     # Reshape
            the data to
                            # two columns (channels)

                    """

        The 12-bit mode is ready, I also made a pull request. But
        there are some problems when I applied the 12-bit mode to
        tutorials_devel/vivado/snap/tut_corr
        
<https://github.com/casper-astro/tutorials_devel/commit/55747cd737b1f7ab1c5ce06da58ad8e1f9f77f3c>.
        I am going to start another thread for the discussion.

        Best,

        Tian Huang
        Research Associate
        Battcock Centre for Experimental Astrophysics
        Cavendish Laboratory
        University of Cambridge
-- You received this message because you are subscribed to the
        Google Groups "[email protected]"
        <mailto:[email protected]> group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected]
        <mailto:[email protected]>.
        To post to this group, send email to
        [email protected] <mailto:[email protected]>.

-- Gerald R. Harp, PhD
        Director, SETI Research
        SETI Institute
        Mountain View, CA, USA

-- You received this message because you are subscribed to the
        Google Groups "[email protected]
        <mailto:[email protected]>" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected]
        <mailto:[email protected]>.
        To post to this group, send email to [email protected]
        <mailto:[email protected]>.

-- You received this message because you are subscribed to the Google
    Groups "[email protected]
    <mailto:[email protected]>" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected]
    <mailto:[email protected]>.
    To post to this group, send email to [email protected]
    <mailto:[email protected]>.



--
Gerald R. Harp, PhD
Director, SETI Research
SETI Institute
Mountain View, CA, USA

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to