Difference between revisions of "MRI lab: FPGA controller documentation"

From Course Wiki
Jump to: navigation, search
(Control registers)
 
(14 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
==System==
 +
The design is based on the [http://www.altera.com/products/devkits/altera/kit-cyc3-dsp.html Altera DSP Development kit], [http://www.altera.com/products/devices/cyclone3/cy3-index.jsp Cyclone III] edition. The kit includes the [http://www.altera.com/products/devkits/altera/kit-cyc3.html#documentation Cyclone III development board] plus the [http://www.altera.com/literature/manual/rm_data_conversion_hsmc.pdf Data conversion HSMC card].
 +
 +
See: [[FPGA Design Environment]]
 +
 
==Control registers==
 
==Control registers==
 
{| border="1"
 
{| border="1"
 
|-
 
|-
 
!Register
 
!Register
 +
!Field
 
!Bits
 
!Bits
 
!Function
 
!Function
 
!device
 
!device
|-
+
{{ControlRegister|Name=PhaseIncrement|Bits=31:0|Function=Set frequency of generated sinewave|Device=/dev/pio_phaseIncrement}}
!PhaseIncrement
+
{{ControlRegister|Name=Pulse1On|Bits=31:0|Function=Duration of first pulse|Device=/dev/pio_pulse1On}}
|31:0
+
{{ControlRegister|Name=Pulse1Off|Bits=31:0|Function=Interval between first and second pulses|Device=/dev/pio_pulse1Off}}
|Frequency of generated sinewave
+
{{ControlRegister|Name=Pulse2On|Bits=31:0|Function=Duration of second pulse|Device=/dev/pio_pulse2On}}
|/dev/pio_phaseIncrement
+
{{ControlRegister|Name=Pulse2Off|Bits=31:0|Function=Minimum interval between end of second pulse and first pulse repeat|Device=/dev/pio_pulse2off}}
|-
+
 
!Pulse1On
+
 
|31:0
+
{{ControlRegister|Name=adcDelay1|Bits=31:0|Function= | Device=}}
|Length of first pulse
+
{{ControlRegister|Name=adcCapture1|Bits=31:0|Function=|Device=}}
|/dev/pio_pulse1On
+
{{ControlRegister|Name=adcDelay2|Bits=31:0|Function=|Device=}}
|-
+
{{ControlRegister|Name=adcCapture2|Bits=31:0|Function=|Device=}}
!Pulse1Off
+
 
|31:0
+
{{ControlRegister|Name=PulseControl||Control bits for pulse generator and digitizer|Device=/dev/pio_pulseControl}}
|Interval between first and second pulse
+
{{ControlRegister|Bits=13|Field=Digitizer Reset|Function=0 = normal operation; 1 = reset digitizer}}
|/dev/pio_pulse1Off
+
{{ControlRegister|Bits=12:11|Field=ADC Test mode|Function=00 = adc input (normal operation); 01 = adc test signal (count); 10 = test mode (DAC output); 11 = test mode (constant 0xDEADBEEF)}}
|-
+
{{ControlRegister|Bits=10:8|Field=ADC clock divisor|Function=not yet implemented}}
!Pulse2On
+
{{ControlRegister|Bits=7|Field=WaitDmaComplete|Function=0 = do not wait; 1 = wait for fifo to empty}}
|31:0
+
{{ControlRegister|Bits=6|Field=IgnoreDmaReady|Function=0 = normal operation; 1 = ignore}}
|Length of second pulse
+
{{ControlRegister|Bits=5|Field=RunContinuously|Function=0 = normal operation; 1 = continuous operation}}
|/dev/pio_pulse2On
+
{{ControlRegister|Bits=4|Field=Start|Function=Start digitizer on positive edge}}
|-
+
{{ControlRegister|Bits=3|Field=Reserved|Function=Set to 0}}
!Pulse2On
+
{{ControlRegister|Bits=2|Field=DAC B output|Function=0 = carrier; 1 = trigger}}
|31:0
+
{{ControlRegister|Bits=1|Field=Continuous Pulse Generation|Function=0 = generate single pulse sequence; 1 = run continuously}}
|Interval between second pulse and end of cycle
+
{{ControlRegister|Bits=0|Field=Start Pulse Generator|Function=Pulse starts on positive edge.}}
|/dev/pio_pulse2Off
+
|-
+
!PulseControl
+
|
+
|
+
|/dev/pio_pulse2On
+
|-
+
|ADC DMA source
+
|5:4
+
|00 = adc input (normal operation); 01 = adc test signal (count); 10 = test mode (DAC output); 11 = test mode (constant 0xDEADBEEF)
+
|
+
 
|}
 
|}
  
 
==API==
 
==API==

Latest revision as of 21:26, 12 April 2011

System

The design is based on the Altera DSP Development kit, Cyclone III edition. The kit includes the Cyclone III development board plus the Data conversion HSMC card.

See: FPGA Design Environment

Control registers

Register Field Bits Function device
PhaseIncrement
*
31:0 Set frequency of generated sinewave /dev/pio_phaseIncrement
Pulse1On
*
31:0 Duration of first pulse /dev/pio_pulse1On
Pulse1Off
*
31:0 Interval between first and second pulses /dev/pio_pulse1Off
Pulse2On
*
31:0 Duration of second pulse /dev/pio_pulse2On
Pulse2Off
*
31:0 Minimum interval between end of second pulse and first pulse repeat /dev/pio_pulse2off


adcDelay1
*
31:0
adcCapture1
*
31:0
adcDelay2
*
31:0
adcCapture2
*
31:0
PulseControl
*
/dev/pio_pulseControl
Digitizer Reset
13 0 = normal operation; 1 = reset digitizer
ADC Test mode
12:11 00 = adc input (normal operation); 01 = adc test signal (count); 10 = test mode (DAC output); 11 = test mode (constant 0xDEADBEEF)
ADC clock divisor
10:8 not yet implemented
WaitDmaComplete
7 0 = do not wait; 1 = wait for fifo to empty
IgnoreDmaReady
6 0 = normal operation; 1 = ignore
RunContinuously
5 0 = normal operation; 1 = continuous operation
Start
4 Start digitizer on positive edge
Reserved
3 Set to 0
DAC B output
2 0 = carrier; 1 = trigger
Continuous Pulse Generation
1 0 = generate single pulse sequence; 1 = run continuously
Start Pulse Generator
0 Pulse starts on positive edge.

API