Difference between revisions of "FPGA Programmer"

From UConn PAN
Jump to navigation Jump to search
m
 
m
Line 1: Line 1:
== (110) Program DAC ==
+
== (110) DAC Programmer ==
  
This block will have a substate to obtain the programming mask.  It then loops 32 (or 24 or 16) times on a second substate that obtains the next programming value and, if the corresponding mask bit is high, programs that channel of the DAC. A mux may be needed to select the appropriate bit from the programming mask.  It also updates the locally stored DAC channel values (which may be stored on the FPGA, the CP2200/1 Flash, or other) in preparation for a "D" response packet.  Then it transitions to state 111.
+
The DAC Programmer assigns DAC voltages according to the mask and values listed in the P-packet payload. The module always passes control to the Transmitter to send a D-packet, confirming the requested values.
  
inputs
 
* ''Clk'': clock
 
* ''/Rst'': asynchronous, active-low reset
 
* ''State'': 3-bit state value
 
  
internal signals
+
== Programming Details ==
* ''S_En'': state enable, ''S_En'' <= not (''St(2)'' or ''St(1)'' or ''St(0)'')
 
* ''Go'': when ''S_En'' goes high ''Go'' pulses for one cycle
 
  
blocks
+
 
* '''Mask Fetcher'''
+
 
** This block reads the programming mask, contained in the second data byte (first remaining byte) through the 5th/4th/3rd byte (4th/3rd/2nd remaining byte), and saves it into a 32/24/16-bit register.
+
=== Ports ===
** inputs
+
 
*** ''Clk'': clock
+
* ''Clk'': [in] clock
*** ''/Rst'': asynchronous, active-low reset
+
* ''Rst'': [in] asynchronous reset
*** ''Go'': pulse to begin, comes from ''Go'' internal signal of block 110
+
 
*** ''TxRx_D'': 8-bit data bus from transceiver
+
 
*** ''TxRx_Done'': ''Done'' signal from transceiver
+
Write signals to the [[Programming_the_DAC|DAC Controller]]
** outputs
+
* ''DAC_iGo'': [out] active-low "Go" signal
*** ''TxRx_Go'': ''Go'' input on transceiver
+
* ''DAC_Addr'': [out] 5-bit DAC channel address
*** ''TxRx_R/W'': ''R/W'' input on transceiver; tied to read (one)
+
[the 14-bit DAC value is synonymous with that passed to the DAC register. See below.]
*** ''TxRx_A'': ''A_in'' bus on transceiver
+
 
*** ''Mask'': 32/24/16-bit readout of programming mask
+
 
*** ''Done'': pulse to signal that mask has been obtained
+
[[FPGA_Registers#State_Register|State Register]] Control Lines
* '''Programmer'''
+
* ''state_En'': [out] state register enable (write) signal
** Programs the DAC.  Loops 32/24/16 times, obtaining the next byte from the CP2200/1 buffer, checking the mask, programming the DAC if the mask is 1 or skipping if the mask is 0.  Also writes the value to the internal DAC value storage registers (or Flash memory or other).
+
* ''state_D'': [out] (3-bit) state register input
** inputs
+
* ''state_Q'': [in] (3-bit) state register output
*** ''Clk'': clock
+
 
*** ''/Rst'': asynchronous, active-low reset
+
 
*** ''Go'': pulse to begin; feeds from ''Done'' signal of Mask Fetcher
+
[[FPGA_Registers#DAC Register|DAC Register]] control lines
*** ''TxRx_D'': ''D_out'' bus on transceiver
+
* ''DACReg_En'': [out] ;
*** ''TxRx_Done'': ''Done'' signal on transceiver
+
* ''--DACReg_Addr'': [out] _VECTOR (4 downto 0);
** outputs
+
* ''DACReg_D'': [out] 14-bit voltage value for the register and DAC Controller
*** - DAC control lines -
+
* ''DACReg_Q'': [in] _VECTOR (15 downto 0);
*** ''TxRx_Go'': ''Go'' signal on transceiver
+
 
*** ''TxRx_R/W'': ''R/W'' signal on transceiver
+
 
*** ''TxRx_A'': ''A_in'' bus on transceiver
+
[[FPGA_Transceiver|Transceiver]] Control Lines
*** ''Sel'': 5/5/4-bit select bus to internal registers
+
* ''TxRx_Go'': [out] "Go" signal to read/write an EC control register byte
*** ''Data'': 32/24/16-bit data bus to internal registers
+
* ''TxRx_RiW'': [out] active-high read, active-low write flag
*** ''Done'': pulse to signal completion
+
* ''TxRx_Aout'': [out] EC control register address (8-bit)
* '''Discarder'''
+
* ''TxRx_Din'': [in] EC control register return value
** This block orders the CP2200/1 to discard the packet, now that the FPGA is done with all the data contained within the packet.
+
* ''TxRx_Dout'': [out] EC control register write value
** inputs
+
* ''TxRx_Done'': [in] "Done" signal from [[FPGA_Transceiver|Transceiver]]
*** ''Clk'': clock
 
*** ''/Rst'': asynchronous, active-low reset
 
*** ''Go'': pulse to begin; feeds from ''Done'' signal of Programmer
 
*** ''TxRx_Done'': ''Done'' signal on transceiver
 
** outputs
 
*** ''TxRx_Go'': ''Go'' signal on transceiver
 
*** ''TxRx_R/W'': ''R/W'' signal on transceiver
 
*** ''TxRx_A'': ''A_in'' bus on transceiver
 
*** ''Done'': pulse to signal completion
 
*** ''New_St'': next state to load into the state register; goes to 111 when ''Done'' is high
 

Revision as of 16:26, 3 June 2008

(110) DAC Programmer

The DAC Programmer assigns DAC voltages according to the mask and values listed in the P-packet payload. The module always passes control to the Transmitter to send a D-packet, confirming the requested values.


Programming Details

Ports

  • Clk: [in] clock
  • Rst: [in] asynchronous reset


Write signals to the DAC Controller

  • DAC_iGo: [out] active-low "Go" signal
  • DAC_Addr: [out] 5-bit DAC channel address

[the 14-bit DAC value is synonymous with that passed to the DAC register. See below.]


State Register Control Lines

  • state_En: [out] state register enable (write) signal
  • state_D: [out] (3-bit) state register input
  • state_Q: [in] (3-bit) state register output


DAC Register control lines

  • DACReg_En: [out] ;
  • --DACReg_Addr: [out] _VECTOR (4 downto 0);
  • DACReg_D: [out] 14-bit voltage value for the register and DAC Controller
  • DACReg_Q: [in] _VECTOR (15 downto 0);


Transceiver Control Lines

  • TxRx_Go: [out] "Go" signal to read/write an EC control register byte
  • TxRx_RiW: [out] active-high read, active-low write flag
  • TxRx_Aout: [out] EC control register address (8-bit)
  • TxRx_Din: [in] EC control register return value
  • TxRx_Dout: [out] EC control register write value
  • TxRx_Done: [in] "Done" signal from Transceiver