CRKit RF Control WINLAB – Rutgers University Date : June 9 2010 Authors : Prasanthi Maddala, Khanh Le,

Slides:



Advertisements
Similar presentations
INPUT-OUTPUT ORGANIZATION
Advertisements

Anurag Dwivedi Rudra Pratap Suman. Scope of Communica tion Telephones and Cell Phones.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
MICROPROCESSORS TWO TYPES OF MODELS ARE USED :  PROGRAMMER’S MODEL :- THIS MODEL SHOWS FEATURES, SUCH AS INTERNAL REGISTERS, ADDRESS,DATA & CONTROL BUSES.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
8253/54 Timer Section /54 Timer Description and Initialization
ECE 371 Unit 13 - Part 1 Serial Peripheral Interface (SPI)
8086.  The 8086 is Intel’s first 16-bit microprocessor  The 8086 can run at different clock speeds  Standard 8086 – 5 MHz  –10 MHz 
The 8085 Microprocessor Architecture
The 8085 Microprocessor Architecture. Contents The 8085 and its Buses. The address and data bus ALU Flag Register Machine cycle Memory Interfacing The.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Serial Interfaces, Part Deux -I 2 C and SPI December 4, 2002 Presented by Eugene Ho.
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Lecture 8: Serial Interfaces
Analog Devices FMCOMMS1-EBZ WINLAB – Rutgers University Date : April 22, 2013 Authors : Prasanthi Maddala,
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
Serial Peripheral Interface (SPI)
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Configuration. Mirjana Stojanovic Process of loading bitstream of a design into the configuration memory. Bitstream is the transmission.
INPUT-OUTPUT ORGANIZATION
Interfaces A practical approach. Lesson 2 I2C and SPI
SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example.
Computer Architecture Lecture 08 Fasih ur Rehman.
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Memory interface Memory is a device to store data
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
4.0 rtos implementation part II
SDR Test bench Architecture WINLAB – Rutgers University Date : October Authors : Prasanthi Maddala,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
AT91 Embedded Peripherals
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
University of Calcutta CBM 1 ROC Design Issues Dr. Amlan Chakrabarti, Dr. Sanatan Chattopadhyay & Mr. Suman Sau.
MODES OF Details of Pins Pin 1GND –Connected Ground Pins 2-16 AD14-AD0–acts as both input/output. Outputs address at the first part of the cycle.
7 - 1 Texas Instruments Incorporated Module 7 : Serial Peripheral Interface C28x 32-Bit-Digital Signal Controller TMS320F2812.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Serial Peripheral Interface SPI I2C (i-squared cee)
TX Application Architecture WINLAB – Rutgers University Date : July 27th 2009 Authors : Prasanthi Maddala, Khanh.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
OCRP Rx Architecture WINLAB – Rutgers University Date : Feb 2, 2010 Authors : Khanh Le, Prasanthi Maddala,
Embedded Communication Protocols Don Heer 10/18/10 1.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 9 Serial Buses – SPI, I2C.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
WINLAB Open Cognitive Radio Platform Architecture v1.0 WINLAB – Rutgers University Date : July 27th 2009 Authors : Prasanthi Maddala,
Genova May 2013 Diego Real – David Calvo IFIC (CSIC – Universidad de Valencia) CLBv2 1.
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
Memory Interface EEE 365 [FALL 2014] LECTURER 12 ATANU K SAHA BRAC UNIVERSITY.
MICROCONTROLLER AND INTERFACING Presented by: Shefali Jethva ( ) Shivali Panchal ( ) Komal Soni ( ) Roll no. :- 14EC308.
1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface
©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.
ECE 382 Lesson 15 Lesson Outline S/W Delays Wrap up
Serial Communication Buses: I2C and SPI
Tutorial Introduction
Pulse Width Modulation (PWM)
SPI Protocol and DAC Interfacing
SPI Protocol and DAC Interfacing
SPI Protocol and DAC Interfacing
Преглед Начин функционисања Имплементације
SPI Protocol Sepehr Naimi
Interfacing Data Converters with FPGAs
Presentation transcript:

CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,

SPI – Serial Peripheral Interface Synchronous serial data link standard. Operates in master/slave mode. SPI specifies 4 logic signals SCLK — Serial Clock (output from master) MOSI/SIMO — Master Output, Slave Input (output from master) MISO/SOMI — Master Input, Slave Output (output from slave) SS — Slave Select (active low; output from master) Some SPI slave devices do not have a data output port (No MISO) and a few devices use a bidirectional data port (MOSI/MISO). Data Transmission - Master configures the clock; uses a frequency < max. freq supported by the slave - Pulls the slave select low - During each clock cycle the Master sends a bit on MOSI and slave sends a bit on MISO – not all transmissions result in meaningful rd/wr s. Clock polarity and phase - In addition to setting the clock frequency, the master must also configure the clock polarity(cpol) and phase(cpha) with respect to the data.

SPI (contd.) At CPOL=0 base value of the clock is zero  For CPHA=0 (first edge), data is read on the clock's rising edge and data is changed on a falling edge  For CPHA=1 (second edge), data is read on the clock's falling edge and data is changed on a rising edge. At CPOL=1 the base value of the clock is one (inversion of CPOL=0)  For CPHA=0, data is read on clock's falling edge and data is changed on a rising edge.  For CPHA=1, data is read on clock's rising edge and data is changed on a falling edge. This timing applies to both the master and the slave device.

Range Of RF Boards RF BoardNo.of RF modulesParts of RF module* No.of SPI Devices SDR1 or 2DiBo1 WiBo2 (shared bus) eSDR1DiBo1 WiBo2 (shared bus) FreeBo3 (shared bus) WDR1-4WDR14 (shared bus) * Each “part” of an RF module has its own SPI data bus

OCRP RF Control (R3/ocrp_rf_ctl.vhd) OCRP RF Control block supports up to 4 RF modules (SDR/ SDR with FreeBo/ WDR/XDR(?)) Generics: RF_BOARD – SDR/SDRwithFreeBo/WDR/XDR NO_OF_RF_CARDS - 1 or 2 for SDR, 1 for SDR with FreeBo(eSDR), 1-4 for WDR, 1-4 for XDR SPI_PER_CARD_SHARED (TRUE by default) - User can choose to share an spi master among different spi slaves, even when they have independent SPI buses. In SDR, DiBo and WiBo have independent SPI buses. When SPI_PER_CARD_SHARED = TRUE, a single SPI master is used to generate the SPI signals, that are routed to the required bus, using an intermediate block. - TRUE or FALSE for SDR, SDRwith FreeBo(eSDR),always TRUE for WDR, XDR Made up of OCRP SPI blocks (up to 4), each of which is controlled through an RMAP interface (RMAP Inf x) as shown above.

OCRP RF Control – RMAP Interface Signal NameIn/OutWidthDescription i_rfctl_wr_dataIn40Data to be sent to the SPI device serially – MSB first i_spi_cycle_lenIn6Length of the SPI communication cycle - Ex: length of valid write data for an SPI wr cycle. i_selIn4SPI device code i_enIn1Rising edge on this signal indicates a request for start of SPI transmission i_modeIn2SPI mode – cpol&cpha i_freq_divIn4Freq. of sclk = Freq. of i_clk / (2 ^ i_freq_div) i_stall_startIn6No.of sclk cycles after which sclk has to be stalled. 0 – no clock stalling i_stall_stopIn6No.of sclk cycles after which sclk comes out of stall mode and runs normally. o_rfctl_rd_dataOut32Data read from the SPI device during an SPI communication cycle. o_doneOut1Rising edge on this signal indicates the completion of an SPI communication cycle.

SPI Devices on SDR DeviceNo. per card Comm. Cycle width Type of SPI DiBoAD9862 (ADC/DAC on DiBo) 116 (or 24)4-wire. Allows 2 word write. MSB(dflt) or LSB first. Max sclk- 16 MHz. Data read on rising edge, clocked out on falling edge. 16 Comm. Cycle width should be used e.g. 8-bit instruction and 8-bit data. WiBoMAX2829 (RF Transceiver on WiBo) 1183-wire, MSB first. No read. Max sclk-40 MHz(?). Data read on rising edge. 4-bit address + 14-bit data MM74HC595 (U2- RF Control Register on WiBo) 18Can be thought of as a 3-wire SPI device with sclk connected to the shift register clock and cs connected to the storage register clock. Data read on rising edge. No address field, shift register data content is available on CRKit wiki (under SDR section) Antenna Switches are controlled from the common RMAP directly just like the LEDs – they don’t go through the RF control block

RF Control for SDR OCRP RF CTL ( RF_BOARD=SDR, NO_OF_RF_CARDS=1, SPI_PER_CARD_SHARED=TRUE) OCRP RF CTL ( RF_BOARD=SDR, NO_OF_RF_CARDS=2, SPI_PER_CARD_SHARED=TRUE) OCRP RF CTL ( RF_BOARD=SDR, NO_OF_RF_CARDS=1, SPI_PER_CARD_SHARED=FALSE) OCRP RF CTL ( RF_BOARD=SDR, NO_OF_RF_CARDS=2, SPI_PER_CARD_SHARED=FALSE) By default and preferably SPI_PER_CARD_SHARED = TRUE

RF Control for SDR(Contd.) Generic SPI SLAVE_SEL_ENCODED - FALSE NO_OF_SLAVE_SEL_OUTPUTS – 1 DELAY_TO_SLAVE – 1 (since SDR RF inf involves a delay of 1 sclk cycle)

RF Control for SDR(Contd.) Generic SPI (OCRP SPI – WIBO) SLAVE_SEL_ENCODED – FALSE NO_OF_SLAVE_SEL_OUTPUTS – 2 DELAY_TO_SLAVE – 0 Generic SPI (OCRP SPI – DIBO) SLAVE_SEL_ENCODED – FALSE NO_OF_SLAVE_SEL_OUTPUTS – 1 DELAY_TO_SLAVE – 0

Generic SPI Generics MAX_SPI_CYCLE_LEN (40 for OCRP) MAX_SPI_CYCLE_LEN_BITS (6 for OCRP) NO_OF_SLAVE_SEL_INPUT_BITS (4 for OCRP) SLAVE_SEL_ENCODED (depends on RF) NO_OF_SLAVE_SEL_OUTPUTS (depends on RF) DELAY_TO_SLAVE (depends on RF) - 0 if the SPI master core is directly connected to the slave. If its output is being processed before connecting to the slave, specify the delay involved in terms of sclk cycles.

Generic SPI output Signal NameIn/OutWidthDescription o_sclkOut1Serial clock to the slave o_sdiOut1Serial data out i_sdoIn1Serial data in o_csOutNO_OF_SLAVE_S EL_OUTPUTS Chip selects for slaves – this bus gives individual chip select lines or encoded chip select depending on the SLAVE_SEL_ENCODED generic. Ex: NO_OF_SLAVE_SEL_OUTPUTS = 4 SLAVE_SEL_ENCODED = TRUE - the master can select up to 15 slave devices (with one idle ?) o_sclk_x2Out1This is a clock output with freq. double that of sclk. It can be used by a block between the master and the slaves. Ex: DELAY_TO_SLAVE = 1, the intermediate block consists of 2 reg. stages which use o_sclk_x2 o_selOutNO_OF_SLAVE_S EL_INPUT_BITS SPI master can give multiple chip select lines directly to the slaves or give a single chip select that is further passed through a demux to select among various slaves. o_sel can be used by such a demux. (o_sel = i_sel)

RMAP settings for SDR (rmap_cmn_ctl.xls) spi_configurationspi_control Rf_idStall_startStall_stopFreq_divmodeCycle_lenSel AD9862 (DIBO)b0000b b0011*b00b010000(16)**b0000 MAX2829 (WIBO)b0000b b0011b00b010010(18)b0010 MM74HC595 (WIBO-U2) b0000b b0011b00b001000(8)b0011 *freq_div = 3. this gives sclk of 12.5 MHz when i_clk i.e., the system clock is 100 MHz ** AD9862 supports two word write, in which case cycle_len = 24. We always use single word write. So, cycle_len = 16 Since the spi_config register remains the same for all the devices on SDR, just write it once.

SPI Devices on eSDR DeviceNo. per card Comm. Cycle width Type of SPI DiBoAD9862 (ADC/DAC on DiBo) 116 (or 24)4-wire. Allows 2 word write. MSB(dflt) or LSB first. Max sclk- 16 MHz. Data read on rising edge, clocked out on falling edge. WiBoMAX2829 (RF Transceiver on WiBo) 1183-wire, MSB first. No read. Max sclk-40 MHz(?). Data read on rising edge. MM74HC595 (U2- RF Control Register on WiBo) 18Can be thought of as a 3-wire SPI device with sclk connected to the shift register clock and cs connected to the storage register clock. Data read on rising edge. FreeBoADF4350 (LO on FreeBo) 1 MAX7301 (FreeBo) 1 HMC629 (Attenuator on FreeBo) 1

SPI Devices on WDR DeviceNo. per card Comm. Cycle width Type of SPI MAX wire, MSB first, Max sclk-26/50 MHz (?). Data read on rising edge, clocked out on falling edge. AD9863 primary AD/DA) 116, 24 (dual word)4-wire. Allows 2 word write. MSB(dflt) or LSB first. Max sclk-40 MHz. Data read on rising edge, clocked out on falling edge. ADS7951 (Aux ADC) 2164-wire, MSB first. Data read on rising edge, clocked out on falling edge. AD5624R (Aux DAC) 2243-wire. No read. Max sclk-50 MHz. Data read on falling edge. MAX2829 (Tx/Rx IF) 2183-wire, MSB first. No read. Max sclk-40 MHz(?). Data read on rising edge. AD9959 (DDS) 1Min 16, max 404-wire. MSB(dflt) or LSB first. Max sclk-200 MHz. Data read on rising edge, clocked out on falling edge.

AD registers, 8 bit wide. Max sclk freq = 16 MHz 16/24 bit rd/wr cycle - registers are updated on 16 th or 24 th rising clock edge. Incomplete operations are ignored Writing to a register rmap_cmd(wr, spi_wr_reg_0, 00(rd/wr & 2/1)&addr(6 bits)&data(8 bits)) -- data(16) for 2 word write rmap_cmd(wr, spi_ctl_reg, x”0000” & b”00&010000(cycle_length-16)&0010(AD9862)&000&1) rmap_cmd(wr, spi_ctl_reg, x”0000” & b”00&010000(cycle_length-16)&0010(AD9862)&000&0) Reading from a register rmap_cmd(wr, spi_wr_reg_0, 10&addr(6)&dummydata(8)) -- data(16) for 2 word rd rmap_cmd(wr, spi_ctl_reg, x”0000” & b”00&010000(cycle_length-16)&0010(AD9862)&000&1) rmap_cmd(wr, spi_ctl_reg, x”0000” & b”00&010000(cycle_length-16)&0010(AD9862)&000&0) rmap_cmd(rd, spi_rd_reg) - spi_rd_reg(7:0) will contain the required data SPI Config register stall_start – stall_stop – mode -00 freq_div – 0011 (gives 12.5MHz sclk when i_clk = 100 MHz)

MAX registers, 14 bit wide. 18 bit wr cycle – less than 18 bits are allowed. Frame starts with nCS going low and ends with nCS going high. Last 18 bits that are shifted in are latched with the rising edge of nCS. Bits are shifted in MSB first, on rising edge of sclk when nCS is low. Writing to a register rmap_cmd(wr, spi_wr_reg_0, data(14)&addr(4)) rmap_cmd(wr, spi_ctl_reg, x”0000” & b”00&010010(cycle_length-18)&0000(MAX2829)&000&1) rmap_cmd(wr, spi_ctl_reg, x”0000” & b”00&010010(cycle_length-18)&0000(MAX2829)&000&0) SPI Config register stall_start – stall_stop – mode -00 freq_div – 0011 (gives 12.5MHz sclk when i_clk = 100 MHz)

MM74HC595